# FastBCP Documentation > High-performance bulk copy tool for exporting SQL Server, PostgreSQL, MySQL, and Oracle data to CSV, Parquet, JSON, and cloud storage (S3, Azure, GCS, OneLake). Runs on-premises, in the cloud, or in fully air-gapped environments with no internet connection required. ## 0.32 Your first FastBCP export - [Getting Started with FastBCP](/0.32.md): Your first FastBCP export ### datatypes-conversion - [SQL Server → Parquet](/0.32/datatypes-conversion/mssql/parquet.md): SQL Server to Parquet datatypes conversion reference - [MySQL → Parquet](/0.32/datatypes-conversion/mysql/parquet.md): MySQL to Parquet datatypes conversion reference - [Oracle → Parquet](/0.32/datatypes-conversion/oracle/parquet.md): Oracle to Parquet datatypes conversion reference - [Datatypes Conversion](/0.32/datatypes-conversion/overview.md): How FastBCP maps native source datatypes to Parquet, per database and connection type - [PostgreSQL COPY → Parquet](/0.32/datatypes-conversion/postgresql-copy/parquet.md): PostgreSQL COPY to Parquet datatypes conversion reference - [PostgreSQL → Parquet](/0.32/datatypes-conversion/postgresql/parquet.md): PostgreSQL to Parquet datatypes conversion reference - [SAP HANA → Parquet](/0.32/datatypes-conversion/saphana/parquet.md): SAP HANA to Parquet datatypes conversion reference - [Teradata → Parquet](/0.32/datatypes-conversion/teradata/parquet.md): Teradata to Parquet datatypes conversion reference ### documentation - [Advanced Parameters](/0.32/documentation/cli/advanced_parameters.md): Advanced configuration options for FastBCP - [Authentication](/0.32/documentation/cli/authentication.md): FastBCP authentication methods and security - [Cloud Options](/0.32/documentation/cli/cloud_options.md): Configure AWS, Azure, and Google Cloud authentication and storage - [Connection Parameters](/0.32/documentation/cli/connection_parameters.md): Server, database, and connection string configuration - [CSV Formatting](/0.32/documentation/cli/csv_formatting.md): Configure CSV output format and delimiters - [License](/0.32/documentation/cli/license.md): License configuration for FastBCP - [Output Info](/0.32/documentation/cli/output_info.md): Directory, filename, and output configuration - [Parallel Parameters](/0.32/documentation/cli/parallel_parameters.md): Configure parallel export to improve performance - [Parquet Formatting](/0.32/documentation/cli/parquet_formatting.md): Configure Parquet compression and options - [Source Info](/0.32/documentation/cli/source_info.md): Query, input file, and table parameters for data extraction - [AWS S3 Configuration](/0.32/documentation/cloud-connectivity/aws-s3.md): Configure AWS S3 authentication and connectivity - [Azure Configuration](/0.32/documentation/cloud-connectivity/azure.md): Configure Azure Blob Storage and Data Lake Gen2 connectivity - [Google Cloud Storage Configuration](/0.32/documentation/cloud-connectivity/google-cloud.md): Configure Google Cloud Storage authentication and connectivity - [OneLake Configuration](/0.32/documentation/cloud-connectivity/onelake.md): Configure OneLake authentication and connectivity - [Cloud Connectivity Overview](/0.32/documentation/cloud-connectivity/overview.md): Cloud connectivity overview for AWS, Azure, and Google Cloud - [Operating Systems](/0.32/documentation/compatibility/operating_systems.md): Supported operating systems and platform requirements - [Database Sources & Platforms](/0.32/documentation/compatibility/sources_platforms.md): Supported databases, connection types, and platform compatibility - [Advanced Scenarios](/0.32/documentation/examples/advanced-scenarios.md): Advanced use cases and troubleshooting examples - [Cloud Storage Examples](/0.32/documentation/examples/cloud-storage.md): Export examples for cloud storage destinations (S3, Azure) - [MySQL Examples](/0.32/documentation/examples/mysql.md): Export examples for MySQL databases - [Oracle Examples](/0.32/documentation/examples/oracle.md): Export examples for Oracle databases - [Other Databases](/0.32/documentation/examples/other-databases.md): Export examples for Clickhouse, SAP HANA, and Netezza - [Output Formats](/0.32/documentation/examples/output-formats.md): Examples for different output formats (CSV, Parquet, Excel) - [PostgreSQL Examples](/0.32/documentation/examples/postgresql.md): Export examples for PostgreSQL databases - [SQL Server Examples](/0.32/documentation/examples/sql-server.md): Export examples for SQL Server databases - [Configuration Examples](/0.32/documentation/logging/examples.md): Sample FastBCP_settings.json configurations - [Log Database](/0.32/documentation/logging/log-database.md): Configure database logging in FastBCP - [Log Files Names Mapping using variables](/0.32/documentation/logging/log-files-names-mapping-using-variables.md): Use variables to customize log file paths and names - [Log Levels](/0.32/documentation/logging/logs-level.md): Configure FastBCP log levels - [OpenTelemetry](/0.32/documentation/logging/OpenTelemetry.md): Configure OpenTelemetry tracing and log export in FastBCP - [Logging Overview](/0.32/documentation/logging/Overview.md): Overview of FastBCP logging configuration ### installation Instructions - [Installation](/0.32/installation.md): Instructions ### integration - [Apache Airflow](/0.32/integration/airflow-integration.md): Apache Airflow is a powerful open-source platform for developing, scheduling, and monitoring batch-oriented workflows. FastBCP can be seamlessly integrated into Airflow DAGs using the Docker operator and its official Docker image. - [Docker](/0.32/integration/docker-integration.md): Minimal, production-ready container image to run FastBCP, a high-performance bulk copy utility designed for data integration and automation workflows. - [Kestra](/0.32/integration/kestra-integration.md): Kestra is a powerful open-source orchestration platform that can be used to automate and schedule FastBCP data export workflows. FastBCP can be seamlessly integrated into Kestra flows using its Docker image. - [PostgreSQL](/0.32/integration/postgresql-integration.md): The pg_fastbcp extension allows you to run the FastBCP tool directly from an SQL function, enabling fast data export from databases to various formats (CSV, Parquet) and cloud storage directly from PostgreSQL. ### release-notes - [Release Notes 0.32](/0.32/release-notes/release-notes-0.32.md): What's new in FastBCP 0.32 ### sitemap Complete documentation structure - [Sitemap](/0.32/sitemap.md): Complete documentation structure ### wizard Interactive wizard to build FastBCP commands - [FastBCP Command Wizard](/0.32/wizard.md): Interactive wizard to build FastBCP commands ## 1.0 Your first FastBCP export - [Getting Started with FastBCP](/1.0.md): Your first FastBCP export ### datatypes-conversion - [SQL Server (ADBC) → Parquet](/1.0/datatypes-conversion/mssql/adbc-parquet.md): SQL Server (ADBC) to Parquet datatypes conversion reference - [SQL Server → Parquet](/1.0/datatypes-conversion/mssql/parquet.md): SQL Server to Parquet datatypes conversion reference - [MySQL → Parquet](/1.0/datatypes-conversion/mysql/parquet.md): MySQL to Parquet datatypes conversion reference - [Oracle → Parquet](/1.0/datatypes-conversion/oracle/parquet.md): Oracle to Parquet datatypes conversion reference - [Datatypes Conversion](/1.0/datatypes-conversion/overview.md): How FastBCP maps native source datatypes to Parquet, per database and connection type - [PostgreSQL COPY → Parquet](/1.0/datatypes-conversion/postgresql-copy/parquet.md): PostgreSQL COPY to Parquet datatypes conversion reference - [PostgreSQL → Parquet](/1.0/datatypes-conversion/postgresql/parquet.md): PostgreSQL to Parquet datatypes conversion reference - [SAP HANA → Parquet](/1.0/datatypes-conversion/saphana/parquet.md): SAP HANA to Parquet datatypes conversion reference - [Teradata → Parquet](/1.0/datatypes-conversion/teradata/parquet.md): Teradata to Parquet datatypes conversion reference ### documentation - [Advanced Parameters](/1.0/documentation/cli/advanced_parameters.md): Advanced configuration options for FastBCP - [Authentication](/1.0/documentation/cli/authentication.md): FastBCP authentication methods and security - [Cloud Options](/1.0/documentation/cli/cloud_options.md): Configure AWS, Azure, and Google Cloud authentication and storage - [Connection Parameters](/1.0/documentation/cli/connection_parameters.md): Server, database, and connection string configuration - [CSV Formatting](/1.0/documentation/cli/csv_formatting.md): Configure CSV output format and delimiters - [License](/1.0/documentation/cli/license.md): License configuration for FastBCP - [Output Info](/1.0/documentation/cli/output_info.md): Directory, filename, and output configuration - [Parallel Parameters](/1.0/documentation/cli/parallel_parameters.md): Configure parallel export to improve performance - [Parquet Formatting](/1.0/documentation/cli/parquet_formatting.md): Configure Parquet compression and options - [Source Info](/1.0/documentation/cli/source_info.md): Query, input file, and table parameters for data extraction - [AWS S3 Configuration](/1.0/documentation/cloud-connectivity/aws-s3.md): Configure AWS S3 authentication and connectivity - [Azure Configuration](/1.0/documentation/cloud-connectivity/azure.md): Configure Azure Blob Storage and Data Lake Gen2 connectivity - [Google Cloud Storage Configuration](/1.0/documentation/cloud-connectivity/google-cloud.md): Configure Google Cloud Storage authentication and connectivity - [OneLake Configuration](/1.0/documentation/cloud-connectivity/onelake.md): Configure OneLake authentication and connectivity - [Cloud Connectivity Overview](/1.0/documentation/cloud-connectivity/overview.md): Cloud connectivity overview for AWS, Azure, and Google Cloud - [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 - [FASTBCP_CLOUD_ISBUFFERED](/1.0/documentation/environment-variables/fastbcp-cloud-isbuffered.md): Enable buffered cloud uploads for better performance - [FASTBCP_CLOUD_MAXUPLOADTHREAD_PER_STREAM](/1.0/documentation/environment-variables/fastbcp-cloud-maxuploadthread-per-stream.md): Control parallel upload threads for cloud storage - [FASTBCP_DATEFORMAT](/1.0/documentation/environment-variables/fastbcp-dateformat.md): Control the string format used for date-to-string conversion - [FASTBCP_RGSIZE](/1.0/documentation/environment-variables/fastbcp-rgsize.md): Configure Parquet row group size - [FASTBCP_TMPPATH](/1.0/documentation/environment-variables/fastbcp-tmppath.md): Configure temporary file location for buffered cloud uploads - [FASTBCP_UID_STRING_CASING](/1.0/documentation/environment-variables/fastbcp-uid-string-casing.md): Control casing for UID-to-string conversion - [Environment Variables Overview](/1.0/documentation/environment-variables/overview.md): Overview of all FastBCP environment variables - [Advanced Scenarios](/1.0/documentation/examples/advanced-scenarios.md): Advanced use cases and troubleshooting examples - [Cloud Storage Examples](/1.0/documentation/examples/cloud-storage.md): Export examples for cloud storage destinations (S3, Azure) - [MySQL Examples](/1.0/documentation/examples/mysql.md): Export examples for MySQL databases - [Oracle Examples](/1.0/documentation/examples/oracle.md): Export examples for Oracle databases - [Other Databases](/1.0/documentation/examples/other-databases.md): Export examples for Clickhouse, SAP HANA, and Netezza - [Output Formats](/1.0/documentation/examples/output-formats.md): Examples for different output formats (CSV, Parquet, Excel) - [PostgreSQL Examples](/1.0/documentation/examples/postgresql.md): Export examples for PostgreSQL databases - [SQL Server Examples](/1.0/documentation/examples/sql-server.md): Export examples for SQL Server databases - [Configuration Examples](/1.0/documentation/logging/examples.md): Sample FastBCP_settings.json configurations - [Log Database](/1.0/documentation/logging/log-database.md): Configure database logging in FastBCP - [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 FastBCP log levels - [OpenTelemetry](/1.0/documentation/logging/OpenTelemetry.md): Configure OpenTelemetry tracing and log export in FastBCP - [Logging Overview](/1.0/documentation/logging/Overview.md): Overview of FastBCP logging configuration ### installation Instructions - [Installation](/1.0/installation.md): Instructions ### integration - [Apache Airflow](/1.0/integration/airflow-integration.md): Apache Airflow is a powerful open-source platform for developing, scheduling, and monitoring batch-oriented workflows. FastBCP can be seamlessly integrated into Airflow DAGs using the Docker operator and its official Docker image. - [Docker](/1.0/integration/docker-integration.md): Minimal, production-ready container image to run FastBCP, a high-performance bulk copy utility designed for data integration and automation workflows. - [Kestra](/1.0/integration/kestra-integration.md): Kestra is a powerful open-source orchestration platform that can be used to automate and schedule FastBCP data export workflows. FastBCP can be seamlessly integrated into Kestra flows using its Docker image. - [PostgreSQL](/1.0/integration/postgresql-integration.md): The pg_fastbcp extension allows you to run the FastBCP tool directly from an SQL function, enabling fast data export from databases to various formats (CSV, Parquet) and cloud storage directly from PostgreSQL. ### release-notes - [Release Notes 0.32](/1.0/release-notes/release-notes-0.32.md): What's new in FastBCP 0.32 - [Release Notes 1.0](/1.0/release-notes/release-notes-1.0.md): What's new in FastBCP 1.0 ### sitemap Complete documentation structure - [Sitemap](/1.0/sitemap.md): Complete documentation structure ### wizard Interactive wizard to build FastBCP commands - [FastBCP Command Wizard](/1.0/wizard.md): Interactive wizard to build FastBCP commands ## 1.1 Your first FastBCP export - [Getting Started with FastBCP](/1.1.md): Your first FastBCP export ### datatypes-conversion - [SQL Server (ADBC) → Parquet](/1.1/datatypes-conversion/mssql/adbc-parquet.md): SQL Server (ADBC) to Parquet datatypes conversion reference - [SQL Server → Parquet](/1.1/datatypes-conversion/mssql/parquet.md): SQL Server to Parquet datatypes conversion reference - [MySQL → Parquet](/1.1/datatypes-conversion/mysql/parquet.md): MySQL to Parquet datatypes conversion reference - [Oracle → Parquet](/1.1/datatypes-conversion/oracle/parquet.md): Oracle to Parquet datatypes conversion reference - [Datatypes Conversion](/1.1/datatypes-conversion/overview.md): How FastBCP maps native source datatypes to Parquet, per database and connection type - [PostgreSQL COPY → Parquet](/1.1/datatypes-conversion/postgresql-copy/parquet.md): PostgreSQL COPY to Parquet datatypes conversion reference - [PostgreSQL (ADBC) → Parquet](/1.1/datatypes-conversion/postgresql/adbc-parquet.md): PostgreSQL (ADBC) to Parquet datatypes conversion reference - [PostgreSQL → Parquet](/1.1/datatypes-conversion/postgresql/parquet.md): PostgreSQL to Parquet datatypes conversion reference - [SAP HANA → Parquet](/1.1/datatypes-conversion/saphana/parquet.md): SAP HANA to Parquet datatypes conversion reference - [Teradata → Parquet](/1.1/datatypes-conversion/teradata/parquet.md): Teradata to Parquet datatypes conversion reference ### documentation - [Advanced Parameters](/1.1/documentation/cli/advanced_parameters.md): Advanced configuration options for FastBCP - [Authentication](/1.1/documentation/cli/authentication.md): FastBCP authentication methods and security - [Cloud Options](/1.1/documentation/cli/cloud_options.md): Configure AWS, Azure, and Google Cloud authentication and storage - [Connection Parameters](/1.1/documentation/cli/connection_parameters.md): Server, database, and connection string configuration - [CSV Formatting](/1.1/documentation/cli/csv_formatting.md): Configure CSV output format and delimiters - [License](/1.1/documentation/cli/license.md): License configuration for FastBCP - [Output Info](/1.1/documentation/cli/output_info.md): Directory, filename, and output configuration - [Parallel Parameters](/1.1/documentation/cli/parallel_parameters.md): Configure parallel export to improve performance - [Parquet Formatting](/1.1/documentation/cli/parquet_formatting.md): Configure Parquet compression and options - [Source Info](/1.1/documentation/cli/source_info.md): Query, input file, and table parameters for data extraction - [AWS S3 Configuration](/1.1/documentation/cloud-connectivity/aws-s3.md): Configure AWS S3 authentication and connectivity - [Azure Configuration](/1.1/documentation/cloud-connectivity/azure.md): Configure Azure Blob Storage and Data Lake Gen2 connectivity - [Google Cloud Storage Configuration](/1.1/documentation/cloud-connectivity/google-cloud.md): Configure Google Cloud Storage authentication and connectivity - [OneLake Configuration](/1.1/documentation/cloud-connectivity/onelake.md): Configure OneLake authentication and connectivity - [Cloud Connectivity Overview](/1.1/documentation/cloud-connectivity/overview.md): Cloud connectivity overview for AWS, Azure, and Google Cloud - [Operating Systems](/1.1/documentation/compatibility/operating_systems.md): Supported operating systems and platform requirements - [Database Sources & Platforms](/1.1/documentation/compatibility/sources_platforms.md): Supported databases, connection types, and platform compatibility - [FASTBCP_CLOUD_ISBUFFERED](/1.1/documentation/environment-variables/fastbcp-cloud-isbuffered.md): Enable buffered cloud uploads for better performance - [FASTBCP_CLOUD_MAXUPLOADTHREAD_PER_STREAM](/1.1/documentation/environment-variables/fastbcp-cloud-maxuploadthread-per-stream.md): Control parallel upload threads for cloud storage - [FASTBCP_DATEFORMAT](/1.1/documentation/environment-variables/fastbcp-dateformat.md): Control the string format used for date-to-string conversion - [FASTBCP_RGSIZE](/1.1/documentation/environment-variables/fastbcp-rgsize.md): Configure Parquet row group size - [FASTBCP_TMPPATH](/1.1/documentation/environment-variables/fastbcp-tmppath.md): Configure temporary file location for buffered cloud uploads - [FASTBCP_UID_STRING_CASING](/1.1/documentation/environment-variables/fastbcp-uid-string-casing.md): Control casing for UID-to-string conversion - [Environment Variables Overview](/1.1/documentation/environment-variables/overview.md): Overview of all FastBCP environment variables - [Advanced Scenarios](/1.1/documentation/examples/advanced-scenarios.md): Advanced use cases and troubleshooting examples - [Cloud Storage Examples](/1.1/documentation/examples/cloud-storage.md): Export examples for cloud storage destinations (S3, Azure) - [DB2 Examples](/1.1/documentation/examples/db2.md): Export examples for IBM DB2 databases via ODBC - [MySQL Examples](/1.1/documentation/examples/mysql.md): Export examples for MySQL databases - [Oracle Examples](/1.1/documentation/examples/oracle.md): Export examples for Oracle databases - [Other Databases](/1.1/documentation/examples/other-databases.md): Export examples for Clickhouse, SAP HANA, and Netezza - [Output Formats](/1.1/documentation/examples/output-formats.md): Examples for different output formats (CSV, Parquet, Excel) - [PostgreSQL Examples](/1.1/documentation/examples/postgresql.md): Export examples for PostgreSQL databases - [SQL Server Examples](/1.1/documentation/examples/sql-server.md): Export examples for SQL Server databases - [Configuration Examples](/1.1/documentation/logging/examples.md): Sample FastBCP_settings.json configurations - [Log Database](/1.1/documentation/logging/log-database.md): Configure database logging in FastBCP - [Log Files Names Mapping using variables](/1.1/documentation/logging/log-files-names-mapping-using-variables.md): Use variables to customize log file paths and names - [Log Levels](/1.1/documentation/logging/logs-level.md): Configure FastBCP log levels - [OpenTelemetry](/1.1/documentation/logging/OpenTelemetry.md): Configure OpenTelemetry tracing and log export in FastBCP - [Logging Overview](/1.1/documentation/logging/Overview.md): Overview of FastBCP logging configuration ### installation Instructions - [Installation](/1.1/installation.md): Instructions ### integration - [Apache Airflow](/1.1/integration/airflow-integration.md): Apache Airflow is a powerful open-source platform for developing, scheduling, and monitoring batch-oriented workflows. FastBCP can be seamlessly integrated into Airflow DAGs using the Docker operator and its official Docker image. - [Docker](/1.1/integration/docker-integration.md): Minimal, production-ready container image to run FastBCP, a high-performance bulk copy utility designed for data integration and automation workflows. - [Kestra](/1.1/integration/kestra-integration.md): Kestra is a powerful open-source orchestration platform that can be used to automate and schedule FastBCP data export workflows. FastBCP can be seamlessly integrated into Kestra flows using its Docker image. - [PostgreSQL](/1.1/integration/postgresql-integration.md): The pg_fastbcp extension allows you to run the FastBCP tool directly from an SQL function, enabling fast data export from databases to various formats (CSV, Parquet) and cloud storage directly from PostgreSQL. ### release-notes - [Release Notes 0.32](/1.1/release-notes/release-notes-0.32.md): What's new in FastBCP 0.32 - [Release Notes 1.0](/1.1/release-notes/release-notes-1.0.md): What's new in FastBCP 1.0 - [Release Notes 1.1](/1.1/release-notes/release-notes-1.1.md): What's new in FastBCP 1.1 ### sitemap Complete documentation structure - [Sitemap](/1.1/sitemap.md): Complete documentation structure ### wizard Interactive wizard to build FastBCP commands - [FastBCP Command Wizard](/1.1/wizard.md): Interactive wizard to build FastBCP commands ## 1.2 Your first FastBCP export - [Getting Started with FastBCP](/1.2.md): Your first FastBCP export ### ai - [FastBCP Agent Skill](/1.2/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 FastBCP command lines ### datatypes-conversion - [SQL Server (ADBC) → Parquet](/1.2/datatypes-conversion/mssql/adbc-parquet.md): SQL Server (ADBC) to Parquet datatypes conversion reference - [SQL Server → Parquet](/1.2/datatypes-conversion/mssql/parquet.md): SQL Server to Parquet datatypes conversion reference - [MySQL → Parquet](/1.2/datatypes-conversion/mysql/parquet.md): MySQL to Parquet datatypes conversion reference - [Oracle (ADBC) → Parquet](/1.2/datatypes-conversion/oracle/adbc-parquet.md): Oracle (ADBC) to Parquet datatypes conversion reference - [Oracle → Parquet](/1.2/datatypes-conversion/oracle/parquet.md): Oracle to Parquet datatypes conversion reference - [Datatypes Conversion](/1.2/datatypes-conversion/overview.md): How FastBCP maps native source datatypes to Parquet, per database and connection type - [PostgreSQL COPY → Parquet](/1.2/datatypes-conversion/postgresql-copy/parquet.md): PostgreSQL COPY to Parquet datatypes conversion reference - [PostgreSQL (ADBC) → Parquet](/1.2/datatypes-conversion/postgresql/adbc-parquet.md): PostgreSQL (ADBC) to Parquet datatypes conversion reference - [PostgreSQL → Parquet](/1.2/datatypes-conversion/postgresql/parquet.md): PostgreSQL to Parquet datatypes conversion reference - [SAP HANA → Parquet](/1.2/datatypes-conversion/saphana/parquet.md): SAP HANA to Parquet datatypes conversion reference - [Teradata → Parquet](/1.2/datatypes-conversion/teradata/parquet.md): Teradata to Parquet datatypes conversion reference ### documentation - [Advanced Parameters](/1.2/documentation/cli/advanced_parameters.md): Advanced configuration options for FastBCP - [Authentication](/1.2/documentation/cli/authentication.md): FastBCP authentication methods and security - [Cloud Options](/1.2/documentation/cli/cloud_options.md): Configure AWS, Azure, and Google Cloud authentication and storage - [Connection Parameters](/1.2/documentation/cli/connection_parameters.md): Server, database, and connection string configuration - [CSV Formatting](/1.2/documentation/cli/csv_formatting.md): Configure CSV output format and delimiters - [License](/1.2/documentation/cli/license.md): License configuration for FastBCP - [Output Info](/1.2/documentation/cli/output_info.md): Directory, filename, and output configuration - [Parallel Parameters](/1.2/documentation/cli/parallel_parameters.md): Configure parallel export to improve performance - [Parquet Formatting](/1.2/documentation/cli/parquet_formatting.md): Configure Parquet compression and options - [Source Info](/1.2/documentation/cli/source_info.md): Query, input file, and table parameters for data extraction - [AWS S3 Configuration](/1.2/documentation/cloud-connectivity/aws-s3.md): Configure AWS S3 authentication and connectivity - [Azure Configuration](/1.2/documentation/cloud-connectivity/azure.md): Configure Azure Blob Storage and Data Lake Gen2 connectivity - [Google Cloud Storage Configuration](/1.2/documentation/cloud-connectivity/google-cloud.md): Configure Google Cloud Storage authentication and connectivity - [OneLake Configuration](/1.2/documentation/cloud-connectivity/onelake.md): Configure OneLake authentication and connectivity - [Cloud Connectivity Overview](/1.2/documentation/cloud-connectivity/overview.md): Cloud connectivity overview for AWS, Azure, and Google Cloud - [Operating Systems](/1.2/documentation/compatibility/operating_systems.md): Supported operating systems and platform requirements - [Database Sources & Platforms](/1.2/documentation/compatibility/sources_platforms.md): Supported databases, connection types, and platform compatibility - [FASTBCP_ADBC_BATCHCELLS](/1.2/documentation/environment-variables/fastbcp-adbc-batchcells.md): Configure the ADBC record batch size in cells - [FASTBCP_CLOUD_ISBUFFERED](/1.2/documentation/environment-variables/fastbcp-cloud-isbuffered.md): Enable buffered cloud uploads for better performance - [FASTBCP_CLOUD_MAXUPLOADTHREAD_PER_STREAM](/1.2/documentation/environment-variables/fastbcp-cloud-maxuploadthread-per-stream.md): Control parallel upload threads for cloud storage - [FASTBCP_DATEFORMAT](/1.2/documentation/environment-variables/fastbcp-dateformat.md): Control the string format used for date-to-string conversion - [FASTBCP_PERFORMANCE_COLLECT](/1.2/documentation/environment-variables/fastbcp-performance-collect.md): Enable collection of performance information during the run - [FASTBCP_RGSIZE](/1.2/documentation/environment-variables/fastbcp-rgsize.md): Configure Parquet row group size - [FASTBCP_SYSTEMINFO_COLLECT](/1.2/documentation/environment-variables/fastbcp-systeminfo-collect.md): Enable collection of system information during the run - [FASTBCP_TMPPATH](/1.2/documentation/environment-variables/fastbcp-tmppath.md): Configure temporary file location for buffered cloud uploads - [FASTBCP_UID_STRING_CASING](/1.2/documentation/environment-variables/fastbcp-uid-string-casing.md): Control casing for UID-to-string conversion - [Environment Variables Overview](/1.2/documentation/environment-variables/overview.md): Overview of all FastBCP environment variables - [Advanced Scenarios](/1.2/documentation/examples/advanced-scenarios.md): Advanced use cases and troubleshooting examples - [Cloud Storage Examples](/1.2/documentation/examples/cloud-storage.md): Export examples for cloud storage destinations (S3, Azure) - [DB2 Examples](/1.2/documentation/examples/db2.md): Export examples for IBM DB2 databases via ODBC - [MySQL Examples](/1.2/documentation/examples/mysql.md): Export examples for MySQL databases - [Oracle Examples](/1.2/documentation/examples/oracle.md): Export examples for Oracle databases - [Other Databases](/1.2/documentation/examples/other-databases.md): Export examples for Clickhouse, SAP HANA, and Netezza - [Output Formats](/1.2/documentation/examples/output-formats.md): Examples for different output formats (CSV, Parquet, Excel) - [PostgreSQL Examples](/1.2/documentation/examples/postgresql.md): Export examples for PostgreSQL databases - [SQL Server Examples](/1.2/documentation/examples/sql-server.md): Export examples for SQL Server databases - [Configuration Examples](/1.2/documentation/logging/examples.md): Sample FastBCP_settings.json configurations - [Log Database](/1.2/documentation/logging/log-database.md): Configure database logging in FastBCP - [Log Files Names Mapping using variables](/1.2/documentation/logging/log-files-names-mapping-using-variables.md): Use variables to customize log file paths and names - [Log Levels](/1.2/documentation/logging/logs-level.md): Configure FastBCP log levels - [OpenTelemetry](/1.2/documentation/logging/OpenTelemetry.md): Configure OpenTelemetry tracing and log export in FastBCP - [Logging Overview](/1.2/documentation/logging/Overview.md): Overview of FastBCP logging configuration ### installation Instructions - [Installation](/1.2/installation.md): Instructions ### integration - [Apache Airflow](/1.2/integration/airflow-integration.md): Apache Airflow is a powerful open-source platform for developing, scheduling, and monitoring batch-oriented workflows. FastBCP can be seamlessly integrated into Airflow DAGs using the Docker operator and its official Docker image. - [Docker](/1.2/integration/docker-integration.md): Minimal, production-ready container image to run FastBCP, a high-performance bulk copy utility designed for data integration and automation workflows. - [Kestra](/1.2/integration/kestra-integration.md): Kestra is a powerful open-source orchestration platform that can be used to automate and schedule FastBCP data export workflows. FastBCP can be seamlessly integrated into Kestra flows using its Docker image. - [PostgreSQL](/1.2/integration/postgresql-integration.md): The pg_fastbcp extension allows you to run the FastBCP tool directly from an SQL function, enabling fast data export from databases to various formats (CSV, Parquet) and cloud storage directly from PostgreSQL. ### release-notes - [Release Notes 0.32](/1.2/release-notes/release-notes-0.32.md): What's new in FastBCP 0.32 - [Release Notes 1.0](/1.2/release-notes/release-notes-1.0.md): What's new in FastBCP 1.0 - [Release Notes 1.1](/1.2/release-notes/release-notes-1.1.md): What's new in FastBCP 1.1 - [Release Notes 1.2](/1.2/release-notes/release-notes-1.2.md): What's new in FastBCP 1.2 ### sitemap Complete documentation structure - [Sitemap](/1.2/sitemap.md): Complete documentation structure ### wizard Interactive wizard to build FastBCP commands - [FastBCP Command Wizard](/1.2/wizard.md): Interactive wizard to build FastBCP commands ## 1.3 Your first FastBCP export - [Getting Started with FastBCP](/1.3.md): Your first FastBCP export ### ai - [FastBCP Agent Skill](/1.3/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 FastBCP command lines ### datatypes-conversion - [SQL Server (ADBC) → Parquet](/1.3/datatypes-conversion/mssql/adbc-parquet.md): SQL Server (ADBC) to Parquet datatypes conversion reference - [SQL Server → Parquet](/1.3/datatypes-conversion/mssql/parquet.md): SQL Server to Parquet datatypes conversion reference - [MySQL → Parquet](/1.3/datatypes-conversion/mysql/parquet.md): MySQL to Parquet datatypes conversion reference - [Oracle (ADBC) → Parquet](/1.3/datatypes-conversion/oracle/adbc-parquet.md): Oracle (ADBC) to Parquet datatypes conversion reference - [Oracle → Parquet](/1.3/datatypes-conversion/oracle/parquet.md): Oracle to Parquet datatypes conversion reference - [Datatypes Conversion](/1.3/datatypes-conversion/overview.md): How FastBCP maps native source datatypes to Parquet, per database and connection type - [PostgreSQL COPY → Parquet](/1.3/datatypes-conversion/postgresql-copy/parquet.md): PostgreSQL COPY to Parquet datatypes conversion reference - [PostgreSQL (ADBC) → Parquet](/1.3/datatypes-conversion/postgresql/adbc-parquet.md): PostgreSQL (ADBC) to Parquet datatypes conversion reference - [PostgreSQL → Parquet](/1.3/datatypes-conversion/postgresql/parquet.md): PostgreSQL to Parquet datatypes conversion reference - [SAP HANA → Parquet](/1.3/datatypes-conversion/saphana/parquet.md): SAP HANA to Parquet datatypes conversion reference - [Teradata → Parquet](/1.3/datatypes-conversion/teradata/parquet.md): Teradata to Parquet datatypes conversion reference ### documentation - [Advanced Parameters](/1.3/documentation/cli/advanced_parameters.md): Advanced configuration options for FastBCP - [Authentication](/1.3/documentation/cli/authentication.md): FastBCP authentication methods and security - [Cloud Options](/1.3/documentation/cli/cloud_options.md): Configure AWS, Azure, and Google Cloud authentication and storage - [Connection Parameters](/1.3/documentation/cli/connection_parameters.md): Server, database, and connection string configuration - [CSV Formatting](/1.3/documentation/cli/csv_formatting.md): Configure CSV output format and delimiters - [License](/1.3/documentation/cli/license.md): License configuration for FastBCP - [Output Info](/1.3/documentation/cli/output_info.md): Directory, filename, and output configuration - [Parallel Parameters](/1.3/documentation/cli/parallel_parameters.md): Configure parallel export to improve performance - [Parquet Formatting](/1.3/documentation/cli/parquet_formatting.md): Configure Parquet compression and options - [Source Info](/1.3/documentation/cli/source_info.md): Query, input file, and table parameters for data extraction - [AWS S3 Configuration](/1.3/documentation/cloud-connectivity/aws-s3.md): Configure AWS S3 authentication and connectivity - [Azure Configuration](/1.3/documentation/cloud-connectivity/azure.md): Configure Azure Blob Storage and Data Lake Gen2 connectivity - [Google Cloud Storage Configuration](/1.3/documentation/cloud-connectivity/google-cloud.md): Configure Google Cloud Storage authentication and connectivity - [OneLake Configuration](/1.3/documentation/cloud-connectivity/onelake.md): Configure OneLake authentication and connectivity - [Cloud Connectivity Overview](/1.3/documentation/cloud-connectivity/overview.md): Cloud connectivity overview for AWS, Azure, and Google Cloud - [Operating Systems](/1.3/documentation/compatibility/operating_systems.md): Supported operating systems and platform requirements - [Database Sources & Platforms](/1.3/documentation/compatibility/sources_platforms.md): Supported databases, connection types, and platform compatibility - [FASTBCP_ADBC_BATCHCELLS](/1.3/documentation/environment-variables/fastbcp-adbc-batchcells.md): Configure the ADBC record batch size in cells - [FASTBCP_CLOUD_ISBUFFERED](/1.3/documentation/environment-variables/fastbcp-cloud-isbuffered.md): Enable buffered cloud uploads for better performance - [FASTBCP_CLOUD_MAXUPLOADTHREAD_PER_STREAM](/1.3/documentation/environment-variables/fastbcp-cloud-maxuploadthread-per-stream.md): Control parallel upload threads for cloud storage - [FASTBCP_DATEFORMAT](/1.3/documentation/environment-variables/fastbcp-dateformat.md): Control the string format used for date-to-string conversion - [FASTBCP_DBPARTITION_TARGET_MODE](/1.3/documentation/environment-variables/fastbcp-dbpartition-target-mode.md): Choose the output file layout of the DBPartition parallel method - [FASTBCP_PERFORMANCE_COLLECT](/1.3/documentation/environment-variables/fastbcp-performance-collect.md): Enable collection of performance information during the run - [FASTBCP_RGSIZE](/1.3/documentation/environment-variables/fastbcp-rgsize.md): Configure Parquet row group size - [FASTBCP_SYSTEMINFO_COLLECT](/1.3/documentation/environment-variables/fastbcp-systeminfo-collect.md): Enable collection of system information during the run - [FASTBCP_TMPPATH](/1.3/documentation/environment-variables/fastbcp-tmppath.md): Configure temporary file location for buffered cloud uploads - [FASTBCP_UID_STRING_CASING](/1.3/documentation/environment-variables/fastbcp-uid-string-casing.md): Control casing for UID-to-string conversion - [Environment Variables Overview](/1.3/documentation/environment-variables/overview.md): Overview of all FastBCP environment variables - [Advanced Scenarios](/1.3/documentation/examples/advanced-scenarios.md): Advanced use cases and troubleshooting examples - [Cloud Storage Examples](/1.3/documentation/examples/cloud-storage.md): Export examples for cloud storage destinations (S3, Azure) - [DB2 Examples](/1.3/documentation/examples/db2.md): Export examples for IBM DB2 databases via ODBC - [MySQL Examples](/1.3/documentation/examples/mysql.md): Export examples for MySQL databases - [Oracle Examples](/1.3/documentation/examples/oracle.md): Export examples for Oracle databases - [Other Databases](/1.3/documentation/examples/other-databases.md): Export examples for Clickhouse, SAP HANA, and Netezza - [Output Formats](/1.3/documentation/examples/output-formats.md): Examples for different output formats (CSV, Parquet, Excel) - [PostgreSQL Examples](/1.3/documentation/examples/postgresql.md): Export examples for PostgreSQL databases - [SQL Server Examples](/1.3/documentation/examples/sql-server.md): Export examples for SQL Server databases - [Configuration Examples](/1.3/documentation/logging/examples.md): Sample FastBCP_settings.json configurations - [Log Database](/1.3/documentation/logging/log-database.md): Configure database logging in FastBCP - [Log Files Names Mapping using variables](/1.3/documentation/logging/log-files-names-mapping-using-variables.md): Use variables to customize log file paths and names - [Log Levels](/1.3/documentation/logging/logs-level.md): Configure FastBCP log levels - [OpenTelemetry](/1.3/documentation/logging/OpenTelemetry.md): Configure OpenTelemetry tracing and log export in FastBCP - [Logging Overview](/1.3/documentation/logging/Overview.md): Overview of FastBCP logging configuration ### installation Instructions - [Installation](/1.3/installation.md): Instructions ### integration - [Apache Airflow](/1.3/integration/airflow-integration.md): Apache Airflow is a powerful open-source platform for developing, scheduling, and monitoring batch-oriented workflows. FastBCP can be seamlessly integrated into Airflow DAGs using the Docker operator and its official Docker image. - [Docker](/1.3/integration/docker-integration.md): Minimal, production-ready container image to run FastBCP, a high-performance bulk copy utility designed for data integration and automation workflows. - [Kestra](/1.3/integration/kestra-integration.md): Kestra is a powerful open-source orchestration platform that can be used to automate and schedule FastBCP data export workflows. FastBCP can be seamlessly integrated into Kestra flows using its Docker image. - [PostgreSQL](/1.3/integration/postgresql-integration.md): The pg_fastbcp extension allows you to run the FastBCP tool directly from an SQL function, enabling fast data export from databases to various formats (CSV, Parquet) and cloud storage directly from PostgreSQL. ### release-notes - [Release Notes 0.32](/1.3/release-notes/release-notes-0.32.md): What's new in FastBCP 0.32 - [Release Notes 1.0](/1.3/release-notes/release-notes-1.0.md): What's new in FastBCP 1.0 - [Release Notes 1.1](/1.3/release-notes/release-notes-1.1.md): What's new in FastBCP 1.1 - [Release Notes 1.2](/1.3/release-notes/release-notes-1.2.md): What's new in FastBCP 1.2 - [Release Notes 1.3](/1.3/release-notes/release-notes-1.3.md): What's new in FastBCP 1.3 ### sitemap Complete documentation structure - [Sitemap](/1.3/sitemap.md): Complete documentation structure ### wizard Interactive wizard to build FastBCP commands - [FastBCP Command Wizard](/1.3/wizard.md): Interactive wizard to build FastBCP commands ## 1.4 Your first FastBCP export - [Getting Started with FastBCP](/1.4.md): Your first FastBCP export ### ai - [FastBCP Agent Skill](/1.4/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 FastBCP command lines - [FastBCP MCP Server](/1.4/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 FastBCP commands ### datatypes-conversion - [SQL Server (ADBC) → Parquet](/1.4/datatypes-conversion/mssql/adbc-parquet.md): SQL Server (ADBC) to Parquet datatypes conversion reference - [SQL Server → Parquet](/1.4/datatypes-conversion/mssql/parquet.md): SQL Server to Parquet datatypes conversion reference - [MySQL → Parquet](/1.4/datatypes-conversion/mysql/parquet.md): MySQL to Parquet datatypes conversion reference - [Oracle (ADBC) → Parquet](/1.4/datatypes-conversion/oracle/adbc-parquet.md): Oracle (ADBC) to Parquet datatypes conversion reference - [Oracle → Parquet](/1.4/datatypes-conversion/oracle/parquet.md): Oracle to Parquet datatypes conversion reference - [Datatypes Conversion](/1.4/datatypes-conversion/overview.md): How FastBCP maps native source datatypes to Parquet, per database and connection type - [PostgreSQL COPY → Parquet](/1.4/datatypes-conversion/postgresql-copy/parquet.md): PostgreSQL COPY to Parquet datatypes conversion reference - [PostgreSQL (ADBC) → Parquet](/1.4/datatypes-conversion/postgresql/adbc-parquet.md): PostgreSQL (ADBC) to Parquet datatypes conversion reference - [PostgreSQL → Parquet](/1.4/datatypes-conversion/postgresql/parquet.md): PostgreSQL to Parquet datatypes conversion reference - [SAP HANA → Parquet](/1.4/datatypes-conversion/saphana/parquet.md): SAP HANA to Parquet datatypes conversion reference - [Teradata → Parquet](/1.4/datatypes-conversion/teradata/parquet.md): Teradata to Parquet datatypes conversion reference ### documentation - [Advanced Parameters](/1.4/documentation/cli/advanced_parameters.md): Advanced configuration options for FastBCP - [Authentication](/1.4/documentation/cli/authentication.md): FastBCP authentication methods and security - [Cloud Options](/1.4/documentation/cli/cloud_options.md): Configure AWS, Azure, and Google Cloud authentication and storage - [Connection Parameters](/1.4/documentation/cli/connection_parameters.md): Server, database, and connection string configuration - [CSV Formatting](/1.4/documentation/cli/csv_formatting.md): Configure CSV output format and delimiters - [License](/1.4/documentation/cli/license.md): License configuration for FastBCP - [Output Info](/1.4/documentation/cli/output_info.md): Directory, filename, and output configuration - [Parallel Parameters](/1.4/documentation/cli/parallel_parameters.md): Configure parallel export to improve performance - [Parquet Formatting](/1.4/documentation/cli/parquet_formatting.md): Configure Parquet compression and options - [Source Info](/1.4/documentation/cli/source_info.md): Query, input file, and table parameters for data extraction - [AWS S3 Configuration](/1.4/documentation/cloud-connectivity/aws-s3.md): Configure AWS S3 authentication and connectivity - [Azure Configuration](/1.4/documentation/cloud-connectivity/azure.md): Configure Azure Blob Storage and Data Lake Gen2 connectivity - [Google Cloud Storage Configuration](/1.4/documentation/cloud-connectivity/google-cloud.md): Configure Google Cloud Storage authentication and connectivity - [OneLake Configuration](/1.4/documentation/cloud-connectivity/onelake.md): Configure OneLake authentication and connectivity - [Cloud Connectivity Overview](/1.4/documentation/cloud-connectivity/overview.md): Cloud connectivity overview for AWS, Azure, and Google Cloud - [Operating Systems](/1.4/documentation/compatibility/operating_systems.md): Supported operating systems and platform requirements - [Database Sources & Platforms](/1.4/documentation/compatibility/sources_platforms.md): Supported databases, connection types, and platform compatibility - [FASTBCP_ADBC_BATCHCELLS](/1.4/documentation/environment-variables/fastbcp-adbc-batchcells.md): Configure the ADBC record batch size in cells - [FASTBCP_CLOUD_ISBUFFERED](/1.4/documentation/environment-variables/fastbcp-cloud-isbuffered.md): Enable buffered cloud uploads for better performance - [FASTBCP_CLOUD_MAXUPLOADTHREAD_PER_STREAM](/1.4/documentation/environment-variables/fastbcp-cloud-maxuploadthread-per-stream.md): Control parallel upload threads for cloud storage - [FASTBCP_DATEFORMAT](/1.4/documentation/environment-variables/fastbcp-dateformat.md): Control the string format used for date-to-string conversion - [FASTBCP_DBPARTITION_TARGET_MODE](/1.4/documentation/environment-variables/fastbcp-dbpartition-target-mode.md): Choose the output file layout of the DBPartition parallel method - [FASTBCP_PERFORMANCE_COLLECT](/1.4/documentation/environment-variables/fastbcp-performance-collect.md): Enable collection of performance information during the run - [FASTBCP_RGSIZE](/1.4/documentation/environment-variables/fastbcp-rgsize.md): Configure Parquet row group size - [FASTBCP_SYSTEMINFO_COLLECT](/1.4/documentation/environment-variables/fastbcp-systeminfo-collect.md): Enable collection of system information during the run - [FASTBCP_TMPPATH](/1.4/documentation/environment-variables/fastbcp-tmppath.md): Configure temporary file location for buffered cloud uploads - [FASTBCP_TTU_PATH](/1.4/documentation/environment-variables/fastbcp-ttu-path.md): Point the adbc_teradata connector to a Teradata Tools and Utilities (TTU) folder on Linux - [FASTBCP_UID_STRING_CASING](/1.4/documentation/environment-variables/fastbcp-uid-string-casing.md): Control casing for UID-to-string conversion - [Environment Variables Overview](/1.4/documentation/environment-variables/overview.md): Overview of all FastBCP environment variables - [Advanced Scenarios](/1.4/documentation/examples/advanced-scenarios.md): Advanced use cases and troubleshooting examples - [Cloud Storage Examples](/1.4/documentation/examples/cloud-storage.md): Export examples for cloud storage destinations (S3, Azure) - [DB2 Examples](/1.4/documentation/examples/db2.md): Export examples for IBM DB2 databases via ODBC - [MySQL Examples](/1.4/documentation/examples/mysql.md): Export examples for MySQL databases - [Oracle Examples](/1.4/documentation/examples/oracle.md): Export examples for Oracle databases - [Other Databases](/1.4/documentation/examples/other-databases.md): Export examples for Clickhouse, SAP HANA, Netezza and Teradata - [Output Formats](/1.4/documentation/examples/output-formats.md): Examples for different output formats (CSV, Parquet, Excel) - [PostgreSQL Examples](/1.4/documentation/examples/postgresql.md): Export examples for PostgreSQL databases - [SQL Server Examples](/1.4/documentation/examples/sql-server.md): Export examples for SQL Server databases - [Configuration Examples](/1.4/documentation/logging/examples.md): Sample FastBCP_settings.json configurations - [Log Database](/1.4/documentation/logging/log-database.md): Configure database logging in FastBCP - [Log Files Names Mapping using variables](/1.4/documentation/logging/log-files-names-mapping-using-variables.md): Use variables to customize log file paths and names - [Log Levels](/1.4/documentation/logging/logs-level.md): Configure FastBCP log levels - [OpenTelemetry](/1.4/documentation/logging/OpenTelemetry.md): Configure OpenTelemetry tracing and log export in FastBCP - [Logging Overview](/1.4/documentation/logging/Overview.md): Overview of FastBCP logging configuration ### installation Instructions - [Installation](/1.4/installation.md): Instructions ### integration - [Apache Airflow](/1.4/integration/airflow-integration.md): Apache Airflow is a powerful open-source platform for developing, scheduling, and monitoring batch-oriented workflows. FastBCP can be seamlessly integrated into Airflow DAGs using the Docker operator and its official Docker image. - [Docker](/1.4/integration/docker-integration.md): Minimal, production-ready container image to run FastBCP, a high-performance bulk copy utility designed for data integration and automation workflows. - [Kestra](/1.4/integration/kestra-integration.md): Kestra is a powerful open-source orchestration platform that can be used to automate and schedule FastBCP data export workflows. FastBCP can be seamlessly integrated into Kestra flows using its Docker image. - [PostgreSQL](/1.4/integration/postgresql-integration.md): The pg_fastbcp extension allows you to run the FastBCP tool directly from an SQL function, enabling fast data export from databases to various formats (CSV, Parquet) and cloud storage directly from PostgreSQL. ### release-notes - [Release Notes 0.32](/1.4/release-notes/release-notes-0.32.md): What's new in FastBCP 0.32 - [Release Notes 1.0](/1.4/release-notes/release-notes-1.0.md): What's new in FastBCP 1.0 - [Release Notes 1.1](/1.4/release-notes/release-notes-1.1.md): What's new in FastBCP 1.1 - [Release Notes 1.2](/1.4/release-notes/release-notes-1.2.md): What's new in FastBCP 1.2 - [Release Notes 1.3](/1.4/release-notes/release-notes-1.3.md): What's new in FastBCP 1.3 - [Release Notes 1.4](/1.4/release-notes/release-notes-1.4.md): FastBCP 1.4: one Physical parallel method for every engine, ADBC Teradata without client software, and SQL Server Physloc exports up to 2.6× faster. ### sitemap Complete documentation structure - [Sitemap](/1.4/sitemap.md): Complete documentation structure ### wizard Interactive wizard to build FastBCP commands - [FastBCP Command Wizard](/1.4/wizard.md): Interactive wizard to build FastBCP commands ## 1.5 Your first FastBCP export - [Getting Started with FastBCP](/1.5.md): Your first FastBCP export ### ai - [FastBCP Agent Skill](/1.5/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 FastBCP command lines - [FastBCP MCP Server](/1.5/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 FastBCP commands ### datatypes-conversion - [SQL Server (ADBC) → Parquet](/1.5/datatypes-conversion/mssql/adbc-parquet.md): SQL Server (ADBC) to Parquet datatypes conversion reference - [SQL Server backup files → Parquet](/1.5/datatypes-conversion/mssql/backup-parquet.md): SQL Server backup files (.bak, backup_mssql) to Parquet datatypes conversion reference - [SQL Server → Parquet](/1.5/datatypes-conversion/mssql/parquet.md): SQL Server to Parquet datatypes conversion reference - [MySQL → Parquet](/1.5/datatypes-conversion/mysql/parquet.md): MySQL to Parquet datatypes conversion reference - [Oracle (ADBC) → Parquet](/1.5/datatypes-conversion/oracle/adbc-parquet.md): Oracle (ADBC) to Parquet datatypes conversion reference - [Oracle → Parquet](/1.5/datatypes-conversion/oracle/parquet.md): Oracle to Parquet datatypes conversion reference - [Datatypes Conversion](/1.5/datatypes-conversion/overview.md): How FastBCP maps native source datatypes to Parquet, per database and connection type - [PostgreSQL COPY → Parquet](/1.5/datatypes-conversion/postgresql-copy/parquet.md): PostgreSQL COPY to Parquet datatypes conversion reference - [PostgreSQL (ADBC) → Parquet](/1.5/datatypes-conversion/postgresql/adbc-parquet.md): PostgreSQL (ADBC) to Parquet datatypes conversion reference - [PostgreSQL → Parquet](/1.5/datatypes-conversion/postgresql/parquet.md): PostgreSQL to Parquet datatypes conversion reference - [SAP HANA → Parquet](/1.5/datatypes-conversion/saphana/parquet.md): SAP HANA to Parquet datatypes conversion reference - [Teradata → Parquet](/1.5/datatypes-conversion/teradata/parquet.md): Teradata to Parquet datatypes conversion reference ### documentation - [Advanced Parameters](/1.5/documentation/cli/advanced_parameters.md): Advanced configuration options for FastBCP - [Authentication](/1.5/documentation/cli/authentication.md): FastBCP authentication methods and security - [Cloud Options](/1.5/documentation/cli/cloud_options.md): Configure AWS, Azure, and Google Cloud authentication and storage - [Connection Parameters](/1.5/documentation/cli/connection_parameters.md): Server, database, and connection string configuration - [CSV Formatting](/1.5/documentation/cli/csv_formatting.md): Configure CSV output format and delimiters - [License](/1.5/documentation/cli/license.md): License configuration for FastBCP - [Output Info](/1.5/documentation/cli/output_info.md): Directory, filename, and output configuration - [Parallel Parameters](/1.5/documentation/cli/parallel_parameters.md): Configure parallel export to improve performance - [Parquet Formatting](/1.5/documentation/cli/parquet_formatting.md): Configure Parquet compression and options - [Source Info](/1.5/documentation/cli/source_info.md): Query, input file, and table parameters for data extraction - [AWS S3 Configuration](/1.5/documentation/cloud-connectivity/aws-s3.md): Configure AWS S3 authentication and connectivity - [Azure Configuration](/1.5/documentation/cloud-connectivity/azure.md): Configure Azure Blob Storage and Data Lake Gen2 connectivity - [Google Cloud Storage Configuration](/1.5/documentation/cloud-connectivity/google-cloud.md): Configure Google Cloud Storage authentication and connectivity - [OneLake Configuration](/1.5/documentation/cloud-connectivity/onelake.md): Configure OneLake authentication and connectivity - [Cloud Connectivity Overview](/1.5/documentation/cloud-connectivity/overview.md): Cloud connectivity overview for AWS, Azure, and Google Cloud - [Operating Systems](/1.5/documentation/compatibility/operating_systems.md): Supported operating systems and platform requirements - [Database Sources & Platforms](/1.5/documentation/compatibility/sources_platforms.md): Supported databases, connection types, and platform compatibility - [FASTBCP_ADBC_BATCHCELLS](/1.5/documentation/environment-variables/fastbcp-adbc-batchcells.md): Configure the ADBC record batch size in cells - [FASTBCP_CLOUD_ISBUFFERED](/1.5/documentation/environment-variables/fastbcp-cloud-isbuffered.md): Enable buffered cloud uploads for better performance - [FASTBCP_CLOUD_MAXUPLOADTHREAD_PER_STREAM](/1.5/documentation/environment-variables/fastbcp-cloud-maxuploadthread-per-stream.md): Control parallel upload threads for cloud storage - [FASTBCP_DATEFORMAT](/1.5/documentation/environment-variables/fastbcp-dateformat.md): Control the string format used for date-to-string conversion - [FASTBCP_DBPARTITION_TARGET_MODE](/1.5/documentation/environment-variables/fastbcp-dbpartition-target-mode.md): Choose the output file layout of the DBPartition parallel method - [FASTBCP_PERFORMANCE_COLLECT](/1.5/documentation/environment-variables/fastbcp-performance-collect.md): Enable collection of performance information during the run - [FASTBCP_RGSIZE](/1.5/documentation/environment-variables/fastbcp-rgsize.md): Configure Parquet row group size - [FASTBCP_SYSTEMINFO_COLLECT](/1.5/documentation/environment-variables/fastbcp-systeminfo-collect.md): Enable collection of system information during the run - [FASTBCP_TMPPATH](/1.5/documentation/environment-variables/fastbcp-tmppath.md): Configure temporary file location for buffered cloud uploads - [FASTBCP_TTU_PATH](/1.5/documentation/environment-variables/fastbcp-ttu-path.md): Point the adbc_teradata connector to a Teradata Tools and Utilities (TTU) folder on Linux - [FASTBCP_UID_STRING_CASING](/1.5/documentation/environment-variables/fastbcp-uid-string-casing.md): Control casing for UID-to-string conversion - [Environment Variables Overview](/1.5/documentation/environment-variables/overview.md): Overview of all FastBCP environment variables - [Advanced Scenarios](/1.5/documentation/examples/advanced-scenarios.md): Advanced use cases and troubleshooting examples - [Cloud Storage Examples](/1.5/documentation/examples/cloud-storage.md): Export examples for cloud storage destinations (S3, Azure) - [DB2 Examples](/1.5/documentation/examples/db2.md): Export examples for IBM DB2 databases via ODBC - [MySQL Examples](/1.5/documentation/examples/mysql.md): Export examples for MySQL databases - [Oracle Examples](/1.5/documentation/examples/oracle.md): Export examples for Oracle databases - [Other Databases](/1.5/documentation/examples/other-databases.md): Export examples for Clickhouse, SAP HANA, Netezza and Teradata - [Output Formats](/1.5/documentation/examples/output-formats.md): Examples for different output formats (CSV, Parquet, Excel) - [PostgreSQL Examples](/1.5/documentation/examples/postgresql.md): Export examples for PostgreSQL databases - [SQL Server Examples](/1.5/documentation/examples/sql-server.md): Export examples for SQL Server databases - [Configuration Examples](/1.5/documentation/logging/examples.md): Sample FastBCP_settings.json configurations - [Log Database](/1.5/documentation/logging/log-database.md): Configure database logging in FastBCP - [Log Files Names Mapping using variables](/1.5/documentation/logging/log-files-names-mapping-using-variables.md): Use variables to customize log file paths and names - [Log Levels](/1.5/documentation/logging/logs-level.md): Configure FastBCP log levels - [OpenTelemetry](/1.5/documentation/logging/OpenTelemetry.md): Configure OpenTelemetry tracing and log export in FastBCP - [Logging Overview](/1.5/documentation/logging/Overview.md): Overview of FastBCP logging configuration ### installation Instructions - [Installation](/1.5/installation.md): Instructions ### integration - [Apache Airflow](/1.5/integration/airflow-integration.md): Apache Airflow is a powerful open-source platform for developing, scheduling, and monitoring batch-oriented workflows. FastBCP can be seamlessly integrated into Airflow DAGs using the Docker operator and its official Docker image. - [Docker](/1.5/integration/docker-integration.md): Minimal, production-ready container image to run FastBCP, a high-performance bulk copy utility designed for data integration and automation workflows. - [Kestra](/1.5/integration/kestra-integration.md): Kestra is a powerful open-source orchestration platform that can be used to automate and schedule FastBCP data export workflows. FastBCP can be seamlessly integrated into Kestra flows using its Docker image. - [PostgreSQL](/1.5/integration/postgresql-integration.md): The pg_fastbcp extension allows you to run the FastBCP tool directly from an SQL function, enabling fast data export from databases to various formats (CSV, Parquet) and cloud storage directly from PostgreSQL. ### release-notes - [Release Notes 0.32](/1.5/release-notes/release-notes-0.32.md): What's new in FastBCP 0.32 - [Release Notes 1.0](/1.5/release-notes/release-notes-1.0.md): What's new in FastBCP 1.0 - [Release Notes 1.1](/1.5/release-notes/release-notes-1.1.md): What's new in FastBCP 1.1 - [Release Notes 1.2](/1.5/release-notes/release-notes-1.2.md): What's new in FastBCP 1.2 - [Release Notes 1.3](/1.5/release-notes/release-notes-1.3.md): What's new in FastBCP 1.3 - [Release Notes 1.4](/1.5/release-notes/release-notes-1.4.md): FastBCP 1.4: one Physical parallel method for every engine, ADBC Teradata without client software, and SQL Server Physloc exports up to 2.6× faster. - [Release Notes 1.5](/1.5/release-notes/release-notes-1.5.md): FastBCP 1.5: export SQL Server tables straight from .bak backup files, without restoring them and without any SQL Server instance. ### sitemap Complete documentation structure - [Sitemap](/1.5/sitemap.md): Complete documentation structure ### wizard Interactive wizard to build FastBCP commands - [FastBCP Command Wizard](/1.5/wizard.md): Interactive wizard to build FastBCP commands ## 1.6 Your first FastBCP export - [Getting Started with FastBCP](/1.6.md): Your first FastBCP export ### ai - [FastBCP Agent Skill](/1.6/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 FastBCP command lines - [FastBCP MCP Server](/1.6/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 FastBCP commands ### datatypes-conversion - [SQL Server (ADBC) → Parquet](/1.6/datatypes-conversion/mssql/adbc-parquet.md): SQL Server (ADBC) to Parquet datatypes conversion reference - [SQL Server backup files → Parquet](/1.6/datatypes-conversion/mssql/backup-parquet.md): SQL Server backup files (.bak, backup_mssql) to Parquet datatypes conversion reference - [SQL Server → Parquet](/1.6/datatypes-conversion/mssql/parquet.md): SQL Server to Parquet datatypes conversion reference - [MySQL → Parquet](/1.6/datatypes-conversion/mysql/parquet.md): MySQL to Parquet datatypes conversion reference - [Oracle (ADBC) → Parquet](/1.6/datatypes-conversion/oracle/adbc-parquet.md): Oracle (ADBC) to Parquet datatypes conversion reference - [Oracle RMAN backup sets → Parquet](/1.6/datatypes-conversion/oracle/backup-parquet.md): Oracle RMAN backup sets (backup_rman) to Parquet datatypes conversion reference - [Oracle → Parquet](/1.6/datatypes-conversion/oracle/parquet.md): Oracle to Parquet datatypes conversion reference - [Datatypes Conversion](/1.6/datatypes-conversion/overview.md): How FastBCP maps native source datatypes to Parquet, per database and connection type - [PostgreSQL COPY → Parquet](/1.6/datatypes-conversion/postgresql-copy/parquet.md): PostgreSQL COPY to Parquet datatypes conversion reference - [PostgreSQL (ADBC) → Parquet](/1.6/datatypes-conversion/postgresql/adbc-parquet.md): PostgreSQL (ADBC) to Parquet datatypes conversion reference - [PostgreSQL → Parquet](/1.6/datatypes-conversion/postgresql/parquet.md): PostgreSQL to Parquet datatypes conversion reference - [SAP HANA → Parquet](/1.6/datatypes-conversion/saphana/parquet.md): SAP HANA to Parquet datatypes conversion reference - [Teradata → Parquet](/1.6/datatypes-conversion/teradata/parquet.md): Teradata to Parquet datatypes conversion reference ### documentation - [Advanced Parameters](/1.6/documentation/cli/advanced_parameters.md): Advanced configuration options for FastBCP - [Authentication](/1.6/documentation/cli/authentication.md): FastBCP authentication methods and security - [Cloud Options](/1.6/documentation/cli/cloud_options.md): Configure AWS, Azure, and Google Cloud authentication and storage - [Connection Parameters](/1.6/documentation/cli/connection_parameters.md): Server, database, and connection string configuration - [CSV Formatting](/1.6/documentation/cli/csv_formatting.md): Configure CSV output format and delimiters - [License](/1.6/documentation/cli/license.md): License configuration for FastBCP - [Output Info](/1.6/documentation/cli/output_info.md): Directory, filename, and output configuration - [Parallel Parameters](/1.6/documentation/cli/parallel_parameters.md): Configure parallel export to improve performance - [Parquet Formatting](/1.6/documentation/cli/parquet_formatting.md): Configure Parquet compression and options - [Source Info](/1.6/documentation/cli/source_info.md): Query, input file, and table parameters for data extraction - [AWS S3 Configuration](/1.6/documentation/cloud-connectivity/aws-s3.md): Configure AWS S3 authentication and connectivity - [Azure Configuration](/1.6/documentation/cloud-connectivity/azure.md): Configure Azure Blob Storage and Data Lake Gen2 connectivity - [Google Cloud Storage Configuration](/1.6/documentation/cloud-connectivity/google-cloud.md): Configure Google Cloud Storage authentication and connectivity - [OneLake Configuration](/1.6/documentation/cloud-connectivity/onelake.md): Configure OneLake authentication and connectivity - [Cloud Connectivity Overview](/1.6/documentation/cloud-connectivity/overview.md): Cloud connectivity overview for AWS, Azure, and Google Cloud - [Operating Systems](/1.6/documentation/compatibility/operating_systems.md): Supported operating systems and platform requirements - [Database Sources & Platforms](/1.6/documentation/compatibility/sources_platforms.md): Supported databases, connection types, and platform compatibility - [FASTBCP_ADBC_BATCHCELLS](/1.6/documentation/environment-variables/fastbcp-adbc-batchcells.md): Configure the ADBC record batch size in cells - [FASTBCP_BACKUP_RESTORE_MODE](/1.6/documentation/environment-variables/fastbcp-backup-restore-mode.md): Choose what FastBCP does when a SQL Server or Oracle RMAN backup that could be the newest cannot be used - [FASTBCP_BACKUP_RESTORE_POINT](/1.6/documentation/environment-variables/fastbcp-backup-restore-point.md): Choose which version of a table FastBCP reads from SQL Server backups and Oracle RMAN backups, the latest one or the last full backup - [FASTBCP_CLOUD_ISBUFFERED](/1.6/documentation/environment-variables/fastbcp-cloud-isbuffered.md): Enable buffered cloud uploads for better performance - [FASTBCP_CLOUD_MAXUPLOADTHREAD_PER_STREAM](/1.6/documentation/environment-variables/fastbcp-cloud-maxuploadthread-per-stream.md): Control parallel upload threads for cloud storage - [FASTBCP_DATEFORMAT](/1.6/documentation/environment-variables/fastbcp-dateformat.md): Control the string format used for date-to-string conversion - [FASTBCP_DBPARTITION_TARGET_MODE](/1.6/documentation/environment-variables/fastbcp-dbpartition-target-mode.md): Choose the output file layout of the DBPartition parallel method - [FASTBCP_INDEX_DIR](/1.6/documentation/environment-variables/fastbcp-index-dir.md): Choose where FastBCP keeps the index of the backups it has opened - [FASTBCP_PERFORMANCE_COLLECT](/1.6/documentation/environment-variables/fastbcp-performance-collect.md): Enable collection of performance information during the run - [FASTBCP_RGSIZE](/1.6/documentation/environment-variables/fastbcp-rgsize.md): Configure Parquet row group size - [FASTBCP_SYSTEMINFO_COLLECT](/1.6/documentation/environment-variables/fastbcp-systeminfo-collect.md): Enable collection of system information during the run - [FASTBCP_TMPPATH](/1.6/documentation/environment-variables/fastbcp-tmppath.md): Configure temporary file location for buffered cloud uploads - [FASTBCP_TTU_PATH](/1.6/documentation/environment-variables/fastbcp-ttu-path.md): Point the adbc_teradata connector to a Teradata Tools and Utilities (TTU) folder on Linux - [FASTBCP_UID_STRING_CASING](/1.6/documentation/environment-variables/fastbcp-uid-string-casing.md): Control casing for UID-to-string conversion - [Environment Variables Overview](/1.6/documentation/environment-variables/overview.md): Overview of all FastBCP environment variables - [Advanced Scenarios](/1.6/documentation/examples/advanced-scenarios.md): Advanced use cases and troubleshooting examples - [Cloud Storage Examples](/1.6/documentation/examples/cloud-storage.md): Export examples for cloud storage destinations (S3, Azure) - [DB2 Examples](/1.6/documentation/examples/db2.md): Export examples for IBM DB2 databases via ODBC - [MySQL Examples](/1.6/documentation/examples/mysql.md): Export examples for MySQL databases - [Oracle Examples](/1.6/documentation/examples/oracle.md): Export examples for Oracle databases - [Other Databases](/1.6/documentation/examples/other-databases.md): Export examples for Clickhouse, SAP HANA, Netezza and Teradata - [Output Formats](/1.6/documentation/examples/output-formats.md): Examples for different output formats (CSV, Parquet, Excel) - [PostgreSQL Examples](/1.6/documentation/examples/postgresql.md): Export examples for PostgreSQL databases - [SQL Server Examples](/1.6/documentation/examples/sql-server.md): Export examples for SQL Server databases - [Configuration Examples](/1.6/documentation/logging/examples.md): Sample FastBCP_settings.json configurations - [Log Database](/1.6/documentation/logging/log-database.md): Configure database logging in FastBCP - [Log Files Names Mapping using variables](/1.6/documentation/logging/log-files-names-mapping-using-variables.md): Use variables to customize log file paths and names - [Log Levels](/1.6/documentation/logging/logs-level.md): Configure FastBCP log levels - [OpenTelemetry](/1.6/documentation/logging/OpenTelemetry.md): Configure OpenTelemetry tracing and log export in FastBCP - [Logging Overview](/1.6/documentation/logging/Overview.md): Overview of FastBCP logging configuration ### installation Instructions - [Installation](/1.6/installation.md): Instructions ### integration - [Apache Airflow](/1.6/integration/airflow-integration.md): Apache Airflow is a powerful open-source platform for developing, scheduling, and monitoring batch-oriented workflows. FastBCP can be seamlessly integrated into Airflow DAGs using the Docker operator and its official Docker image. - [Docker](/1.6/integration/docker-integration.md): Minimal, production-ready container image to run FastBCP, a high-performance bulk copy utility designed for data integration and automation workflows. - [Kestra](/1.6/integration/kestra-integration.md): Kestra is a powerful open-source orchestration platform that can be used to automate and schedule FastBCP data export workflows. FastBCP can be seamlessly integrated into Kestra flows using its Docker image. - [PostgreSQL](/1.6/integration/postgresql-integration.md): The pg_fastbcp extension allows you to run the FastBCP tool directly from an SQL function, enabling fast data export from databases to various formats (CSV, Parquet) and cloud storage directly from PostgreSQL. ### release-notes - [Release Notes 0.32](/1.6/release-notes/release-notes-0.32.md): What's new in FastBCP 0.32 - [Release Notes 1.0](/1.6/release-notes/release-notes-1.0.md): What's new in FastBCP 1.0 - [Release Notes 1.1](/1.6/release-notes/release-notes-1.1.md): What's new in FastBCP 1.1 - [Release Notes 1.2](/1.6/release-notes/release-notes-1.2.md): What's new in FastBCP 1.2 - [Release Notes 1.3](/1.6/release-notes/release-notes-1.3.md): What's new in FastBCP 1.3 - [Release Notes 1.4](/1.6/release-notes/release-notes-1.4.md): FastBCP 1.4: one Physical parallel method for every engine, ADBC Teradata without client software, and SQL Server Physloc exports up to 2.6× faster. - [Release Notes 1.5](/1.6/release-notes/release-notes-1.5.md): FastBCP 1.5: export SQL Server tables straight from .bak backup files, without restoring them and without any SQL Server instance. - [Release Notes 1.6](/1.6/release-notes/release-notes-1.6.md): FastBCP 1.6: export Oracle tables straight from RMAN backup sets, full and incremental, read the latest version of a table from SQL Server full and differential backups, read encrypted backups, SQL Server backup exports up to 2.8× faster, backups re-opened in milliseconds, full speed in Windows scheduled tasks. ### sitemap Complete documentation structure - [Sitemap](/1.6/sitemap.md): Complete documentation structure ### wizard Interactive wizard to build FastBCP commands - [FastBCP Command Wizard](/1.6/wizard.md): Interactive wizard to build FastBCP commands ## latest Your first FastBCP export - [Getting Started with FastBCP](/latest.md): Your first FastBCP export ### ai - [FastBCP 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 FastBCP command lines - [FastBCP 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 FastBCP commands ### datatypes-conversion - [SQL Server (ADBC) → Parquet](/latest/datatypes-conversion/mssql/adbc-parquet.md): SQL Server (ADBC) to Parquet datatypes conversion reference - [SQL Server backup files → Parquet](/latest/datatypes-conversion/mssql/backup-parquet.md): SQL Server backup files (.bak, backup_mssql) to Parquet datatypes conversion reference - [SQL Server → Parquet](/latest/datatypes-conversion/mssql/parquet.md): SQL Server to Parquet datatypes conversion reference - [MySQL → Parquet](/latest/datatypes-conversion/mysql/parquet.md): MySQL to Parquet datatypes conversion reference - [Oracle (ADBC) → Parquet](/latest/datatypes-conversion/oracle/adbc-parquet.md): Oracle (ADBC) to Parquet datatypes conversion reference - [Oracle RMAN backup sets → Parquet](/latest/datatypes-conversion/oracle/backup-parquet.md): Oracle RMAN backup sets (backup_rman) to Parquet datatypes conversion reference - [Oracle → Parquet](/latest/datatypes-conversion/oracle/parquet.md): Oracle to Parquet datatypes conversion reference - [Datatypes Conversion](/latest/datatypes-conversion/overview.md): How FastBCP maps native source datatypes to Parquet, per database and connection type - [PostgreSQL COPY → Parquet](/latest/datatypes-conversion/postgresql-copy/parquet.md): PostgreSQL COPY to Parquet datatypes conversion reference - [PostgreSQL (ADBC) → Parquet](/latest/datatypes-conversion/postgresql/adbc-parquet.md): PostgreSQL (ADBC) to Parquet datatypes conversion reference - [PostgreSQL → Parquet](/latest/datatypes-conversion/postgresql/parquet.md): PostgreSQL to Parquet datatypes conversion reference - [SAP HANA → Parquet](/latest/datatypes-conversion/saphana/parquet.md): SAP HANA to Parquet datatypes conversion reference - [Teradata → Parquet](/latest/datatypes-conversion/teradata/parquet.md): Teradata to Parquet datatypes conversion reference ### documentation - [Advanced Parameters](/latest/documentation/cli/advanced_parameters.md): Advanced configuration options for FastBCP - [Authentication](/latest/documentation/cli/authentication.md): FastBCP authentication methods and security - [Cloud Options](/latest/documentation/cli/cloud_options.md): Configure AWS, Azure, and Google Cloud authentication and storage - [Connection Parameters](/latest/documentation/cli/connection_parameters.md): Server, database, and connection string configuration - [CSV Formatting](/latest/documentation/cli/csv_formatting.md): Configure CSV output format and delimiters - [License](/latest/documentation/cli/license.md): License configuration for FastBCP - [Output Info](/latest/documentation/cli/output_info.md): Directory, filename, and output configuration - [Parallel Parameters](/latest/documentation/cli/parallel_parameters.md): Configure parallel export to improve performance - [Parquet Formatting](/latest/documentation/cli/parquet_formatting.md): Configure Parquet compression and options - [Source Info](/latest/documentation/cli/source_info.md): Query, input file, and table parameters for data extraction - [AWS S3 Configuration](/latest/documentation/cloud-connectivity/aws-s3.md): Configure AWS S3 authentication and connectivity - [Azure Configuration](/latest/documentation/cloud-connectivity/azure.md): Configure Azure Blob Storage and Data Lake Gen2 connectivity - [Google Cloud Storage Configuration](/latest/documentation/cloud-connectivity/google-cloud.md): Configure Google Cloud Storage authentication and connectivity - [OneLake Configuration](/latest/documentation/cloud-connectivity/onelake.md): Configure OneLake authentication and connectivity - [Cloud Connectivity Overview](/latest/documentation/cloud-connectivity/overview.md): Cloud connectivity overview for AWS, Azure, and Google Cloud - [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 - [FASTBCP_ADBC_BATCHCELLS](/latest/documentation/environment-variables/fastbcp-adbc-batchcells.md): Configure the ADBC record batch size in cells - [FASTBCP_BACKUP_RESTORE_MODE](/latest/documentation/environment-variables/fastbcp-backup-restore-mode.md): Choose what FastBCP does when a SQL Server or Oracle RMAN backup that could be the newest cannot be used - [FASTBCP_BACKUP_RESTORE_POINT](/latest/documentation/environment-variables/fastbcp-backup-restore-point.md): Choose which version of a table FastBCP reads from SQL Server backups and Oracle RMAN backups, the latest one or the last full backup - [FASTBCP_CLOUD_ISBUFFERED](/latest/documentation/environment-variables/fastbcp-cloud-isbuffered.md): Enable buffered cloud uploads for better performance - [FASTBCP_CLOUD_MAXUPLOADTHREAD_PER_STREAM](/latest/documentation/environment-variables/fastbcp-cloud-maxuploadthread-per-stream.md): Control parallel upload threads for cloud storage - [FASTBCP_DATEFORMAT](/latest/documentation/environment-variables/fastbcp-dateformat.md): Control the string format used for date-to-string conversion - [FASTBCP_DBPARTITION_TARGET_MODE](/latest/documentation/environment-variables/fastbcp-dbpartition-target-mode.md): Choose the output file layout of the DBPartition parallel method - [FASTBCP_INDEX_DIR](/latest/documentation/environment-variables/fastbcp-index-dir.md): Choose where FastBCP keeps the index of the backups it has opened - [FASTBCP_PERFORMANCE_COLLECT](/latest/documentation/environment-variables/fastbcp-performance-collect.md): Enable collection of performance information during the run - [FASTBCP_RGSIZE](/latest/documentation/environment-variables/fastbcp-rgsize.md): Configure Parquet row group size - [FASTBCP_SYSTEMINFO_COLLECT](/latest/documentation/environment-variables/fastbcp-systeminfo-collect.md): Enable collection of system information during the run - [FASTBCP_TMPPATH](/latest/documentation/environment-variables/fastbcp-tmppath.md): Configure temporary file location for buffered cloud uploads - [FASTBCP_TTU_PATH](/latest/documentation/environment-variables/fastbcp-ttu-path.md): Point the adbc_teradata connector to a Teradata Tools and Utilities (TTU) folder on Linux - [FASTBCP_UID_STRING_CASING](/latest/documentation/environment-variables/fastbcp-uid-string-casing.md): Control casing for UID-to-string conversion - [Environment Variables Overview](/latest/documentation/environment-variables/overview.md): Overview of all FastBCP environment variables - [Advanced Scenarios](/latest/documentation/examples/advanced-scenarios.md): Advanced use cases and troubleshooting examples - [Cloud Storage Examples](/latest/documentation/examples/cloud-storage.md): Export examples for cloud storage destinations (S3, Azure) - [DB2 Examples](/latest/documentation/examples/db2.md): Export examples for IBM Db2 with the native adbc_db2 connector or through ODBC - [MySQL Examples](/latest/documentation/examples/mysql.md): Export examples for MySQL databases - [Oracle Examples](/latest/documentation/examples/oracle.md): Export examples for Oracle databases - [Other Databases](/latest/documentation/examples/other-databases.md): Export examples for Clickhouse, SAP HANA, Netezza and Teradata - [Output Formats](/latest/documentation/examples/output-formats.md): Examples for different output formats (CSV, Parquet, Excel) - [PostgreSQL Examples](/latest/documentation/examples/postgresql.md): Export examples for PostgreSQL databases - [SQL Server Examples](/latest/documentation/examples/sql-server.md): Export examples for SQL Server databases - [Configuration Examples](/latest/documentation/logging/examples.md): Sample FastBCP_settings.json configurations - [Log Database](/latest/documentation/logging/log-database.md): Configure database logging in FastBCP - [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 FastBCP log levels - [OpenTelemetry](/latest/documentation/logging/OpenTelemetry.md): Configure OpenTelemetry tracing and log export in FastBCP - [Logging Overview](/latest/documentation/logging/Overview.md): Overview of FastBCP logging configuration ### installation Instructions - [Installation](/latest/installation.md): Instructions ### integration - [Apache Airflow](/latest/integration/airflow-integration.md): Apache Airflow is a powerful open-source platform for developing, scheduling, and monitoring batch-oriented workflows. FastBCP can be seamlessly integrated into Airflow DAGs using the Docker operator and its official Docker image. - [Docker](/latest/integration/docker-integration.md): Minimal, production-ready container image to run FastBCP, a high-performance bulk copy utility designed for data integration and automation workflows. - [Kestra](/latest/integration/kestra-integration.md): Kestra is a powerful open-source orchestration platform that can be used to automate and schedule FastBCP data export workflows. FastBCP can be seamlessly integrated into Kestra flows using its Docker image. - [PostgreSQL](/latest/integration/postgresql-integration.md): The pg_fastbcp extension allows you to run the FastBCP tool directly from an SQL function, enabling fast data export from databases to various formats (CSV, Parquet) and cloud storage directly from PostgreSQL. ### release-notes - [Release Notes 0.32](/latest/release-notes/release-notes-0.32.md): What's new in FastBCP 0.32 - [Release Notes 1.0](/latest/release-notes/release-notes-1.0.md): What's new in FastBCP 1.0 - [Release Notes 1.1](/latest/release-notes/release-notes-1.1.md): What's new in FastBCP 1.1 - [Release Notes 1.2](/latest/release-notes/release-notes-1.2.md): What's new in FastBCP 1.2 - [Release Notes 1.3](/latest/release-notes/release-notes-1.3.md): What's new in FastBCP 1.3 - [Release Notes 1.4](/latest/release-notes/release-notes-1.4.md): FastBCP 1.4: one Physical parallel method for every engine, ADBC Teradata without client software, and SQL Server Physloc exports up to 2.6× faster. - [Release Notes 1.5](/latest/release-notes/release-notes-1.5.md): FastBCP 1.5: export SQL Server tables straight from .bak backup files, without restoring them and without any SQL Server instance. - [Release Notes 1.6](/latest/release-notes/release-notes-1.6.md): FastBCP 1.6: export Oracle tables straight from RMAN backup sets, full and incremental, read the latest version of a table from SQL Server full and differential backups, read encrypted backups, SQL Server backup exports up to 2.8× faster, backups re-opened in milliseconds, full speed in Windows scheduled tasks. - [Release Notes 1.7](/latest/release-notes/release-notes-1.7.md): FastBCP 1.7: IBM Db2 straight to Parquet with the native adbc_db2 connector — no IBM client to install, one thread per data partition. Db2 and Oracle queries sent as written, exact DECIMAL values from IBM's ODBC driver, more SQL Server backups read right, and parameter values in any case. ### sitemap Complete documentation structure - [Sitemap](/latest/sitemap.md): Complete documentation structure ### wizard Interactive wizard to build FastBCP commands - [FastBCP Command Wizard](/latest/wizard.md): Interactive wizard to build FastBCP commands --- # Full Documentation Content # Getting Started with FastBCP If you haven't installed FastBCP yet, please check the [Installation](/0.32/installation.md) section first. You can also build your first FastBCP command using our interactive [Command Builder Wizard](/latest/wizard.md). [FastBCP Tutorial](https://www.youtube.com/embed/7YaXaue7CdA) --- # SQL Server → Parquet Datatypes conversion mapping when exporting from **SQL Server** (`--connectiontype mssql`) to **Parquet** format. | | | | --------------- | ------------------ | | **Source** | SQL Server (mssql) | | **Format** | Parquet | | **FastBCP** | 0.32.2.0 | | **Test Status** | PASS (Nullable) | ## Parquet Schema: testdatatypes\_nullable[​](#parquet-schema-testdatatypes_nullable "Direct link to Parquet Schema: testdatatypes_nullable") | name | physical\_type | converted\_type | logical\_type | | --------------------- | ----------------------- | ----------------- | ---------------------------------------- | | col\_bigint | INT64 | INT\_64 | IntType(bitWidth=64, isSigned=1) | | col\_int | INT32 | INT\_32 | IntType(bitWidth=32, isSigned=1) | | col\_smallint | INT32 | INT\_16 | IntType(bitWidth=16, isSigned=1) | | col\_tinyint | INT32 | UINT\_8 | IntType(bitWidth=8, isSigned=0) | | col\_bit | BOOLEAN | — | — | | col\_decimal | INT64 | DECIMAL | DecimalType(scale=2, precision=18) | | col\_numeric | INT64 | DECIMAL | DecimalType(scale=2, precision=18) | | col\_money | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=4, precision=19) | | col\_smallmoney | INT64 | DECIMAL | DecimalType(scale=4, precision=10) | | col\_float | DOUBLE | — | — | | col\_real | FLOAT | — | — | | col\_date | INT32 | DATE | — | | col\_time | INT64 | TIME\_MICROS | TimeType(isAdjustedToUTC=0, unit=MICROS) | | col\_datetime | INT64 | TIMESTAMP\_MILLIS | — | | col\_datetime2 | INT64 | TIMESTAMP\_MILLIS | — | | col\_datetimeoffset | BYTE\_ARRAY | UTF8 | StringType() | | col\_smalldatetime | INT64 | TIMESTAMP\_MILLIS | — | | col\_char | BYTE\_ARRAY | UTF8 | StringType() | | col\_varchar | BYTE\_ARRAY | UTF8 | StringType() | | col\_nchar | BYTE\_ARRAY | UTF8 | StringType() | | col\_nvarchar | BYTE\_ARRAY | UTF8 | StringType() | | col\_text | BYTE\_ARRAY | UTF8 | StringType() | | col\_ntext | BYTE\_ARRAY | UTF8 | StringType() | | col\_binary | BYTE\_ARRAY | — | — | | col\_varbinary | BYTE\_ARRAY | — | — | | col\_image | BYTE\_ARRAY | — | — | | col\_uniqueidentifier | BYTE\_ARRAY | UTF8 | StringType() | | col\_xml | BYTE\_ARRAY | UTF8 | StringType() | | col\_sql\_variant | BYTE\_ARRAY | UTF8 | StringType() | | col\_geography | BYTE\_ARRAY | UTF8 | StringType() | | col\_geometry | BYTE\_ARRAY | UTF8 | StringType() | --- # MySQL → Parquet Datatypes conversion mapping when exporting from **MySQL** (`--connectiontype mysql`) to **Parquet** format. | | | | --------------- | --------------- | | **Source** | MySQL (mysql) | | **Format** | Parquet | | **FastBCP** | 0.32.2.0 | | **Test Status** | PASS (Nullable) | ## Parquet Schema: testdatatypes\_nullable[​](#parquet-schema-testdatatypes_nullable "Direct link to Parquet Schema: testdatatypes_nullable") | name | physical\_type | converted\_type | logical\_type | | --------------- | -------------- | ----------------- | ---------------------------------- | | col\_bigint | INT64 | INT\_64 | IntType(bitWidth=64, isSigned=1) | | col\_int | INT32 | INT\_32 | IntType(bitWidth=32, isSigned=1) | | col\_mediumint | INT32 | INT\_32 | IntType(bitWidth=32, isSigned=1) | | col\_smallint | INT32 | INT\_16 | IntType(bitWidth=16, isSigned=1) | | col\_tinyint | BYTE\_ARRAY | UTF8 | StringType() | | col\_bit | BYTE\_ARRAY | UTF8 | StringType() | | col\_decimal | INT64 | DECIMAL | DecimalType(scale=2, precision=18) | | col\_float | FLOAT | — | — | | col\_double | DOUBLE | — | — | | col\_date | INT64 | TIMESTAMP\_MILLIS | — | | col\_time | BYTE\_ARRAY | UTF8 | StringType() | | col\_datetime | INT64 | TIMESTAMP\_MILLIS | — | | col\_timestamp | INT64 | TIMESTAMP\_MILLIS | — | | col\_year | INT32 | INT\_32 | IntType(bitWidth=32, isSigned=1) | | col\_char | BYTE\_ARRAY | UTF8 | StringType() | | col\_varchar | BYTE\_ARRAY | UTF8 | StringType() | | col\_tinytext | BYTE\_ARRAY | UTF8 | StringType() | | col\_text | BYTE\_ARRAY | UTF8 | StringType() | | col\_mediumtext | BYTE\_ARRAY | UTF8 | StringType() | | col\_longtext | BYTE\_ARRAY | UTF8 | StringType() | | col\_binary | BYTE\_ARRAY | — | — | | col\_varbinary | BYTE\_ARRAY | — | — | | col\_tinyblob | BYTE\_ARRAY | — | — | | col\_blob | BYTE\_ARRAY | — | — | | col\_mediumblob | BYTE\_ARRAY | — | — | | col\_longblob | BYTE\_ARRAY | — | — | | col\_enum | BYTE\_ARRAY | UTF8 | StringType() | | col\_set | BYTE\_ARRAY | UTF8 | StringType() | | col\_json | BYTE\_ARRAY | UTF8 | StringType() | | col\_geometry | BYTE\_ARRAY | — | — | | col\_point | BYTE\_ARRAY | — | — | | col\_linestring | BYTE\_ARRAY | — | — | | col\_polygon | BYTE\_ARRAY | — | — | --- # Oracle → Parquet Datatypes conversion mapping when exporting from **Oracle** (`--connectiontype oracle`) to **Parquet** format. | | | | --------------- | --------------- | | **Source** | Oracle (oraodp) | | **Format** | Parquet | | **FastBCP** | 0.32.2.0 | | **Test Status** | PASS (Nullable) | ## Parquet Schema: testdatatypes\_nullable[​](#parquet-schema-testdatatypes_nullable "Direct link to Parquet Schema: testdatatypes_nullable") | name | physical\_type | converted\_type | logical\_type | | ------------------- | ----------------------- | ----------------- | ----------------------------------- | | COL\_NUMBER | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=18, precision=38) | | COL\_NUMBER10 | INT64 | INT\_64 | IntType(bitWidth=64, isSigned=1) | | COL\_NUMBER18\_2 | INT64 | DECIMAL | DecimalType(scale=2, precision=18) | | COL\_FLOAT | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=18, precision=38) | | COL\_BINARY\_FLOAT | FLOAT | — | — | | COL\_BINARY\_DOUBLE | DOUBLE | — | — | | COL\_CHAR | BYTE\_ARRAY | UTF8 | StringType() | | COL\_VARCHAR2 | BYTE\_ARRAY | UTF8 | StringType() | | COL\_NCHAR | BYTE\_ARRAY | UTF8 | StringType() | | COL\_NVARCHAR2 | BYTE\_ARRAY | UTF8 | StringType() | | COL\_CLOB | BYTE\_ARRAY | UTF8 | StringType() | | COL\_NCLOB | BYTE\_ARRAY | UTF8 | StringType() | | COL\_BLOB | BYTE\_ARRAY | — | — | | COL\_RAW | BYTE\_ARRAY | — | — | | COL\_LONG\_RAW | BYTE\_ARRAY | — | — | | COL\_DATE | INT64 | TIMESTAMP\_MILLIS | — | | COL\_TIMESTAMP | INT64 | TIMESTAMP\_MILLIS | — | | COL\_TIMESTAMP\_TZ | BYTE\_ARRAY | UTF8 | StringType() | | COL\_TIMESTAMP\_LTZ | INT64 | TIMESTAMP\_MILLIS | — | | COL\_INTERVAL\_YM | INT64 | INT\_64 | IntType(bitWidth=64, isSigned=1) | | COL\_INTERVAL\_DS | BYTE\_ARRAY | UTF8 | StringType() | | COL\_ROWID | BYTE\_ARRAY | UTF8 | StringType() | | COL\_UROWID | BYTE\_ARRAY | UTF8 | StringType() | | COL\_XMLTYPE | BYTE\_ARRAY | UTF8 | StringType() | | COL\_BFILE | BYTE\_ARRAY | — | — | --- # Datatypes Conversion When FastBCP exports a table, every native source column type is mapped to a type in the target output format. This section documents the **exact mappings** FastBCP produces. These pages are not a specification: each one is the Parquet schema read back from a real export of a test table covering all of the source's native datatypes. ## Supported Sources[​](#supported-sources "Direct link to Supported Sources") Sources are grouped by database system. A system can be read through several connection types (`--connectiontype`), and each one has its own page because the mappings it produces can differ — `pgcopy` produces exactly the same mappings as `pgsql`. | Database | Connection Types | | ---------- | ------------------------------------------------------------------------------------------------------------------------------- | | SQL Server | [`mssql`](/0.32/datatypes-conversion/mssql/parquet.md) | | MySQL | [`mysql`](/0.32/datatypes-conversion/mysql/parquet.md) | | Oracle | [`oraodp`](/0.32/datatypes-conversion/oracle/parquet.md) | | PostgreSQL | [`pgsql`](/0.32/datatypes-conversion/postgresql/parquet.md) · [`pgcopy`](/0.32/datatypes-conversion/postgresql-copy/parquet.md) | | SAP HANA | [`hana`](/0.32/datatypes-conversion/saphana/parquet.md) | | Teradata | [`teradata`](/0.32/datatypes-conversion/teradata/parquet.md) | Parquet is the only output format documented here. ## How to Read a Page[​](#how-to-read-a-page "Direct link to How to Read a Page") Each page opens with a summary of the export it documents — source, output format, the FastBCP build used and the test status — followed by the Parquet schema produced from the **`testdatatypes_nullable`** table, in which every column accepts `NULL`. | Column | Description | | ------------------- | ------------------------------------------------------------------------------------------------------------------------- | | **name** | The column name in the source table | | **physical\_type** | The Parquet physical storage type: `BOOLEAN`, `INT32`, `INT64`, `FLOAT`, `DOUBLE`, `BYTE_ARRAY` or `FIXED_LEN_BYTE_ARRAY` | | **converted\_type** | The legacy Parquet annotation on top of it (`UTF8`, `DECIMAL`, `DATE`, `TIMESTAMP_MILLIS`, …) | | **logical\_type** | The modern Parquet annotation (`StringType()`, `DecimalType(scale=2, precision=18)`, `IntType(…)`, …) | A `—` means the column carries no annotation of that kind, so the physical type alone describes it. NOT NULL columns Declaring the source columns `NOT NULL` does not change the mapping. The only difference is the Parquet repetition level (REQUIRED instead of OPTIONAL), which these tables do not show. --- # PostgreSQL COPY → Parquet Datatypes conversion mapping when exporting from **PostgreSQL** using the COPY protocol (`--connectiontype pgcopy`) to **Parquet** format. | | | | --------------- | ------------------------ | | **Source** | PostgreSQL COPY (pgcopy) | | **Format** | Parquet | | **FastBCP** | 0.32.2.0 | | **Test Status** | PASS (Nullable) | info The COPY protocol variant produces the same type mappings as the standard PostgreSQL driver. See also [PostgreSQL (pgsql)](/0.32/datatypes-conversion/postgresql/parquet.md). ## Parquet Schema: testdatatypes\_nullable[​](#parquet-schema-testdatatypes_nullable "Direct link to Parquet Schema: testdatatypes_nullable") | name | physical\_type | converted\_type | logical\_type | | ---------------------- | ----------------------- | ----------------- | ---------------------------------------- | | col\_bigint | INT64 | INT\_64 | IntType(bitWidth=64, isSigned=1) | | col\_integer | INT32 | INT\_32 | IntType(bitWidth=32, isSigned=1) | | col\_smallint | INT32 | INT\_16 | IntType(bitWidth=16, isSigned=1) | | col\_boolean | BOOLEAN | — | — | | col\_numeric | INT64 | DECIMAL | DecimalType(scale=2, precision=18) | | col\_real | FLOAT | — | — | | col\_double\_precision | DOUBLE | — | — | | col\_money | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=4, precision=19) | | col\_date | INT32 | DATE | — | | col\_time | INT32 | TIME\_MILLIS | TimeType(isAdjustedToUTC=0, unit=MILLIS) | | col\_timestamp | INT64 | TIMESTAMP\_MILLIS | — | | col\_timestamptz | BYTE\_ARRAY | UTF8 | StringType() | | col\_interval | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | col\_char | BYTE\_ARRAY | UTF8 | StringType() | | col\_varchar | BYTE\_ARRAY | UTF8 | StringType() | | col\_text | BYTE\_ARRAY | UTF8 | StringType() | | col\_bytea | BYTE\_ARRAY | — | — | | col\_uuid | BYTE\_ARRAY | UTF8 | StringType() | | col\_json | BYTE\_ARRAY | UTF8 | StringType() | | col\_jsonb | BYTE\_ARRAY | — | — | | col\_xml | BYTE\_ARRAY | UTF8 | StringType() | | col\_inet | BYTE\_ARRAY | UTF8 | StringType() | | col\_cidr | BYTE\_ARRAY | UTF8 | StringType() | | col\_macaddr | BYTE\_ARRAY | UTF8 | StringType() | | col\_point | BYTE\_ARRAY | UTF8 | StringType() | | col\_line | BYTE\_ARRAY | UTF8 | StringType() | | col\_lseg | BYTE\_ARRAY | UTF8 | StringType() | | col\_box | BYTE\_ARRAY | UTF8 | StringType() | | col\_path | BYTE\_ARRAY | UTF8 | StringType() | | col\_polygon | BYTE\_ARRAY | UTF8 | StringType() | | col\_circle | BYTE\_ARRAY | UTF8 | StringType() | | col\_int4range | BYTE\_ARRAY | UTF8 | StringType() | | col\_int8range | BYTE\_ARRAY | UTF8 | StringType() | | col\_numrange | BYTE\_ARRAY | UTF8 | StringType() | | col\_tsrange | BYTE\_ARRAY | UTF8 | StringType() | | col\_tstzrange | BYTE\_ARRAY | UTF8 | StringType() | | col\_daterange | BYTE\_ARRAY | UTF8 | StringType() | | col\_bit | BYTE\_ARRAY | UTF8 | StringType() | | col\_bit\_varying | BYTE\_ARRAY | UTF8 | StringType() | | col\_oid | BYTE\_ARRAY | UTF8 | StringType() | | col\_int\_array | BYTE\_ARRAY | UTF8 | StringType() | --- # PostgreSQL → Parquet Datatypes conversion mapping when exporting from **PostgreSQL** (`--connectiontype pgsql`) to **Parquet** format. | | | | --------------- | ------------------ | | **Source** | PostgreSQL (pgsql) | | **Format** | Parquet | | **FastBCP** | 0.32.2.0 | | **Test Status** | PASS (Nullable) | info See also [PostgreSQL COPY](/0.32/datatypes-conversion/postgresql-copy/parquet.md) for the COPY protocol variant (`--connectiontype pgcopy`), which produces identical type mappings. ## Parquet Schema: testdatatypes\_nullable[​](#parquet-schema-testdatatypes_nullable "Direct link to Parquet Schema: testdatatypes_nullable") | name | physical\_type | converted\_type | logical\_type | | ---------------------- | ----------------------- | ----------------- | ---------------------------------------- | | col\_bigint | INT64 | INT\_64 | IntType(bitWidth=64, isSigned=1) | | col\_integer | INT32 | INT\_32 | IntType(bitWidth=32, isSigned=1) | | col\_smallint | INT32 | INT\_16 | IntType(bitWidth=16, isSigned=1) | | col\_boolean | BOOLEAN | — | — | | col\_numeric | INT64 | DECIMAL | DecimalType(scale=2, precision=18) | | col\_real | FLOAT | — | — | | col\_double\_precision | DOUBLE | — | — | | col\_money | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=4, precision=19) | | col\_date | INT32 | DATE | — | | col\_time | INT32 | TIME\_MILLIS | TimeType(isAdjustedToUTC=0, unit=MILLIS) | | col\_timestamp | INT64 | TIMESTAMP\_MILLIS | — | | col\_timestamptz | BYTE\_ARRAY | UTF8 | StringType() | | col\_interval | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | col\_char | BYTE\_ARRAY | UTF8 | StringType() | | col\_varchar | BYTE\_ARRAY | UTF8 | StringType() | | col\_text | BYTE\_ARRAY | UTF8 | StringType() | | col\_bytea | BYTE\_ARRAY | — | — | | col\_uuid | BYTE\_ARRAY | UTF8 | StringType() | | col\_json | BYTE\_ARRAY | UTF8 | StringType() | | col\_jsonb | BYTE\_ARRAY | — | — | | col\_xml | BYTE\_ARRAY | UTF8 | StringType() | | col\_inet | BYTE\_ARRAY | UTF8 | StringType() | | col\_cidr | BYTE\_ARRAY | UTF8 | StringType() | | col\_macaddr | BYTE\_ARRAY | UTF8 | StringType() | | col\_point | BYTE\_ARRAY | UTF8 | StringType() | | col\_line | BYTE\_ARRAY | UTF8 | StringType() | | col\_lseg | BYTE\_ARRAY | UTF8 | StringType() | | col\_box | BYTE\_ARRAY | UTF8 | StringType() | | col\_path | BYTE\_ARRAY | UTF8 | StringType() | | col\_polygon | BYTE\_ARRAY | UTF8 | StringType() | | col\_circle | BYTE\_ARRAY | UTF8 | StringType() | | col\_int4range | BYTE\_ARRAY | UTF8 | StringType() | | col\_int8range | BYTE\_ARRAY | UTF8 | StringType() | | col\_numrange | BYTE\_ARRAY | UTF8 | StringType() | | col\_tsrange | BYTE\_ARRAY | UTF8 | StringType() | | col\_tstzrange | BYTE\_ARRAY | UTF8 | StringType() | | col\_daterange | BYTE\_ARRAY | UTF8 | StringType() | | col\_bit | BYTE\_ARRAY | UTF8 | StringType() | | col\_bit\_varying | BYTE\_ARRAY | UTF8 | StringType() | | col\_oid | BYTE\_ARRAY | UTF8 | StringType() | | col\_int\_array | BYTE\_ARRAY | UTF8 | StringType() | --- # SAP HANA → Parquet Datatypes conversion mapping when exporting from **SAP HANA** (`--connectiontype hana`) to **Parquet** format. | | | | --------------- | --------------- | | **Source** | SAP HANA (hana) | | **Format** | Parquet | | **FastBCP** | 0.32.2.0 | | **Test Status** | PASS (Nullable) | ## Parquet Schema: testdatatypes\_nullable[​](#parquet-schema-testdatatypes_nullable "Direct link to Parquet Schema: testdatatypes_nullable") | name | physical\_type | converted\_type | logical\_type | | ----------------- | -------------- | ----------------- | ---------------------------------- | | COL\_TINYINT | INT32 | UINT\_8 | IntType(bitWidth=8, isSigned=0) | | COL\_SMALLINT | INT32 | INT\_16 | IntType(bitWidth=16, isSigned=1) | | COL\_INTEGER | INT32 | INT\_32 | IntType(bitWidth=32, isSigned=1) | | COL\_BIGINT | INT64 | INT\_64 | IntType(bitWidth=64, isSigned=1) | | COL\_DECIMAL | INT64 | DECIMAL | DecimalType(scale=2, precision=18) | | COL\_SMALLDECIMAL | INT64 | DECIMAL | DecimalType(scale=0, precision=16) | | COL\_REAL | FLOAT | — | — | | COL\_DOUBLE | DOUBLE | — | — | | COL\_FLOAT | DOUBLE | — | — | | COL\_BOOLEAN | BOOLEAN | — | — | | COL\_DATE | INT64 | TIMESTAMP\_MILLIS | — | | COL\_TIME | BYTE\_ARRAY | UTF8 | StringType() | | COL\_TIMESTAMP | INT64 | TIMESTAMP\_MILLIS | — | | COL\_SECONDDATE | INT64 | TIMESTAMP\_MILLIS | — | | COL\_CHAR | BYTE\_ARRAY | UTF8 | StringType() | | COL\_VARCHAR | BYTE\_ARRAY | UTF8 | StringType() | | COL\_NCHAR | BYTE\_ARRAY | UTF8 | StringType() | | COL\_NVARCHAR | BYTE\_ARRAY | UTF8 | StringType() | | COL\_ALPHANUM | BYTE\_ARRAY | UTF8 | StringType() | | COL\_CLOB | BYTE\_ARRAY | UTF8 | StringType() | | COL\_NCLOB | BYTE\_ARRAY | UTF8 | StringType() | | COL\_BLOB | BYTE\_ARRAY | — | — | | COL\_BINARY | BYTE\_ARRAY | — | — | | COL\_VARBINARY | BYTE\_ARRAY | — | — | | COL\_ST\_GEOMETRY | BYTE\_ARRAY | — | — | | COL\_ST\_POINT | BYTE\_ARRAY | — | — | | COL\_SHORTTEXT | BYTE\_ARRAY | UTF8 | StringType() | --- # Teradata → Parquet Datatypes conversion mapping when exporting from **Teradata** (`--connectiontype teradata`) to **Parquet** format. | | | | --------------- | ------------------- | | **Source** | Teradata (teradata) | | **Format** | Parquet | | **FastBCP** | 0.32.2.0 | | **Test Status** | PASS (Nullable) | ## Parquet Schema: testdatatypes\_nullable[​](#parquet-schema-testdatatypes_nullable "Direct link to Parquet Schema: testdatatypes_nullable") | name | physical\_type | converted\_type | logical\_type | | ------------------------ | ----------------------- | --------------- | ---------------------------------------- | | col\_byteint | INT32 | INT\_16 | IntType(bitWidth=16, isSigned=1) | | col\_smallint | INT32 | INT\_16 | IntType(bitWidth=16, isSigned=1) | | col\_integer | INT32 | INT\_32 | IntType(bitWidth=32, isSigned=1) | | col\_bigint | INT64 | INT\_64 | IntType(bitWidth=64, isSigned=1) | | col\_decimal18\_2 | INT64 | DECIMAL | DecimalType(scale=2, precision=18) | | col\_float | DOUBLE | — | — | | col\_number | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=18, precision=38) | | col\_number18\_2 | INT64 | DECIMAL | DecimalType(scale=2, precision=18) | | col\_date | INT32 | DATE | — | | col\_time | INT64 | TIME\_MICROS | TimeType(isAdjustedToUTC=0, unit=MICROS) | | col\_timestamp | BYTE\_ARRAY | UTF8 | StringType() | | col\_timestamp\_tz | BYTE\_ARRAY | UTF8 | StringType() | | tdintervalyear | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | tdintervalyeartomonth | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | tdintervalmonth | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | tdintervalday | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | tdintervaldaytohour | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | tdintervaldaytominute | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | tdintervaldaytosecond | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | tdintervalhour | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | tdintervalhourtominute | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | tdintervalhourtosecond | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | tdintervalminute | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | tdintervalminutetosecond | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | tdintervalsecond | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | col\_real | DOUBLE | — | — | | col\_double\_precision | DOUBLE | — | — | | col\_char | BYTE\_ARRAY | UTF8 | StringType() | | col\_varchar | BYTE\_ARRAY | UTF8 | StringType() | | col\_clob | BYTE\_ARRAY | UTF8 | StringType() | | col\_byte | BYTE\_ARRAY | — | — | | col\_varbyte | BYTE\_ARRAY | — | — | | col\_blob | BYTE\_ARRAY | — | — | | col\_period\_date | BYTE\_ARRAY | UTF8 | StringType() | | col\_period\_timestamp | BYTE\_ARRAY | UTF8 | StringType() | | col\_json | BYTE\_ARRAY | UTF8 | StringType() | | col\_xml | BYTE\_ARRAY | UTF8 | StringType() | | col\_st\_geometry | BYTE\_ARRAY | UTF8 | StringType() | --- # Advanced Parameters This section covers advanced configuration options for FastBCP. ## Run ID[​](#run-id "Direct link to Run ID") The Run ID parameter `--runid` is a unique identifier for the current export operation. It can be used for tracking, logging, and monitoring purposes. Information If not specified, FastBCP will generate a unique Run ID automatically. Tips If possible, inject the RunId provided by the caller (e.g., SSIS, Airflow, or any scheduler that supports a run identifier). This will greatly facilitate log correlation and troubleshooting. ``` ./FastBCP \ ... --runid "export-2024-01-09-001" \ ... ``` **Syntax:** * Long form only: `--runid ""` ## Log Level[​](#log-level "Direct link to Log Level") The Log Level parameter `--loglevel` controls the verbosity of logging output during export operations. **Available values:** * `Information` (default): Standard logging with key operation details * `Debug`: Verbose logging with detailed diagnostic information ``` ./FastBCP \ ... --loglevel "Debug" \ ... ``` **Syntax:** * Long form only: `--loglevel ""` note If a settings file is specified with `--settingsfile`, the log level defined in the settings file takes precedence unless overridden by the command-line parameter. Information See [Logging Overview](/0.32/documentation/logging/Overview.md) for detailed information about logging configuration and output. ## Settings File[​](#settings-file "Direct link to Settings File") The Settings File parameter `--settingsfile` allows you to store all FastBCP parameters in a configuration file, making it easier to manage complex exports and reuse configurations. ``` ./FastBCP \ ... --settingsfile "/path/to/config/export-config.json" \ ... ``` **Syntax:** * Long form only: `--settingsfile ""` Information See [Logging Overview](/0.32/documentation/logging/Overview.md) for examples of settings file configuration. ## Config File[​](#config-file "Direct link to Config File") The Config File parameter `--config` allows you to define all FastBCP parameters in a YAML configuration file. This provides a more structured and readable way to manage export configurations compared to JSON settings files. * Windows * Linux ``` .\FastBCP.exe --config samples\sample_mssql_to_csv.yaml ``` ``` ./FastBCP --config samples/sample_mssql_to_csv.yaml ``` **Syntax:** * Long form only: `--config ""` ### YAML Configuration Example[​](#yaml-configuration-example "Direct link to YAML Configuration Example") Here's a complete example of a YAML configuration file: ``` # FastBCP – MSSQL to CSV using RangeId parallel method # # Usage: # .\FastBCP.exe --config samples\sample_mssql_to_csv.yaml connection: type: mssql server: localhost database: tpch10_collation_bin2 trusted: true source: schema: dbo table: orders output: file: "mssql_orders_{startdate}.csv" directory: 'D:\temp\{database}\{schema}\{table}\full\' delimiter: "|" decimal_separator: "." date_format: "yyyy-MM-dd HH:mm:ss" encoding: UTF-8 performance: method: RangeId degree: -2 distribute_key_column: o_orderkey merge: false logging: run_id: mssql_to_csv_parallel-2_rangeid ``` Benefits of YAML Configuration * **Structured and readable**: YAML format is more human-friendly than JSON * **Comments support**: Add documentation directly in your configuration files * **Reusable configurations**: Version control your export settings * **Simplified command-line**: Reduce complex exports to a single `--config` parameter ## Traceparent[​](#traceparent "Direct link to Traceparent") The `--traceparent` parameter accepts a [W3C Trace Context](https://www.w3.org/TR/trace-context/) traceparent identifier from an external caller. This enables distributed trace correlation between FastBCP and upstream systems such as orchestrators, APIs, or CI/CD pipelines. Information See [OpenTelemetry](/0.32/documentation/logging/OpenTelemetry.md) for detailed information about configuring OpenTelemetry tracing and log export. ``` ./FastBCP \ ... --traceparent "00-abcdef1234567890abcdef1234567890-1234567890abcdef-01" \ ... ``` **Syntax:** * Long form only: `--traceparent ""` ## No Banner[​](#no-banner "Direct link to No Banner") Disable the FastBCP banner display in the command line output. This is useful for scripting or when you want cleaner output in automated processes. **Example:** ``` ./FastBCP \ ... --nobanner \ ... ``` **Syntax:** * Long form: `--nobanner` Clean Output Using `--nobanner` is recommended when running FastBCP 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 ``` .\FastBCP.exe ` --connectiontype "oraodp" ` --server "localhost:1521/OraService" ` --database "tpch" ` --user "FastUser" ` --password "FastPassword" ` --sourceschema "TPCH" ` --sourcetable "ORDERS" ` --directory "D:\temp" ` --fileoutput "orders.xlsx" ` --encoding "UTF-8" ` --parallelmethod RowId ` --paralleldegree 7 ` --merge false ` --loglevel "Debug" ` --runid "oracle_to_excel_parallel_rowid" ` --settingsfile "C:\config\oracle-export.json" ` --nobanner ``` ``` ./FastBCP \ --connectiontype "oraodp" \ --server "localhost:1521/OraService" \ --database "tpch" \ --user "FastUser" \ --password "FastPassword" \ --sourceschema "TPCH" \ --sourcetable "ORDERS" \ --directory "/temp" \ --fileoutput "orders.xlsx" \ --encoding "UTF-8" \ --parallelmethod RowId \ --paralleldegree 7 \ --merge false \ --loglevel "Debug" \ --runid "oracle_to_excel_parallel_rowid" \ --settingsfile "/config/oracle-export.json" \ --nobanner ``` This example: * Connects to an Oracle database using the RowId parallel method * Exports ORDERS table to Excel format with UTF-8 encoding * Uses 7 parallel threads with separate files (merge=false) * Enables Debug logging for detailed diagnostics * Uses a custom Run ID for tracking * Loads additional configuration from a settings file * Disables the banner for cleaner output --- # Authentication FastBCP supports two types of authentication methods depending on your database platform. ## Authentication Methods[​](#authentication-methods "Direct link to Authentication Methods") ### 1. Trusted Connection[​](#1-trusted-connection "Direct link to 1. Trusted Connection") Uses the current Windows user's credentials or the operating system authentication if allowed by the RDBMS. ``` .\FastBCP.exe ` ... --trusted ` ... ``` **Syntax:** * Short form: `-A` * Long form: `--trusted` Warning This method is only available if your RDBMS supports trusted/integrated authentication (e.g., SQL Server with Windows Authentication). ### 2. SQL Login with Username and Password[​](#2-sql-login-with-username-and-password "Direct link to 2. SQL Login with Username and Password") Standard database authentication with explicit credentials. ``` ./FastBCP ` ... --user "myuser" ` --password "mypassword" ` ... ``` **Syntax:** * Username: `-U "username"` or `--user "username"` * Password: `-X "password"` or `--password "password"` ### Alternative: Connection String Parameter[​](#alternative-connection-string-parameter "Direct link to Alternative: Connection String Parameter") You can also use the `--sourceconnectstring` parameter where you pass the user and password directly in the connection string. This parameter will be covered in detail in the [Connection Parameters](/0.32/documentation/cli/connection_parameters.md#source-connection-string) section. Password Security in Logs All passwords passed either through the `--password` parameter or within the `--sourceconnectstring` parameter 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 FASTBCP\_USER and FASTBCP\_PASSWORD for exemple or store the password in an encrypted file. Up to you to decrypt the file and it’s content before using it in a shell variable that will be used with FastBCP. --- # Cloud Options FastBCP supports direct exports to cloud storage platforms: AWS S3, Azure Blob Storage, Azure Data Lake Gen2, and Google Cloud Storage. For detailed cloud authentication setup and configuration, see the [Cloud Connectivity](/0.32/documentation/cloud-connectivity/overview.md) documentation. note FastBCP will use multi-part uploads for all cloud provider Warning Since FastBCP 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**. ## Supported Cloud Platforms[​](#supported-cloud-platforms "Direct link to Supported Cloud Platforms") To export data to a cloud storage service, use the URI scheme specific to your target destination with the `--directory` value | Platform | URI Scheme | Example | | ------------------------ | ------------ | ----------------------------------------------------------- | | **AWS S3** | `s3://` | `s3://my-bucket/data/` | | **Azure Blob** | `abs://` | `abs://myaccount.blob.core.windows.net/mycontainer/mydir/` | | **Azure Data Lake Gen2** | `abfss://` | `abfss://myaccount.dfs.core.windows.net/mycontainer/mydir/` | | **Google Cloud Storage** | `gs://` | `gs://my-bucket/data/` | | **S3-Compatible** | `s3://` | `s3://mybucket/export/` (MinIO, OVH, etc.) | | **OneLake** | `onelake://` | `onelake://MyWorSpace/MyLakeHouse/MyDir/` | ## Cloud Profile[​](#cloud-profile "Direct link to Cloud Profile") You can use the `--cloudprofile` parameter to specify which cloud credentials profile to use. ``` ./FastBCP \ ... --directory "s3://my-bucket/exports" \ --fileoutput "orders.parquet" \ --cloudprofile "production" \ ... ``` **Syntax:** * Long form: `--cloudprofile ` --- # Connection Parameters FastBCP requires connection information to access your database. This page covers all connection-related parameters. ## Connection Type[​](#connection-type "Direct link to Connection Type") Specify the type of database connection driver to use. This parameter determines how FastBCP connects to your database. ``` ./FastBCP \ ... --connectiontype mssql \ ... ``` **Syntax:** * Short form: `-C "connection_type"` * Long form: `--connectiontype "connection_type"` **Available Connection Types:** | Connection Type | Description | | --------------- | ------------------------------ | | `clickhouse` | ClickHouse database | | `hana` | SAP HANA database | | `mssql` | Microsoft SQL Server (default) | | `mysql` | MySQL/MariaDB database | | `nzsql` | IBM Netezza | | `odbc` | Generic ODBC connection | | `oledb` | Generic OLE DB connection | | `oraodp` | Oracle Data Provider | | `pgcopy` | PostgreSQL with COPY protocol | | `pgsql` | PostgreSQL standard connection | | `teradata` | Teradata database | ## DSN (Data Source Name)[​](#dsn-data-source-name "Direct link to DSN (Data Source Name)") If you have chosen an ODBC connection type, you must define the DSN with the `-N` or `--dsn` parameter, or alternatively define a connection string using `-g` or `--sourceconnectstring`. ``` ./FastBCP \ ... --connectiontype odbc \ --dsn "MyODBCDataSource" \ ... ``` **Syntax:** * Short form: `-N "DSN_name"` * Long form: `--dsn "DSN_name"` ## Provider[​](#provider "Direct link to Provider") If you have chosen an OLEDB connection type, you must define the OLEDB provider with the `-P` or `--provider` parameter. ``` ./FastBCP \ ... --connectiontype oledb \ --provider MSOLEDBSQL \ ... ``` ``` ./FastBCP \ ... --connectiontype oledb \ --provider NZOLEDB \ ... ``` **Syntax:** * Short form: `-P "provider_name"` * Long form: `--provider "provider_name"` ## Server[​](#server "Direct link to Server") Except if you have defined a connection string (`-g` or `--sourceconnectstring`), you must define a server (or could also be a TNS entry for Oracle). **Syntax:** * Short form: `-S "server"` * Long form: `--server "server"` ### Server Format Examples[​](#server-format-examples "Direct link to Server Format Examples") The server parameter accepts different formats depending on your database: **IP address or DNS name:** ``` ./FastBCP \ ... --server "myserver.mydomain.com" \ ... ``` **IP address or DNS name with port number:** ``` ./FastBCP \ ... --server "myserver.mydomain.com:2433" \ ... ``` or ``` ./FastBCP \ ... --server "myserver.mydomain.com,2433" \ ... ``` **IP address or DNS name with named instance:** ``` ./FastBCP \ ... --server "myserver.mydomain.com\myinstance" \ ... ``` **For Oracle - Easy Connect string:** ``` ./FastBCP \ ... --server "myserver.mydomain.com:1521/myinstance" \ ... ``` ## Trusted or User & Password[​](#trusted-or-user--password "Direct link to Trusted or User & Password") ### Trusted[​](#trusted "Direct link to Trusted") You can used a trusted (Windows or Kerberos Authentication) using the `--trusted` switch parameter. ``` ./FastBCP \ ... --server "myserver.mydomain.com\myinstance \ --trusted \ --database MySourceDB" \ ... ``` ### User and Password[​](#user-and-password "Direct link to User and Password") You can also provide a user and password the `--user` and `--password` can be used like this ``` ./FastBCP \ ... --server "myserver.mydomain.com\myinstance \ --user "FastUser" \ --password "FastPassword" \ --database MySourceDB" \ ... ``` ## 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 database. This connection string will override any other connection parameters and can be used if the other authentication mode are not enougth for your case You can use the connection string for any connection type. The connection string must be enclosed in double quotes. **Example:** ``` ./FastBCP \ ... --sourceconnectstring "Server=myserver;Database=mydb;User ID=FastUser;Password=FastPassword;Encrypt=True;TrustServerCertificate=True" ... ``` **Syntax:** * Short form: `-g "connection_string"` * Long form: `--sourceconnectstring "connection_string"` ## Database[​](#database "Direct link to Database") Optionally define a source database. **Example:** ``` ./FastBCP \ ... --database "AdventureWorks" \ ... ``` **Syntax:** * Short form: `-I "database_name"` * Long form: `--database "database_name"` ## Application Intent[​](#application-intent "Direct link to Application Intent") Specifies the application workload type when connecting to SQL Server. This parameter is only applicable for SQL Server (`mssql`) and OLEDB (`oledb`) connection types. **Syntax:** * Long form: `--applicationintent "ReadOnly|ReadWrite"` **Values:** * `ReadOnly` (default) - Declares the read-only workload type when connecting to a read-only replica in an Always On availability group * `ReadWrite` - Declares a read-write workload type (standard connection) **Example (Read-Only):** ``` ./FastBCP \ --connectiontype mssql \ --server "myserver.mydomain.com" \ --applicationintent ReadOnly \ --database "AdventureWorks" \ ... ``` **Example (Read-Write):** ``` ./FastBCP \ --connectiontype mssql \ --server "myserver.mydomain.com" \ --applicationintent ReadWrite \ --database "AdventureWorks" \ ... ``` info When using `ReadOnly`, the connection will be routed to a read-only replica if available in an Always On availability group configuration. This is useful for offloading reporting and export workloads from the primary replica. --- # CSV Formatting When exporting to CSV format (`.csv` extension), FastBCP provides extensive formatting options. ## Delimiter[​](#delimiter "Direct link to Delimiter") Use the `-d` or `--delimiter` parameter to specify the character(s) used to separate fields. ``` ./FastBCP \ ... --fileoutput "data.csv" \ --delimiter "," \ ... ``` **Syntax:** * Short form: `-d "delimiter"` * Long form: `--delimiter "delimiter"` **Default:** `,` (comma) ### Common Delimiters[​](#common-delimiters "Direct link to Common Delimiters") * Comma (CSV) * Tab (TSV) * Pipe * Semicolon ``` --delimiter "," ``` ``` --delimiter "\t" ``` ``` --delimiter "|" ``` ``` --delimiter ";" ``` ## Use Quotes[​](#use-quotes "Direct link to Use Quotes") Use the `-t` or `--quotes` switch to enclose string fields in double quotes. ``` ./FastBCP \ ... --fileoutput "products.csv" \ --quotes \ ... ``` **Syntax:** * Short form: `-t` * Long form: `--quotes` **Default:** Without quotes * Without --quotes * With --quotes ``` ProductID,ProductName,Description,Price 1,Widget A,Small widget,19.99 2,Widget B,Large widget,29.99 ``` ``` "ProductID","ProductName","Description","Price" "1","Widget A","Small widget","19.99" "2","Widget B","Large widget","29.99" ``` Information When `--quotes`, any double quotes (`"`) in the data are escaped with backslash (`\"`). ## Date Format[​](#date-format "Direct link to Date Format") Use the `-f` or `--dateformat` parameter to specify how dates and timestamps are formatted. ``` ./FastBCP \ ... --fileoutput "orders.csv" --dateformat "yyyy-MM-dd HH:mm:ss" \ ... ``` **Syntax:** * Short form: `-f "format"` * Long form: `--dateformat "format"` **Default:** Database default format ### Format Codes[​](#format-codes "Direct link to Format Codes") | Code | Description | Example | | ------ | ---------------- | ------- | | `yyyy` | 4-digit year | `2026` | | `MM` | Month (01-12) | `01` | | `dd` | Day (01-31) | `07` | | `HH` | Hour 24h (00-23) | `14` | | `mm` | Minute (00-59) | `30` | | `ss` | Second (00-59) | `22` | ## Decimal Separator[​](#decimal-separator "Direct link to Decimal Separator") Use the `-n` or `--decimalseparator` parameter to specify the decimal separator for numeric values. ``` ./FastBCP \ ... --fileoutput "products.csv" --decimalseparator "," ... ``` **Syntax:** * Short form: `-n "separator"` * Long form: `--decimalseparator "separator"` **Default:** `.` (period/dot) ## No Header[​](#no-header "Direct link to No Header") Use the `-h` or `--noheader` parameter to exclude column headers from the output. ``` ./FastBCP \ ... --fileoutput "customers.csv" \ --noheader \ ... ``` **Syntax:** * Short form: `-h` * Long form: `--noheader` - Without --noheader (default) - With --noheader ``` CustomerID,CustomerName,Email 1,John Doe,john@example.com 2,Jane Smith,jane@example.com ``` ``` 1,John Doe,john@example.com 2,Jane Smith,jane@example.com ``` ## Boolean Format[​](#boolean-format "Direct link to Boolean Format") Use the `-b` or `--boolformat` parameter to specify how boolean values are represented. ``` ./FastBCP \ ... --fileoutput "products.csv" \ --boolformat "1/0" \ ... ``` **Syntax:** * Short form: `-b "format"` * Long form: `--boolformat "format"` **Default:** `True/False` **Options:** * `true/false` * `t/f` * `1/0` **With `--boolformat "true/false"` (default):** ``` ProductID,ProductName,InStock,Discontinued 1,Widget A,true,false 2,Widget B,false,true ``` **With `--boolformat "1/0"`:** ``` ProductID,ProductName,InStock,Discontinued 1,Widget A,1,0 2,Widget B,0,1 ``` **With `--boolformat "yes/no"`:** ``` ProductID,ProductName,InStock,Discontinued 1,Widget A,yes,no 2,Widget B,no,yes ``` ## Complete Example[​](#complete-example "Direct link to Complete Example") * Windows * Linux ``` .\FastBCP.exe ` --connectiontype mssql ` --server "localhost" ` --database "AdventureWorks" ` --trusted ` --query "SELECT OrderID, OrderDate, CustomerName, TotalAmount, IsShipped FROM Sales.Orders WHERE OrderDate >= '2024-01-01'" ` --directory "C:\exports\sales" ` --fileoutput "orders_{startdate}.csv" ` --delimiter "," ` --quotes ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --decimalseparator "." ` --boolformat "1/0" ` --encoding "UTF-8" ``` ``` ./FastBCP \ --connectiontype mssql \ --server "localhost" \ --database "AdventureWorks" \ --trusted \ --query "SELECT OrderID, OrderDate, CustomerName, TotalAmount, IsShipped FROM Sales.Orders WHERE OrderDate >= '2024-01-01'" \ --directory "/exports/sales" \ --fileoutput "orders_{startdate}.csv" \ --delimiter "," \ --quotes \ --dateformat "yyyy-MM-dd HH:mm:ss" \ --decimalseparator "." \ --boolformat "1/0" \ --encoding "UTF-8" ``` **Output (orders\_20260107.csv):** ``` "OrderID","OrderDate","CustomerName","TotalAmount","IsShipped" "1001","2026-01-05 10:30:00","John Doe","299.99","1" "1002","2026-01-05 11:15:00","Jane Smith","149.50","0" "1003","2026-01-06 09:20:00","Bob Johnson","599.00","1" ``` tip For Excel compatibility, use `.xlsx` format instead: `--fileoutput "data.xlsx"` --- # License Configure how FastBCP 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 FastBCP license. By default, FastBCP will try to use the license file named `FastBCP.lic` in the same directory as the FastBCP executable. You can specify a custom license file using the `--license` parameter. ### License Sources[​](#license-sources "Direct link to License Sources") FastBCP 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 ``` .\FastBCP.exe ` ... --license "C:\licenses\FastBCP.lic" ` ... ``` ``` ./FastBCP \ ... --license "/path/to/licenses/FastBCP.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 ``` .\FastBCP.exe ` ... --license "https://licenseserve.yourdomain.lan/fastbcp.lic" ` ... ``` ``` ./FastBCP \ ... --license "https://licenseserve.yourdomain.lan/fastbcp.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:FASTBCP_LICENSE = "LICENSE_CONTENT_HERE" .\FastBCP.exe ` ... --license $env:FASTBCP_LICENSE ` ... # Using variable $license = Get-Content "C:\licenses\FastBCP.lic" -Raw .\FastBCP.exe ` ... --license $license ` ... ``` ``` # Using environment variable export FASTBCP_LICENSE="LICENSE_CONTENT_HERE" ./FastBCP \ ... --license "$FASTBCP_LICENSE" \ ... # Using variable license=$(cat /path/to/licenses/FastBCP.lic) ./FastBCP \ ... --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 parallel export: * Windows * Linux ``` .\FastBCP.exe ` --connectiontype pgsql ` --server "localhost:15432" ` --database "tpch10" ` --user "FastUser" ` --password "FastPassword" ` --query "SELECT * FROM dbo.orders" ` --directory "D:\temp" ` --fileoutput "pgsql_orders.parquet" ` --parallelmethod DataDriven ` --distributekeycolumn "YEAR(o_orderdate)" ` --paralleldegree 7 ` --merge false ` --runid "pgsql_to_parquet_parallel_datadriven" ` --license "//SharedUnc/licenses/fastbcp/fastbcp.lic" ``` ``` ./FastBCP \ --connectiontype pgsql \ --server "localhost:15432" \ --database "tpch10" \ --user "FastUser" \ --password "FastPassword" \ --query "SELECT * FROM dbo.orders" \ --directory "/temp" \ --fileoutput "pgsql_orders.parquet" \ --parallelmethod DataDriven \ --distributekeycolumn "YEAR(o_orderdate)" \ --paralleldegree 7 \ --merge false \ --runid "pgsql_to_parquet_parallel_datadriven" \ --license "//SharedUnc/licenses/fastbcp/fastbcp.lic" ``` This example: * Retrieves the license from a remote unc path * Connects to a PostgreSQL database * Exports orders data using DataDriven parallel method with 7 threads * Uses a YEAR expression on the distribute key column * Keeps distributed files separate (merge=false) --- # Output Info Configure where and how FastBCP saves exported data. ## Directory[​](#directory "Direct link to Directory") Use the `-D` or `--directory` parameter to specify where the output file(s) will be saved. ### Local Paths[​](#local-paths "Direct link to Local Paths") * Windows * Linux ``` .\FastBCP.exe \ ... --directory "C:\exports\sales\orders" \ ... ``` ``` ./FastBCP \ ... --directory "/exports/sales/orders" \ ... ``` ### UNC Paths[​](#unc-paths "Direct link to UNC Paths") For Windows network shares, you can use UNC paths: ``` .\FastBCP.exe \ ... --directory "\\server\share\exports\orders" \ ... ``` ### Cloud Paths[​](#cloud-paths "Direct link to Cloud Paths") FastBCP supports direct export to cloud storage: * AWS S3 * Azure Blob * Azure Data Lake Gen2 * Google Cloud Storage * S3-Compatible (MinIO, OVH) * OneLake ``` ./FastBCP \ ... --directory "s3://my-bucket/exports/orders" \ ... ``` ``` ./FastBCP \ ... --directory "abs://mystorageaccount.blob.core.windows.net/container/path" \ ... ``` ``` ./FastBCP \ ... --directory "abfss://mystorageaccount.dfs.core.windows.net/container/path/to/data" \ ... ``` ``` ./FastBCP \ ... --directory "gs://my-bucket/exports/orders" \ ... ``` ``` ./FastBCP \ ... --directory "s3://my-bucket/exports" \ ... ``` ``` ./FastBCP \ ... --directory "onelake://myworkspace.dfs.core.windows.net/lakehouse/path/to/data" \ ... ``` Information See [Cloud Options](/0.32/documentation/cli/cloud_options.md) for authentication and configuration details. **Syntax:** * Short form: `-D "path"` * Long form: `--directory "path"` ## Output File[​](#output-file "Direct link to Output File") Use the `-o` or `--fileoutput` parameter to specify the name of the output file. The file extension determines the output format. ``` ./FastBCP \ ... --fileoutput "orders.parquet" \ ... ``` **Syntax:** * Short form: `-o "filename"` * Long form: `--fileoutput "filename"` ### Supported Formats[​](#supported-formats "Direct link to Supported Formats") | Extension | Format | Description | | ---------- | ------------ | --------------------------------------------------- | | `.parquet` | Parquet | Columnar, compressed (recommended) | | `.csv` | CSV | Delimiter-separated values | | `.tsv` | TSV | Tab-separated values | | `.json` | JSON | JavaScript Object Notation | | `.bson` | BSON | Binary JSON | | `.xlsx` | Excel | Microsoft Excel format | | `.bin` | Binary | PostgreSQL COPY binary format | | `.csv.gz` | CSV Gzipped | Delimiter-separated values and compressed with Gzip | | `.tsv.gz` | TSV Gzipped | Tab delimited values and compressed with Gzip | | `.json.gz` | JSON Gzipped | JavaScript Object Notation with Gzip | ## Tokens[​](#tokens "Direct link to Tokens") Use tokens in `--directory` and `--fileoutput` parameters for dynamic paths and filenames. ``` ./FastBCP \ ... --directory "/exports/{sourcedatabase}/{sourceschema}" \ --fileoutput "{sourcetable}_{startdate}.parquet" \ ... ``` **Syntax:** Tokens are enclosed in curly braces `{token_name}` ### Available Tokens[​](#available-tokens "Direct link to Available Tokens") | Token | Description | Example Value | | ------------------------- | ---------------------------------- | ------------------------------------ | | `{sourcedatabase}` | Value from `--database` | `AdventureWorks` | | `{sourceschema}` | Value from `--sourceschema` | `Sales` | | `{sourcetable}` | Value from `--sourcetable` | `Orders` | | `{starttimestamp}` | Job start (yyyyMMddHHmmss) | `20260107143022` | | `{starttimestamp:FORMAT}` | Custom timestamp format | [See below](#timestamp-format-codes) | | `{startdate}` | Job start date (yyyyMMdd) | `20260107` | | `{starttime}` | Job start time (HHmmss) | `143022` | | `{starthour}` | Job start hour (HH) | `14` | | `{user}` | Username (from `--user` or system) | `dbuser` | | `{filetype}` | Output format extension | `parquet` | | `{datadrivencolumn}` | Data-driven split value | Varies | ### Timestamp Format Codes[​](#timestamp-format-codes "Direct link to Timestamp Format Codes") Use `{starttimestamp:FORMAT}` with custom format: | Format | Description | Example | | ------ | ---------------- | ------- | | `yyyy` | 4-digit year | `2026` | | `yy` | 2-digit year | `26` | | `MM` | Month (01-12) | `01` | | `dd` | Day (01-31) | `07` | | `HH` | Hour 24h (00-23) | `14` | | `mm` | Minute (00-59) | `30` | | `ss` | Second (00-59) | `22` | **Examples:** ``` # yyyyMMdd format ./FastBCP \ ... --fileoutput "orders_{starttimestamp:yyyyMMdd}.parquet" \ ... # yyyy-MM-dd format ./FastBCP \ ... --fileoutput "orders_{starttimestamp:yyyy-MM-dd}.parquet" \ ... # yyyyMMddHH format (hourly) ./FastBCP \ ... --fileoutput "logs_{starttimestamp:yyyyMMddHH}.parquet" \ ... ``` ## Timestamped Output[​](#timestamped-output "Direct link to Timestamped Output") Use the `-x` or `--timestamped` parameter to automatically add a timestamp to the filename. ``` ./FastBCP \ ... --fileoutput "orders.parquet" \ --timestamped \ ... ``` **Syntax:** * Short form: `-x` * Long form: `--timestamped` tip `--timestamped` automatically appends `_yyyyMMddHHmmss` to the filename. For more control over format and placement, use timestamp tokens instead. ## Encoding[​](#encoding "Direct link to Encoding") Use the `-e` or `--encoding` parameter to specify character encoding for text formats (CSV, JSON, TSV). ``` ./FastBCP \ ... --fileoutput "orders.csv" \ --encoding "UTF-8" \ ... ``` **Syntax:** * Short form: `-e "encoding"` * Long form: `--encoding "encoding"` **Default:** `UTF-8` note Encoding is not applicable to Parquet files (they use UTF-8 internally). --- # Parallel Parameters FastBCP 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 ``` .\FastBCP.exe ` ... --parallelmethod Ntile ` ... ``` ``` ./FastBCP \ ... --parallelmethod Ntile \ ... ``` **Syntax:** * Short form: `-m ` * Long form: `--parallelmethod ` ### Methods Comparison[​](#methods-comparison "Direct link to Methods Comparison") | Method | Parallel | Needs Distributed Column | Database Source Type | | --------------- | -------- | ------------------------ | ------------------------- | | `None` | | | Any | | `Random` | | | Any | | `DataDriven` | | | Any | | `RangeId` | | | Any | | `Ntile` | | | Any | | `Ctid` | | | PostgreSQL (pgsql/pgcopy) | | `Physloc` | | | SQL Server (mssql) | | `Rowid` | | | Oracle (oraodp) | | `NZDataSlice` | | | Netezza (nzsql) | | `Timepartition` | | | Any | ### Available Methods[​](#available-methods "Direct link to Available Methods") **None** - No parallel processing. Data is exported sequentially. **DataDriven** - Uses all values of a column (or a given list provided by `--datadrivenquery`) to split the export. If the number of values is greater than the degree of parallelism, throttling will be applied. tip You can use an expression in the distribute key column instead of a column name.
Example: `YEAR(o_orderdate)` **Ntile** - Uses the distributed column field and ntile values to retrieve evenly distributed chunks of data. Each parallel thread exports a portion based on a range built using the distributed column values. The uniqueness of the distributed column is not mandatory. **RangeId** - Uses the distributed column field and its min/max values to retrieve chunks of data. Each parallel thread exports a portion based on a range built using the distributed column values. **Random** - Requires a distribution column that must be an integer/bigint with many values (at least as many as the degree of parallelism). **Ctid** - Uses an internal hidden field to retrieve chunks of data. Each parallel thread exports a portion based on the CTID range. note PostgreSQL databases only (and some compatible PostgreSQL databases). **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. **Rowid** - Uses an internal hidden field to retrieve chunks of data. Each parallel thread exports a portion based on the ROWID range. note `RowId` parallel method is for Oracle databases only. **NZDataSlice** - Uses the native Netezza data slices to retrieve chunks of data. Each parallel thread exports a portion based on the data slice distribution. note `NZDataSlice` parallel method is for Netezza databases only. **Timepartition** - Uses a date/datetime column to partition data into time-based chunks. Each parallel thread exports data for a specific time period (year, month, week, or day). The distributed key column must be specified in a special format: `(datecolumn, year, month)`, `(datecolumn, year, month, day)`, `(datecolumn, year)`, or `(datecolumn, year, week)`. tip This method is ideal for time-series data and allows efficient parallel export based on temporal ranges. ## Distribute Key Column[​](#distribute-key-column "Direct link to Distribute Key Column") Use the `-c` or `--distributekeycolumn` parameter to define the column (or computation) on the data source that will be used to split the data into several parts. FastBCP 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. Timepartition Special Format When using the `Timepartition` method, the distribute key column must be specified in a special format: * `(datecolumn, year, month)` - Partition by year and month * `(datecolumn, year, month, day)` - Partition by year, month, and day * `(datecolumn, year)` - Partition by year only * `(datecolumn, year, week)` - Partition by year and week Example: `--distributekeycolumn "(o_orderdate, year, month)"` * Windows * Linux ``` # Using a column name .\FastBCP.exe ` ... --distributekeycolumn order_date ` ... # Using an expression .\FastBCP.exe ` ... --distributekeycolumn "YEAR(order_date)" ` ... ``` ``` # Using a column name ./FastBCP \ ... --distributekeycolumn order_date \ ... # Using an expression ./FastBCP \ ... --distributekeycolumn "YEAR(order_date)" \ ... ``` **Syntax:** * Short form: `-c ` * Long form: `--distributekeycolumn ` ## Degree of Parallelism[​](#degree-of-parallelism "Direct link to Degree of Parallelism") Use the `-p` or `--paralleldegree` 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 .\FastBCP.exe ` ... --paralleldegree 8 ` ... # Auto-detect based on CPU cores .\FastBCP.exe ` ... --paralleldegree 0 ` ... # Use half of available cores .\FastBCP.exe ` ... --paralleldegree -2 ` ... ``` ``` # Use 8 parallel threads ./FastBCP \ ... --paralleldegree 8 \ ... # Auto-detect based on CPU cores ./FastBCP \ ... --paralleldegree 0 \ ... # Use half of available cores ./FastBCP \ ... --paralleldegree -2 \ ... ``` **Syntax:** * Short form: `-p ` * Long form: `--paralleldegree ` **Default:** `-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. * Windows * Linux ``` .\FastBCP.exe ` ... --datadrivenquery "SELECT tagname FROM tags" ` ... ``` ``` ./FastBCP \ ... --datadrivenquery "SELECT tagname FROM tags" \ ... ``` * Windows * Linux ``` .\FastBCP.exe ` ... --datadrivenquery "SELECT o_orderdate FROM dim_date where ref_date > getdate() - 30" ` ... ``` ``` ./FastBCP \ ... --datadrivenquery "SELECT o_orderdate FROM dim_date where ref_date > getdate() - 30" \ ... ``` **Syntax:** * Long form only: `--datadrivenquery ""` ## Merge (boolean)[​](#merge-boolean "Direct link to Merge (boolean)") Use the `-M` or `--merge` true/false to specify if the temporary files generated for the parallel export should be kept splitted. Default `false` warning Current version allows valid merge for CSV and Parquet formats only. warning Merge is not available for cloud destinations warning Merge is automatic for local files destination * Windows * Linux ``` # Merge files after parallel export (default for local files) .\FastBCP.exe ` ... --merge true ` ... # Keep distributed files .\FastBCP.exe ` ... --merge false ` ... ``` ``` # Merge files after parallel export (default for local files) ./FastBCP \ ... --merge true \ ... # Keep distributed files ./FastBCP \ ... --merge false \ ... ``` **Syntax:** * Short form: `-M` * Long form: `--merge` **Default:** `true` ## Complete Example[​](#complete-example "Direct link to Complete Example") Here's a complete example using parallel parameters with the DataDriven method: * Windows * Linux ``` .\FastBCP.exe ` --connectiontype "pgcopy" ` --server "localhost:15432" ` --database "tpch" ` --user "FastUser" ` --password "FastPassword" ` --query "with T1 AS (select *, to_char(o_orderdate, 'YYYYMM') o_ordermonth from tpch_10.orders) SELECT * FROM T1" ` --directory "D:\temp\tpch\orders\" ` --fileoutput "pgcopy_orders.parquet" ` --method "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" ` --paralleldegree 10 ` --merge "False" ` --runid "pgcopy_to_parquet_parallel12_DataDriven" ``` ``` ./FastBCP \ --connectiontype "pgcopy" \ --server "localhost:15432" \ --database "tpch" \ --user "FastUser" \ --password "FastPassword" \ --query "with T1 AS (select *, to_char(o_orderdate, 'YYYYMM') o_ordermonth from tpch_10.orders) SELECT * FROM T1" \ --directory "/data/export/tpch/orders/" \ --fileoutput "pgcopy_orders.parquet" \ --method "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" \ --paralleldegree 10 \ --merge "False" \ --runid "pgcopy_to_parquet_parallel12_DataDriven" ``` This example: * Connects to a PostgreSQL database on localhost:15432 * Exports data from the dbo.orders table * Uses the DataDriven distribution method * Distributes work based on the month of the order date using an expression * Use a custom query to generate month values to extract from a light query (instead of a `SELECT DISTINCT o_ordermonth` from the source query) * Uses 10 parallel threads (even if there is 12 month to export) * Keeps distributed files without merging (--merge false) * Assigns a custom Run ID for tracking ## Timepartition Example[​](#timepartition-example "Direct link to Timepartition Example") Here's an example using the Timepartition method to partition data based on a date column: * Windows * Linux ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "tpch_copy" ` --user "FastUser" ` --password "FastPassword" ` --sourceschema "tpch_10" ` --sourcetable "orders_date_sorted" ` --directory "D:\temp\TestPartition" ` --fileoutput "orders.csv" ` --decimalseparator "," ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --method "Timepartition" ` --distributekeycolumn "(o_orderdate,year,month)" ` --paralleldegree 16 ` --merge "False" ` --runid "mssql_to_csv_parallel8_timepartition" ``` ``` ./FastBCP \ --connectiontype "mssql" \ --server "localhost" \ --database "tpch_copy" \ --user "FastUser" \ --password "FastPassword" \ --sourceschema "tpch_10" \ --sourcetable "orders_date_sorted" \ --directory "/data/export/TestPartition" \ --fileoutput "orders.csv" \ --decimalseparator "," \ --delimiter "|" \ --dateformat "yyyy-MM-dd HH:mm:ss" \ --encoding "UTF-8" \ --method "Timepartition" \ --distributekeycolumn "(o_orderdate,year,month)" \ --paralleldegree 16 \ --merge "False" \ --runid "mssql_to_csv_parallel8_timepartition" ``` This example: * Connects to a SQL Server database on localhost * Exports data from the tpch\_10.orders\_date\_sorted table * Uses the Timepartition distribution method * Partitions data by year and month based on the o\_orderdate column * Uses 16 parallel threads * Keeps distributed files without merging * Assigns a custom Run ID for tracking --- # Parquet Formatting [Apache Parquet](https://parquet.apache.org/) is a columnar storage format optimized for analytics. FastBCP automatically uses Parquet format when the output file has a `.parquet` extension. ## Parquet Compression[​](#parquet-compression "Direct link to Parquet Compression") Use the `--parquetcompression` parameter to specify the parquet compression codec. ``` ./FastBCP \ ... --fileoutput "orders.parquet" \ --parquetcompression Snappy \ ... ``` **Syntax:** * Long form: `--parquetcompression ` **Default:** `Zstd` (faster and better compression ratio than others) **Available Algorithms:** * `None` - No compression * `Snappy` - Fast, small compression, classic * `Gzip` - Smaller files, slower * `Lzo` - Slower, medium compression (rarely used) * `Lz4` - Slower, moderate compression * `Zstd` - Best compression and Fast (default) tip The **Zstd** (default) is best for most cases. It provides the best compression ratio with moderate speed, ideal for cloud storage to minimize storage costs and transfer time. * So no need to set this parameter to use Zstd. ## Row Group Size Configuration[​](#row-group-size-configuration "Direct link to Row Group Size Configuration") Available since version 0.30.1 This feature is available starting from FastBCP version 0.30.1. You can control the Parquet row group size using the `FASTBCP_RGSIZE` environment variable. Row groups are the unit of parallelization in Parquet files, and their size can impact query performance and memory usage. **Environment Variable:** `FASTBCP_RGSIZE` **Default Value:** `1000000` (1 million rows) **Usage:** * Windows * Linux ``` # Set the row group size to 500,000 rows $env:FASTBCP_RGSIZE = "500000" # Run FastBCP .\FastBCP.exe --connectiontype mssql --server "localhost" ... ``` ``` # Set the row group size to 500,000 rows export FASTBCP_RGSIZE=500000 # Run FastBCP ./FastBCP --connectiontype mssql --server "localhost" ... ``` ## Complete Example[​](#complete-example "Direct link to Complete Example") * Windows * Linux ``` $env:FASTBCP_RGSIZE = "500000" .\FastBCP.exe ` --connectiontype mssql ` --server "localhost" ` --database "sales" ` --trusted ` --query "SELECT * FROM orders WHERE OrderDate >= '2024-01-01'" ` --directory "C:\exports" ` --fileoutput "orders.parquet" ` --parquetcompression Snappy ``` ``` export FASTBCP_RGSIZE=500000 ./FastBCP \ --connectiontype mssql \ --server "localhost" \ --database "sales" \ --trusted \ --query "SELECT * FROM orders WHERE OrderDate >= '2024-01-01'" \ --directory "/exports" \ --fileoutput "orders.parquet" \ --parquetcompression Snappy ``` --- # Source Info FastBCP offers multiple ways to define your data source for extraction. You can use a query, an input file, or specify schema and table names directly. ## Query[​](#query "Direct link to Query") Use the `-q` or `--query` parameter to specify your extraction as a SELECT statement. ``` ./FastBCP \ ... --query "SELECT * FROM Sales.Orders WHERE OrderDate >= '2024-01-01'" \ ... ``` **Syntax:** * Short form: `-q "SELECT_statement"` * Long form: `--query "SELECT_statement"` ## Input File[​](#input-file "Direct link to Input File") Use the `-F` or `--fileinput` parameter to specify an input file that contains only one query. ``` ./FastBCP \ ... --fileinput "/sources/sql/queries/my_extraction.sql" \ ... ``` **Syntax:** * Short form: `-F "file_path"` * Long form: `--fileinput "file_path"` Warning The query in the input file must not end with a semicolon (`;`). ## Source Schema[​](#source-schema "Direct link to Source Schema") If no query or input file is used, you can specify the source schema with the `-s` or `--sourceschema` parameter. Combined with the source table, this will extract data from `sourceschema.sourcetable`. ``` ./FastBCP \ ... --sourceschema "Sales" \ --sourcetable "Orders" \ ... ``` **Syntax:** * Short form: `-s "schema_name"` * Long form: `--sourceschema "schema_name"` Information This field is mandatory if some parallel method is used. See **[Advanced Parameters](/0.32/documentation/cli/advanced_parameters.md)** section for more details. ## Source Table[​](#source-table "Direct link to Source Table") If no query or input file is used, you can specify the source table with the `-T` or `--sourcetable` parameter. Combined with the source schema, this will extract data from `sourceschema.sourcetable`. ``` ./FastBCP \ ... --sourceschema "Sales" \ --sourcetable "Orders" \ ... ``` **Syntax:** * Short form: `-T "table_name"` * Long form: `--sourcetable "table_name"` Information This field is mandatory if some parallel method is used. See **[Advanced Parameters](/0.32/documentation/cli/advanced_parameters.md)** section for more details. Warning if you use the placeholder `{sourceschema}` and `{sourcetable}` in the `--directory` or `--fileoutput` (See **[Output Info](/0.32/documentation/cli/output_info.md)**) then you must set the `--sourceschema `and the `--sourcetable `even you use `--query `or `--inputfile` --- # AWS S3 Configuration Complete guide for configuring AWS S3 connectivity with FastBCP. ## Authentication Methods[​](#authentication-methods "Direct link to Authentication Methods") FastBCP 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 FastBCP:** ``` # Use default profile ./FastBCP \ ... --directory "s3://my-bucket/exports" \ --fileoutput "data.parquet" \ ... # Use production profile ./FastBCP \ ... --directory "s3://prod-bucket/exports" \ --cloudprofile "production" \ --fileoutput "data.parquet" \ ... # Use development profile ./FastBCP \ ... --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 FastBCP .\FastBCP.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 FastBCP ./FastBCP \ ... --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 FastBCP 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 FastBCP:** ``` { "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 ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "orders" ` --directory "s3://my-bucket/exports/{sourcetable}" ` --fileoutput "{sourcetable}.parquet" ``` ``` ./FastBCP \ --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 ``` .\FastBCP.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" ``` ``` ./FastBCP \ --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 ``` .\FastBCP.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 ``` ``` ./FastBCP \ --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") FastBCP 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 FastBCP. ## 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") FastBCP 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 ``` FastBCP will automatically use the Azure CLI's authentication credentials. **Using with FastBCP:** ``` # No additional configuration needed - just run FastBCP ./FastBCP \ ... --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 FastBCP .\FastBCP.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 FastBCP ./FastBCP \ ... --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 FastBCP .\FastBCP.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 FastBCP ./FastBCP \ ... --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 FastBCP 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 ``` .\FastBCP.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" ``` ``` ./FastBCP \ --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 ``` .\FastBCP.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 ``` ``` ./FastBCP \ --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 ``` .\FastBCP.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" ``` ``` ./FastBCP \ --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 ``` .\FastBCP.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 ``` ``` ./FastBCP \ --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 FastBCP. ## Authentication Methods[​](#authentication-methods "Direct link to Authentication Methods") FastBCP 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 ``` FastBCP will automatically use the gcloud CLI's authentication credentials. **Using with FastBCP:** ``` # No additional configuration needed - just run FastBCP ./FastBCP \ ... --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., "fastbcp-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 fastbcp-export \ --display-name="FastBCP Export Service Account" # Grant Storage Object Admin role gcloud projects add-iam-policy-binding my-project-id \ --member="serviceAccount:fastbcp-export@my-project-id.iam.gserviceaccount.com" \ --role="roles/storage.objectAdmin" # Create and download key file gcloud iam service-accounts keys create ~/fastbcp-key.json \ --iam-account=fastbcp-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\fastbcp-key.json" # Run FastBCP .\FastBCP.exe ` ... --directory "gs://my-bucket/exports" ` --fileoutput "data.parquet" ` ... ``` ``` # Set path to service account key file export GOOGLE_APPLICATION_CREDENTIALS="/path/to/fastbcp-key.json" # Run FastBCP ./FastBCP \ ... --directory "gs://my-bucket/exports" \ --fileoutput "data.parquet" \ ... ``` ### 3. Default Application Credentials[​](#3-default-application-credentials "Direct link to 3. Default Application Credentials") When FastBCP 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 ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Orders" ` --directory "gs://my-bucket/exports/orders" ` --fileoutput "orders.parquet" ``` ``` ./FastBCP \ --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 ``` .\FastBCP.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 ``` ``` ./FastBCP \ --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 ``` .\FastBCP.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 ``` ``` ./FastBCP \ --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 ``` .\FastBCP.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 ``` ``` ./FastBCP \ --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:fastbcp-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 FastBCP 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" .\FastBCP.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 "onelake://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" ./FastBCP ` --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 "onelake://myworkspace/mylakehouse/{sourcedatabase}/{sourceschema}/{sourcetable}/year=2024/" \ --fileoutput "orders_2024.parquet" \ --parallelmethod "Ctid" \ --paralleldegree 8 ``` --- # Cloud Connectivity Overview FastBCP 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 FastBCP will use multi-part uploads for all cloud provider Warning Since FastBCP 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") FastBCP 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.32/documentation/cloud-connectivity/aws-s3.md) * [Azure Setup](/0.32/documentation/cloud-connectivity/azure.md) * [Google Cloud Storage Setup](/0.32/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 ./FastBCP / ... --directory "s3://my-bucket/exports" / --fileoutput "data.parquet" / ... ``` ``` # Azure Blob ./FastBCP \ ... --directory "abs://account.blob.core.windows.net/container/exports/" \ --fileoutput "data.parquet" \ ... ``` ``` # Azure Datalake Gen 2 ./FastBCP \ ... --directory "abs://account.dfs.core.windows.net/container/exports/" \ --fileoutput "data.parquet" \ ... ``` ``` # Google Cloud Storage ./FastBCP \ ... --directory "gs://my-bucket/exports" \ --fileoutput "data.parquet" \ ... ``` ``` # OneLake ./FastBCP \ ... --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: ``` ./FastBCP \ ... --directory "s3://prod-bucket/exports" \ --cloudprofile "production" \ ... ./FastBCP \ ... --directory "s3://dev-bucket/exports" \ --cloudprofile "development" ... ``` --- # Operating Systems FastBCP supports Windows and Linux 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 | | ------------------------ | -------------------------- | ------------- | --------- | | Amazon Linux | 2023 (Kernel 6.1) | Arm64, x64 | | | 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 FastBCP supports a wide range of database systems across different platforms. ## Supported Databases & Platforms[​](#supported-databases--platforms "Direct link to Supported Databases & Platforms") | Database | Windows AMD64 | Linux AMD64 | Linux ARM64 | | -------------- | ------------- | ----------- | ----------- | | **SQL Server** | | | | | **PostgreSQL** | | | | | **MySQL** | | | | | **Oracle** | | | | | **ClickHouse** | | | | | **DuckDB** | | | | | **Teradata** | | | | | **Netezza** | | | | | **SAP HANA** | | | | | **ODBC** | | | | | **OLEDB** | | | | --- # Advanced Scenarios Advanced use cases, partition functions, and troubleshooting examples. ## SQL Server Partition Functions[​](#sql-server-partition-functions "Direct link to SQL Server Partition Functions") Use SQL Server partition functions for efficient parallel exports. ### Using Partition Function with DataDriven[​](#using-partition-function-with-datadriven "Direct link to Using Partition Function with DataDriven") Leverage existing partition functions to distribute work: ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "tpch10_collation_bin2" ` --trusted ` --sourceschema "dbo" ` --sourcetable "orders_part" ` --directory "D:\temp" ` --fileoutput "orders_partitioned.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "DataDriven" ` --distributekeycolumn "`$partition.PF_DATE(o_orderdate)" ` --paralleldegree 10 ` --merge "False" ``` Partition Function Syntax Use `` `$partition.FunctionName(ColumnName) `` to reference a partition function. The backtick escapes the dollar sign in PowerShell. ### Date-based Partitioning[​](#date-based-partitioning "Direct link to Date-based Partitioning") #### Partition by date ranges for time-series data using database partitions:[​](#partition-by-date-ranges-for-time-series-data-using-database-partitions "Direct link to Partition by date ranges for time-series data using database partitions:") ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "TimeSeriesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "SensorReadings" ` --directory "C:\temp" ` --fileoutput "sensor_readings.parquet" ` --parallelmethod "DataDriven" ` --distributekeycolumn "`$partition.PF_Monthly(reading_date)" ` --paralleldegree 12 ` --merge "False" ``` #### Partition by date ranges for time-series data using Timepartition FastBCP parallelmethod :[​](#partition-by-date-ranges-for-time-series-data-using-timepartition-fastbcp-parallelmethod-- "Direct link to Partition by date ranges for time-series data using Timepartition FastBCP parallelmethod :") ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "TimeSeriesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "SensorReadings" ` --directory "s3://mycorpexportbucket/raw/TimeSeriesDB/SensorReadings/" ` --fileoutput "sensor_readings.parquet" ` --cloudprofile "mycorps3profile" ` --parallelmethod "Timepartition" ` --distributekeycolumn "(reading_date,year,month,day)" ` --paralleldegree 12 ` --merge "False" ``` This technic will produce one file per day inside a directory structure (local or cloud) as a Hive partitionning directory : /year=2026/month=11/day=11/sensor\_readings.parquet You can after a full export use a query to filter your data and overwrite files that was already generated on the overlaping period. ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "TimeSeriesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "SensorReadings_Part" ` --query "SELECT * FROM dbo.SensorReadings_Part WHERE reading_date >= CAST(GETDATE() - 10 AS DATE)" ` --directory "s3://mycorpexportbucket/raw/TimeSeriesDB/SensorReadings/" ` --fileoutput "sensor_readings.parquet" ` --cloudprofile "mycorps3profile" ` --parallelmethod "Timepartition" ` --distributekeycolumn "(reading_date,year,month,day)" ` --paralleldegree 10 ` --merge "False" ``` ## Complex Queries[​](#complex-queries "Direct link to Complex Queries") ### Multi-table Joins[​](#multi-table-joins "Direct link to Multi-table Joins") Export data with a query with joins: ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --query "SELECT o.order_id, o.order_date, c.customer_name, od.product_id, od.quantity, od.unit_price FROM orders o INNER JOIN customers c ON o.customer_id = c.customer_id INNER JOIN order_details od ON o.order_id = od.order_id WHERE o.order_date >= '2024-01-01'" ` --directory "C:\temp" ` --fileoutput "sales_detail.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Ntile" ` --distributekeycolumn "o.order_id" ` --paralleldegree 8 ` --merge "False" ``` ### Aggregated Data[​](#aggregated-data "Direct link to Aggregated Data") Export pre-aggregated data: ``` .\FastBCP.exe ` --connectiontype "pgsql" ` --server "localhost" ` --port "5432" ` --database "analytics" ` --user "postgres" ` --password "postgres" ` --query "SELECT date_trunc('day', order_date) as order_day, customer_region, COUNT(*) as order_count, SUM(total_amount) as total_sales FROM orders GROUP BY date_trunc('day', order_date), customer_region" ` --directory "C:\temp" ` --fileoutput "daily_sales_by_region.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd" ` --encoding "UTF-8" ` --parallelmethod "None" ``` ## Performance Tuning[​](#performance-tuning "Direct link to Performance Tuning") ### Optimal Parallel Degree[​](#optimal-parallel-degree "Direct link to Optimal Parallel Degree") * Auto-detect * Manual Use negative values to auto-calculate based on CPU cores: ``` # Use all cores minus 2 .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "LargeDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "BigTable" ` --directory "C:\temp" ` --fileoutput "bigtable.parquet" ` --parallelmethod "RangeId" ` --distributekeycolumn "id" ` --paralleldegree -2 ` --merge "False" ``` Specify exact thread count: ``` # Use exactly 16 threads .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "LargeDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "BigTable" ` --directory "C:\temp" ` --fileoutput "bigtable.parquet" ` --parallelmethod "RangeId" ` --distributekeycolumn "id" ` --paralleldegree 16 ` --merge "False" ``` ### Parquet RowGroup Size[​](#parquet-rowgroup-size "Direct link to Parquet RowGroup Size") To reduce memory pressure and, in many cases, improve export performance, you can configure the Parquet row group size by setting the `FASTBCP_RGSIZE` environment variable. A smaller `FASTBCP_RGSIZE` value reduces memory usage during export. However, this comes with a trade-off: smaller row groups may reduce Parquet compression efficiency and can sometimes increase the final file size. Recommended values range from `1000` to `1_000_000`. In practice, values between 32,000 and 64,000 often provide a good balance between memory usage, performance, and compression efficiency. * Windows * Linux ``` $Env:FASTBCP_RGSIZE=32000 .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "LargeDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "BigTable" ` --directory "C:\temp" ` --fileoutput "bigtable.parquet" ` --parallelmethod "RangeId" ` --distributekeycolumn "id" ` --paralleldegree -2 ` --merge "False" ``` Specify exact thread count: ``` export FASTBCP_RGSIZE=32000 .\FastBCP / --connectiontype "mssql" / --server "mssqlhost.domain.lan,1433" / --database "LargeDB" / --user "FastUSer" / --password "FastPassword" / --sourceschema "dbo" / --sourcetable "BigTable" / --directory "/data/export/bigtable/" / --fileoutput "bigtable.parquet" / --parallelmethod "RangeId" / --distributekeycolumn "id" / --paralleldegree 16 / --merge "False" ``` ### Merge vs No-Merge[​](#merge-vs-no-merge "Direct link to Merge vs No-Merge") * With Merge * Without Merge Combine parallel outputs into single file: ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "DataDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Data" ` --directory "C:\temp" ` --fileoutput "data_merged.parquet" ` --parallelmethod "RangeId" ` --distributekeycolumn "id" ` --paralleldegree 8 ` --merge "True" ``` **Result**: Single file `data_merged.parquet`, slower and only OnPremise. Keep separate files for parallel processing: ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "DataDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Data" ` --directory "C:\temp" ` --fileoutput "data_part.parquet" ` --parallelmethod "RangeId" ` --distributekeycolumn "id" ` --paralleldegree 8 ` --merge "False" ``` **Result**: Multiple files `data_part_Chunk000.parquet`, `data_part_Chunk001.parquet`, etc. ### Enable Debug Logging[​](#enable-debug-logging "Direct link to Enable Debug Logging") Get detailed execution information: ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "TestDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "TestTable" ` --directory "C:\temp" ` --fileoutput "debug_export.csv" ` --parallelmethod "Random" ` --distributekeycolumn "id" ` --paralleldegree 4 ` --merge "False" ` --loglevel "Debug" ` --runid "debug_test_run" ``` Debug Mode Use `--loglevel "Debug"` to see detailed execution steps, connection strings (without passwords), and query generation details. tip Build your command with the [Wizard](/latest/wizard.md) --- # Cloud Storage Examples Examples for exporting data directly to cloud storage platforms. ## AWS S3[​](#aws-s3 "Direct link to AWS S3") Export data directly to Amazon S3 buckets using date-based placeholders. ### S3 with Date Placeholders[​](#s3-with-date-placeholders "Direct link to S3 with Date Placeholders") Automatically organize files by date using placeholder tokens: ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "DailySales" ` --directory "s3://my-bucket/data/sales/full/" ` --fileoutput "sales.parquet" ` --parallelmethod "RangeId" ` --distributekeycolumn "sale_id" ` --paralleldegree 8 ` --runid "sales_to_s3_daily" ``` ### S3 with Nested Structure[​](#s3-with-nested-structure "Direct link to S3 with Nested Structure") Create hierarchical folder structures: ``` .\FastBCP.exe ` --connectiontype "pgsql" ` --server "localhost" ` --port "5432" ` --database "ecommerce" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "orders" ` --directory "s3://analytics-bucket/exports/orders/" ` --fileoutput "orders.parquet" ` --parallelmethod "DataDriven" ` --distributekeycolumn "o_orderdate" ` --paralleldegree 10 ` --merge "True" ``` ### S3 with CSV Format[​](#s3-with-csv-format "Direct link to S3 with CSV Format") Export CSV files to S3 with manual date partitioning: ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "LogsDB" ` --trusted ` --query "SELECT * FROM ApplicationLogs WHERE log_date = '2024-05-01'" ` --directory "s3://logs-bucket/app-logs/appdate=2024-05-01/" ` --fileoutput "app_logs.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ``` ## Azure Blob Storage[​](#azure-blob-storage "Direct link to Azure Blob Storage") Export data to Azure Blob Storage containers. ### Azure with Date Partitioning[​](#azure-with-date-partitioning "Direct link to Azure with Date Partitioning") ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "AnalyticsDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Events" ` --directory "abs://mystorageaccount.blob.core.windows.net/datacontainer/events/full/" ` --fileoutput "events.parquet" ` --parallelmethod "Timepartition" ` --distributekeycolumn "event_timestamp(year,month)" ` --paralleldegree 10 ``` ### Azure Data Lake Gen2[​](#azure-data-lake-gen2 "Direct link to Azure Data Lake Gen2") Export to Azure Data Lake Storage Gen2: ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "AnalyticsDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Events" ` --directory "abfss://mystorageaccount.dfs.core.windows.net/datacontainer/events/full/" ` --fileoutput "events.parquet" ` --parallelmethod "Timepartition" ` --distributekeycolumn "event_timestamp(year,month)" ` --paralleldegree 10 ``` ## Hourly Exports[​](#hourly-exports "Direct link to Hourly Exports") Create exports with hourly granularity. ### Hourly Data Partition by Sensor with an incremental time range drived from outside[​](#hourly-data-partition-by-sensor-with-an-incremental-time-range-drived-from-outside "Direct link to Hourly Data Partition by Sensor with an incremental time range drived from outside") ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "StreamingDB" ` --trusted ` --query "SELECT * FROM SensorData WHERE reading_time >= '2024-02-03 14:00:00' and reading_time < '2024-02-03 15:00:00'" ` --directory "s3://iot-bucket/sensor-data/" ` --fileoutput "sensors_20240203140000_20240203150000.parquet" ` --parallelmethod "DataDriven" ` --distributekeycolumn "sensor_id" ` --datadrivenquery "SELECT sensor_id From SensorList" ` --paralleldegree 8 ` --runid "hourly_sensor_export_20240203140000_20240203150000" ``` ## Best for Cloud Exports[​](#best-for-cloud-exports "Direct link to Best for Cloud Exports") ### Performance Tips[​](#performance-tips "Direct link to Performance Tips") Parquet **Use Parquet for cloud storage**: Better compression and query performance, reduce network traffic Parallelism **Enable parallel execution when needed**: * if you need to split data on a business criteria * if you have a lots of data to extract Dynamic Parallel Degree Use negativ value for `--paralleldegree` to automatically set threads to (CPU cores / abs(degree)), leaving resources for other processes. eg `--paralleldegree -2` will use half of the core of the machine from where FastBCP is launched DataDriven Query \*\*Use `--datadrivenquery` to : * speedup the retrieval of the elements list to extract. * as a technic for incremental extraction by using a where in the `--datadrivenquery` instead of the main `--query` warning Keep the degree safe for your source, to avoid a total saturation. ### Example with All Best Practices[​](#example-with-all-best-practices "Direct link to Example with All Best Practices") ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "DataWarehouse" ` --trusted ` --sourceschema "dbo" ` --sourcetable "FactSales" ` --directory "s3://analytics-bucket/warehouse/sales/{sourcetable}" ` --fileoutput "FactSales.parquet" ` --parallelmethod "DataDriven" ` --datadrivenquery "SELECT ref_date from calendar where ref_date > cast(getdate()-30 as date)" ` --distributekeycolumn "sale_date" ` --paralleldegree -2 ` --runid "daily_sales_to_s3" ` --loglevel "Information" ``` tip Build your command with the [Wizard](/latest/wizard.md) --- # MySQL Examples Examples for exporting data from MySQL databases. ## Single-threaded Export[​](#single-threaded-export "Direct link to Single-threaded Export") Simple export without parallelization. ``` .\FastBCP.exe ` --connectiontype "mysql" ` --server "localhost" ` --port "3306" ` --database "test" ` --user "root" ` --password "password" ` --query "SELECT * FROM test_table LIMIT 1000" ` --directory "C:\temp" ` --fileoutput "mysql_test.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` ## Parallel Export - Random Method[​](#parallel-export---random-method "Direct link to Parallel Export - Random Method") Export using Random distribution. ``` .\FastBCP.exe ` --connectiontype "mysql" ` --server "localhost" ` --port "3306" ` --database "test" ` --user "root" ` --password "password" ` --sourceschema "test" ` --sourcetable "orders" ` --directory "C:\temp" ` --fileoutput "mysql_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "order_id" ` --paralleldegree 8 ` --merge "False" ` --runid "mysql_to_csv_parallel8_random" ``` ## Parallel Export - DataDriven Method[​](#parallel-export---datadriven-method "Direct link to Parallel Export - DataDriven Method") Export using DataDriven distribution based on distinct column values. ``` .\FastBCP.exe ` --connectiontype "mysql" ` --server "localhost" ` --port "3306" ` --database "test" ` --user "root" ` --password "password" ` --sourceschema "test" ` --sourcetable "orders" ` --directory "C:\temp" ` --fileoutput "mysql_orders_dd.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "DataDriven" ` --distributekeycolumn "status" ` --paralleldegree 10 ` --merge "False" ` --runid "mysql_to_csv_parallel10_datadriven" ``` ## Export to Parquet[​](#export-to-parquet "Direct link to Export to Parquet") Export MySQL data to Parquet format. ``` .\FastBCP.exe ` --connectiontype "mysql" ` --server "localhost" ` --port "3306" ` --database "test" ` --user "root" ` --password "password" ` --sourceschema "test" ` --sourcetable "orders" ` --directory "C:\temp" ` --fileoutput "mysql_orders.parquet" ` --parallelmethod "Random" ` --distributekeycolumn "order_id" ` --paralleldegree 6 ` --merge "False" ``` tip Build your command with the [Wizard](/latest/wizard.md) --- # Oracle Examples Comprehensive examples for exporting data from Oracle databases. ## Connection Types[​](#connection-types "Direct link to Connection Types") Oracle exports support multiple connection types: * **oraodp**: Native Oracle Data Provider (recommended) * **oledb**: Using Oracle OLEDB Provider (OraOLEDB) * **odbc**: Using ODBC DSN ## Single-threaded Export[​](#single-threaded-export "Direct link to Single-threaded Export") Simple export without parallelization. * Oracle Data Provider * OLEDB Provider ``` .\FastBCP.exe ` --connectiontype "oraodp" ` --server "localhost:1521/ORCLPDB1" ` --user "system" ` --password "password" ` --query "SELECT * FROM customers WHERE ROWNUM <= 1000" ` --directory "C:\temp" ` --fileoutput "oracle_customers.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` ``` .\FastBCP.exe ` --connectiontype "oledb" ` --provider "OraOLEDB.Oracle" ` --server "localhost:1521/ORCLPDB1" ` --user "system" ` --password "password" ` --query "SELECT * FROM customers WHERE ROWNUM <= 1000" ` --directory "C:\temp" ` --fileoutput "oracle_customers.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` ## Parallel Export - Rowid Method[​](#parallel-export---rowid-method "Direct link to Parallel Export - Rowid Method") Oracle-specific parallel export 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 exports and does not require a specific distribute key column. **Full table export:** ``` .\FastBCP.exe ` --connectiontype "oraodp" ` --server "localhost:1521/ORCLPDB1" ` --user "system" ` --password "password" ` --sourceschema "SYSTEM" ` --sourcetable "ORDERS" ` --directory "C:\temp" ` --fileoutput "oracle_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Rowid" ` --paralleldegree 8 ` --merge "False" ` --runid "oraodp_to_csv_parallel8_rowid" ``` **With query filter:** ``` .\FastBCP.exe ` --connectiontype "oraodp" ` --server "localhost:1521/ORCLPDB1" ` --user "system" ` --password "password" ` --query "SELECT * FROM SYSTEM.ORDERS WHERE order_date >= TO_DATE('2024-01-01', 'YYYY-MM-DD')" ` --directory "C:\temp" ` --fileoutput "oracle_orders_2024.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Rowid" ` --paralleldegree 8 ` --merge "False" ` --runid "oraodp_to_csv_parallel8_rowid_filtered" ``` ## Parallel Export - Random Method[​](#parallel-export---random-method "Direct link to Parallel Export - Random Method") Export using Random distribution with modulo operation. ``` .\FastBCP.exe ` --connectiontype "oraodp" ` --server "localhost:1521/ORCLPDB1" ` --user "system" ` --password "password" ` --sourceschema "SYSTEM" ` --sourcetable "ORDERS" ` --directory "C:\temp" ` --fileoutput "oracle_orders_random.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "order_id" ` --paralleldegree 8 ` --merge "False" ` --runid "oraodp_to_csv_parallel8_random" ``` ## Parallel Export - DataDriven Method[​](#parallel-export---datadriven-method "Direct link to Parallel Export - DataDriven Method") Export using DataDriven distribution based on distinct column values. ``` .\FastBCP.exe ` --connectiontype "oraodp" ` --server "localhost:1521/ORCLPDB1" ` --user "system" ` --password "password" ` --sourceschema "SYSTEM" ` --sourcetable "ORDERS" ` --directory "C:\temp" ` --fileoutput "oracle_orders_dd.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "DataDriven" ` --distributekeycolumn "order_status" ` --paralleldegree 10 ` --merge "False" ` --runid "oraodp_to_csv_parallel10_datadriven" ``` ## Export to Parquet[​](#export-to-parquet "Direct link to Export to Parquet") Export Oracle data to Parquet format. **Single-threaded:** ``` .\FastBCP.exe ` --connectiontype "oraodp" ` --server "localhost:1521/ORCLPDB1" ` --user "system" ` --password "password" ` --sourceschema "SYSTEM" ` --sourcetable "ORDERS" ` --directory "C:\temp" ` --fileoutput "oracle_orders.parquet" ` --parallelmethod "None" ``` **Parallel with Rowid:** ``` .\FastBCP.exe ` --connectiontype "oraodp" ` --server "localhost:1521/ORCLPDB1" ` --user "system" ` --password "password" ` --sourceschema "SYSTEM" ` --sourcetable "ORDERS" ` --directory "C:\temp" ` --fileoutput "oracle_orders.parquet" ` --parallelmethod "Rowid" ` --paralleldegree 10 ` --merge "False" ``` ## OLEDB Connection Examples[​](#oledb-connection-examples "Direct link to OLEDB Connection Examples") Using Oracle OLEDB Provider for connections. **Single-threaded:** ``` .\FastBCP.exe ` --connectiontype "oledb" ` --provider "OraOLEDB.Oracle" ` --server "localhost:1521/ORCLPDB1" ` --user "system" ` --password "password" ` --query "SELECT * FROM SYSTEM.ORDERS WHERE ROWNUM <= 10000" ` --directory "C:\temp" ` --fileoutput "oracle_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` **Parallel Random:** ``` .\FastBCP.exe ` --connectiontype "oledb" ` --provider "OraOLEDB.Oracle" ` --server "localhost:1521/ORCLPDB1" ` --user "system" ` --password "password" ` --query "SELECT * FROM SYSTEM.ORDERS" ` --directory "C:\temp" ` --fileoutput "oracle_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "order_id" ` --paralleldegree 6 ` --merge "False" ``` **Parallel DataDriven:** ``` .\FastBCP.exe ` --connectiontype "oledb" ` --provider "OraOLEDB.Oracle" ` --server "localhost:1521/ORCLPDB1" ` --user "system" ` --password "password" ` --query "SELECT * FROM SYSTEM.ORDERS" ` --directory "C:\temp" ` --fileoutput "oracle_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "DataDriven" ` --distributekeycolumn "order_status" ` --paralleldegree 6 ` --merge "False" ``` tip Build your command with the [Wizard](/latest/wizard.md) --- # Other Databases Examples for exporting data from Clickhouse, SAP HANA, and Netezza databases. ## Clickhouse[​](#clickhouse "Direct link to Clickhouse") Export data from Clickhouse database. **Single-threaded export:** ``` .\FastBCP.exe ` --connectiontype "clickhouse" ` --server "localhost" ` --port "9000" ` --database "default" ` --user "default" ` --password "password" ` --query "SELECT * FROM orders LIMIT 1000" ` --directory "C:\temp" ` --fileoutput "clickhouse_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` **Parallel export with Random method:** ``` .\FastBCP.exe ` --connectiontype "clickhouse" ` --server "localhost" ` --port "9000" ` --database "default" ` --user "default" ` --password "password" ` --sourceschema "default" ` --sourcetable "orders" ` --directory "C:\temp" ` --fileoutput "clickhouse_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "order_id" ` --paralleldegree 8 ` --merge "False" ``` ## SAP HANA[​](#sap-hana "Direct link to SAP HANA") Export data from SAP HANA database using two connection types. ### HANA Connection Type[​](#hana-connection-type "Direct link to HANA Connection Type") Standard HANA connection for general exports. **Single-threaded export:** ``` .\FastBCP.exe ` --connectiontype "hana" ` --server "hanaserver:30015" ` --user "SYSTEM" ` --password "password" ` --query "SELECT * FROM ORDERS WHERE ORDER_DATE >= '2024-01-01'" ` --directory "C:\temp" ` --fileoutput "hana_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` **Parallel export with Random method:** ``` .\FastBCP.exe ` --connectiontype "hana" ` --server "hanaserver:30015" ` --user "SYSTEM" ` --password "password" ` --sourceschema "SYSTEM" ` --sourcetable "ORDERS" ` --directory "C:\temp" ` --fileoutput "hana_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "ORDER_ID" ` --paralleldegree 8 ` --merge "False" ``` ### HANA Export Connection Type[​](#hana-export-connection-type "Direct link to HANA Export Connection Type") Optimized HANA connection using native EXPORT functionality for faster bulk exports. HANA Export The `hanaexport` connection type uses SAP HANA's native EXPORT statement for optimized bulk data transfer. This is recommended for large datasets. **Single-threaded export:** ``` .\FastBCP.exe ` --connectiontype "hanaexport" ` --server "hanaserver:30015" ` --user "SYSTEM" ` --password "password" ` --query "SELECT * FROM ORDERS WHERE ORDER_DATE >= '2024-01-01'" ` --directory "C:\temp" ` --fileoutput "hana_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` **Parallel export with Random method:** ``` .\FastBCP.exe ` --connectiontype "hanaexport" ` --server "hanaserver:30015" ` --user "SYSTEM" ` --password "password" ` --sourceschema "SYSTEM" ` --sourcetable "ORDERS" ` --directory "C:\temp" ` --fileoutput "hana_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "ORDER_ID" ` --paralleldegree 8 ` --merge "False" ``` ## Netezza[​](#netezza "Direct link to Netezza") Export data from Netezza database using OLEDB provider. **Single-threaded export:** ``` .\FastBCP.exe ` --connectiontype "oledb" ` --provider "NZOLEDB" ` --server "netezza_server" ` --database "SYSTEM" ` --user "admin" ` --password "password" ` --query "SELECT * FROM orders" ` --directory "C:\temp" ` --fileoutput "netezza_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` **Parallel export with Random method:** ``` .\FastBCP.exe ` --connectiontype "oledb" ` --provider "NZOLEDB" ` --server "netezza_server" ` --database "SYSTEM" ` --user "admin" ` --password "password" ` --query "SELECT * FROM orders" ` --directory "C:\temp" ` --fileoutput "netezza_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "order_id" ` --paralleldegree 6 ` --merge "False" ``` **Parallel export with DataDriven method:** ``` .\FastBCP.exe ` --connectiontype "oledb" ` --provider "NZOLEDB" ` --server "netezza_server" ` --database "SYSTEM" ` --user "admin" ` --password "password" ` --query "SELECT * FROM orders" ` --directory "C:\temp" ` --fileoutput "netezza_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "DataDriven" ` --distributekeycolumn "region" ` --paralleldegree 6 ` --merge "False" ``` tip Build your command with the [Wizard](/latest/wizard.md) --- # Output Formats Examples demonstrating different output formats supported by FastBCP. ## CSV Format[​](#csv-format "Direct link to CSV Format") Standard comma/delimiter-separated values format. ### Basic CSV Export[​](#basic-csv-export "Direct link to Basic CSV Export") ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Sales" ` --directory "C:\temp" ` --fileoutput "sales.csv" ` --decimalseparator "." ` --delimiter "," ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` ### CSV with Custom Delimiter[​](#csv-with-custom-delimiter "Direct link to CSV with Custom Delimiter") Using pipe delimiter for better data separation: ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Sales" ` --directory "C:\temp" ` --fileoutput "sales.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "sale_id" ` --paralleldegree 8 ` --merge "False" ``` ### CSV with European Format[​](#csv-with-european-format "Direct link to CSV with European Format") Using comma as decimal separator (common in European countries): ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Sales" ` --directory "C:\temp" ` --fileoutput "sales_european.csv" ` --decimalseparator "," ` --delimiter ";" ` --dateformat "dd/MM/yyyy HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "sale_id" ` --paralleldegree 8 ` --merge "False" ``` ## Parquet Format[​](#parquet-format "Direct link to Parquet Format") Columnar storage format optimized for analytical queries. ### Basic Parquet Export[​](#basic-parquet-export "Direct link to Basic Parquet Export") ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Sales" ` --directory "C:\temp" ` --fileoutput "sales.parquet" ` --parallelmethod "None" ``` ### Parallel Parquet Export[​](#parallel-parquet-export "Direct link to Parallel Parquet Export") Maximize performance with parallel execution: ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Sales" ` --directory "C:\temp" ` --fileoutput "sales.parquet" ` --parallelmethod "RangeId" ` --distributekeycolumn "sale_id" ` --paralleldegree 12 ` --merge "False" ``` ### Parquet with PostgreSQL[​](#parquet-with-postgresql "Direct link to Parquet with PostgreSQL") ``` .\FastBCP.exe ` --connectiontype "pgcopy" ` --server "localhost" ` --port "5432" ` --database "salesdb" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "sales" ` --directory "C:\temp" ` --fileoutput "pg_sales.parquet" ` --parallelmethod "Ctid" ` --paralleldegree 10 ` --merge "False" ``` ### Parquet with Oracle[​](#parquet-with-oracle "Direct link to Parquet with Oracle") ``` .\FastBCP.exe ` --connectiontype "oraodp" ` --server "localhost:1521/ORCLPDB1" ` --user "system" ` --password "password" ` --sourceschema "SYSTEM" ` --sourcetable "SALES" ` --directory "C:\temp" ` --fileoutput "oracle_sales.parquet" ` --parallelmethod "Rowid" ` --paralleldegree 8 ` --merge "False" ``` ## Excel Format[​](#excel-format "Direct link to Excel Format") Export data to Microsoft Excel format (.xlsx). Excel Format Excel exports automatically format data for spreadsheet applications. Large datasets may be split across multiple sheets if they exceed Excel's row limits. ### Basic Excel Export[​](#basic-excel-export "Direct link to Basic Excel Export") ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Sales" ` --directory "C:\temp" ` --fileoutput "sales.xlsx" ` --parallelmethod "None" ``` ### Parallel Excel Export[​](#parallel-excel-export "Direct link to Parallel Excel Export") ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Sales" ` --directory "C:\temp" ` --fileoutput "sales.xlsx" ` --parallelmethod "RangeId" ` --distributekeycolumn "sale_id" ` --paralleldegree 6 ` --merge "False" ``` ### Excel with Custom Query[​](#excel-with-custom-query "Direct link to Excel with Custom Query") Export filtered data to Excel: ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --query "SELECT * FROM dbo.Sales WHERE sale_date >= '2024-01-01' AND sale_date < '2025-01-01'" ` --directory "C:\temp" ` --fileoutput "sales_2024.xlsx" ` --parallelmethod "Ntile" ` --distributekeycolumn "sale_id" ` --paralleldegree 4 ` --merge "False" ``` tip Build your command with the [Wizard](/latest/wizard.md) --- # PostgreSQL Examples Comprehensive examples for exporting data from PostgreSQL using native connectors (pgsql, pgcopy). ## Connection Types[​](#connection-types "Direct link to Connection Types") PostgreSQL exports support two connection types: * **pgsql**: Standard PostgreSQL protocol * **pgcopy**: PostgreSQL COPY protocol (fastest for bulk exports) ## Single-threaded Export[​](#single-threaded-export "Direct link to Single-threaded Export") Simple export without parallelization. * Standard Protocol * COPY Protocol ``` .\FastBCP.exe ` --connectiontype "pgsql" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --query "SELECT * FROM lineitem LIMIT 1000" ` --directory "C:\temp" ` --fileoutput "pg_lineitem.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` ``` .\FastBCP.exe ` --connectiontype "pgcopy" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --query "SELECT * FROM lineitem LIMIT 1000" ` --directory "C:\temp" ` --fileoutput "pg_lineitem.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` ## Parallel Export - Random Method[​](#parallel-export---random-method "Direct link to Parallel Export - Random Method") Export using Random distribution with modulo operation. * Standard Protocol * COPY Protocol ``` .\FastBCP.exe ` --connectiontype "pgsql" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --query "SELECT * FROM lineitem" ` --directory "C:\temp" ` --fileoutput "pg_lineitem_random.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "l_linenumber" ` --paralleldegree 8 ` --merge "False" ` --runid "pgsql_to_csv_parallel8_random" ``` ``` .\FastBCP.exe ` --connectiontype "pgcopy" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --query "SELECT * FROM lineitem" ` --directory "C:\temp" ` --fileoutput "pg_lineitem_random.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "l_linenumber" ` --paralleldegree 8 ` --merge "False" ` --runid "pgcopy_to_csv_parallel8_random" ``` ## Parallel Export - DataDriven Method[​](#parallel-export---datadriven-method "Direct link to Parallel Export - DataDriven Method") Export using DataDriven distribution based on distinct column values. * Standard Protocol * COPY Protocol ``` .\FastBCP.exe ` --connectiontype "pgsql" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "lineitem" ` --directory "C:\temp" ` --fileoutput "pg_lineitem_dd.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "DataDriven" ` --distributekeycolumn "l_shipmode" ` --paralleldegree 10 ` --merge "False" ` --runid "pgsql_to_csv_parallel10_datadriven" ``` ``` .\FastBCP.exe ` --connectiontype "pgcopy" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "lineitem" ` --directory "C:\temp" ` --fileoutput "pg_lineitem_dd.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "DataDriven" ` --distributekeycolumn "l_shipmode" ` --paralleldegree 10 ` --merge "False" ` --runid "pgcopy_to_csv_parallel10_datadriven" ``` ## Parallel Export - Ntile Method[​](#parallel-export---ntile-method "Direct link to Parallel Export - Ntile Method") Export using Ntile for evenly distributed chunks. * Standard Protocol * COPY Protocol **Full table:** ``` .\FastBCP.exe ` --connectiontype "pgsql" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "lineitem" ` --directory "C:\temp" ` --fileoutput "pg_lineitem_ntile.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Ntile" ` --distributekeycolumn "l_orderkey" ` --paralleldegree 12 ` --merge "False" ` --runid "pgsql_to_csv_parallel12_ntile" ``` **With query filter:** ``` .\FastBCP.exe ` --connectiontype "pgsql" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --query "SELECT * FROM lineitem WHERE l_shipdate BETWEEN '1995-01-01' AND '1995-12-31'" ` --directory "C:\temp" ` --fileoutput "pg_lineitem_ntile.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Ntile" ` --distributekeycolumn "l_orderkey" ` --paralleldegree 12 ` --merge "False" ` --runid "pgsql_to_csv_parallel12_ntile_filtered" ``` **Full table:** ``` .\FastBCP.exe ` --connectiontype "pgcopy" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "lineitem" ` --directory "C:\temp" ` --fileoutput "pg_lineitem_ntile.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Ntile" ` --distributekeycolumn "l_orderkey" ` --paralleldegree 12 ` --merge "False" ` --runid "pgcopy_to_csv_parallel12_ntile" ``` **With query filter:** ``` .\FastBCP.exe ` --connectiontype "pgcopy" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --query "SELECT * FROM lineitem WHERE l_shipdate BETWEEN '1995-01-01' AND '1995-12-31'" ` --directory "C:\temp" ` --fileoutput "pg_lineitem_ntile.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Ntile" ` --distributekeycolumn "l_orderkey" ` --paralleldegree 12 ` --merge "False" ` --runid "pgcopy_to_csv_parallel12_ntile_filtered" ``` ## Parallel Export - Ctid Method[​](#parallel-export---ctid-method "Direct link to Parallel Export - Ctid Method") PostgreSQL-specific parallel export using physical row identifier (ctid). PostgreSQL-Specific The Ctid method is unique to PostgreSQL and uses the physical row identifier for parallel data distribution. This is very efficient for full table exports. * Standard Protocol * COPY Protocol ``` .\FastBCP.exe ` --connectiontype "pgsql" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "lineitem" ` --directory "C:\temp" ` --fileoutput "pg_lineitem_ctid.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Ctid" ` --paralleldegree 8 ` --merge "False" ` --runid "pgsql_to_csv_parallel8_ctid" ``` ``` .\FastBCP.exe ` --connectiontype "pgcopy" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "lineitem" ` --directory "C:\temp" ` --fileoutput "pg_lineitem_ctid.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Ctid" ` --paralleldegree 8 ` --merge "False" ` --runid "pgcopy_to_csv_parallel8_ctid" ``` ## Export to Parquet[​](#export-to-parquet "Direct link to Export to Parquet") Export PostgreSQL data to Parquet format. * Standard Protocol * COPY Protocol **Single-threaded:** ``` .\FastBCP.exe ` --connectiontype "pgsql" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "lineitem" ` --directory "C:\temp" ` --fileoutput "pg_lineitem.parquet" ` --parallelmethod "None" ``` **Parallel with Ctid:** ``` .\FastBCP.exe ` --connectiontype "pgsql" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "lineitem" ` --directory "C:\temp" ` --fileoutput "pg_lineitem.parquet" ` --parallelmethod "Ctid" ` --paralleldegree 10 ` --merge "False" ``` **Single-threaded:** ``` .\FastBCP.exe ` --connectiontype "pgcopy" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "lineitem" ` --directory "C:\temp" ` --fileoutput "pg_lineitem.parquet" ` --parallelmethod "None" ``` **Parallel with Ctid:** ``` .\FastBCP.exe ` --connectiontype "pgcopy" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "lineitem" ` --directory "C:\temp" ` --fileoutput "pg_lineitem.parquet" ` --parallelmethod "Ctid" ` --paralleldegree 10 ` --merge "False" ``` ## ODBC Connection[​](#odbc-connection "Direct link to ODBC Connection") Using ODBC DSN for PostgreSQL connection. **Single-threaded:** ``` .\FastBCP.exe ` --connectiontype "odbc" ` --dsn "PostgreSQL_DSN" ` --directory "C:\temp" ` --fileoutput "pg_test.csv" ` --query "SELECT * FROM public.test_table" ` --parallelmethod "None" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ``` **Parallel Random:** ``` .\FastBCP.exe ` --connectiontype "odbc" ` --dsn "PostgreSQL_DSN" ` --directory "C:\temp" ` --fileoutput "pg_test.csv" ` --query "SELECT * FROM public.test_table" ` --parallelmethod "Random" ` --distributekeycolumn "id" ` --paralleldegree 6 ` --merge "False" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ``` **Parallel DataDriven:** ``` .\FastBCP.exe ` --connectiontype "odbc" ` --dsn "PostgreSQL_DSN" ` --directory "C:\temp" ` --fileoutput "pg_test.csv" ` --query "SELECT * FROM public.test_table" ` --parallelmethod "DataDriven" ` --distributekeycolumn "category" ` --paralleldegree 6 ` --merge "False" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ``` tip Build your command with the [Wizard](/latest/wizard.md) --- # SQL Server Examples Comprehensive examples for exporting data from SQL Server (MSSQL, OLEDB, ODBC). ## Single-threaded Export[​](#single-threaded-export "Direct link to Single-threaded Export") Simple export without parallelization for smaller datasets. ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "FASTExportData" ` --trusted ` --query "SELECT top 1000 * FROM dbo.TEST_71_1M_12m" ` --directory "C:\temp" ` --fileoutput "TEST1000.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` ## Parallel Export - Random Method[​](#parallel-export---random-method "Direct link to Parallel Export - Random Method") Export using Random distribution based on modulo operation. * Windows Authentication * SQL Authentication ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "FASTExportData" ` --trusted ` --query "SELECT * FROM dbo.TEST_71_1M_12m" ` --directory "C:\temp" ` --fileoutput "TEST_71c_1Mr.csv" ` --decimalseparator "," ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "ID_ARTICLE" ` --paralleldegree 8 ` --merge "False" ` --runid "mssql_to_csv_parallel8_random" ``` ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "FASTExportData" ` --user "FastUser" ` --password "FastPassword" ` --query "SELECT * FROM dbo.TEST_71_1M_12m" ` --directory "C:\temp" ` --fileoutput "TEST_71c_1Mr.csv" ` --decimalseparator "," ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "ID_ARTICLE" ` --paralleldegree 8 ` --merge "False" ` --runid "mssql_to_csv_parallel8_random" ``` ## Parallel Export - RangeId Method[​](#parallel-export---rangeid-method "Direct link to Parallel Export - RangeId Method") Export using RangeId distribution for evenly distributed integer keys. **Using table name:** ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "tpch10_collation_bin2" ` --trusted ` --sourceschema "dbo" ` --sourcetable "orders" ` --directory "D:\temp" ` --fileoutput "mssql_orders.csv" ` --decimalseparator "," ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "RangeId" ` --distributekeycolumn "o_orderkey" ` --paralleldegree -2 ` --merge "False" ` --runid "mssql_to_csv_parallel-2_rangeid" ``` **Using query with filter:** ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "tpch10_collation_bin2" ` --trusted ` --query "select * from orders WHERE o_orderdate between '19950101' and '19951231'" ` --directory "D:\temp" ` --fileoutput "mssql_orders.csv" ` --decimalseparator "," ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "RangeId" ` --distributekeycolumn "o_orderkey" ` --paralleldegree -2 ` --merge "False" ` --runid "mssql_to_csv_parallel-2_rangeid_using_query" ``` ## Parallel Export - Ntile Method[​](#parallel-export---ntile-method "Direct link to Parallel Export - Ntile Method") Export using Ntile distribution for evenly distributed chunks. **Full table export:** ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "tpch10_collation_bin2" ` --trusted ` --sourceschema "dbo" ` --sourcetable "orders" ` --directory "D:\temp" ` --fileoutput "mssql_orders.csv" ` --decimalseparator "," ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Ntile" ` --distributekeycolumn "o_orderkey" ` --paralleldegree 12 ` --merge "False" ` --runid "mssql_to_csv_parallel12_Ntile" ``` **Filtered export with date column:** ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "tpch10_collation_bin2" ` --trusted ` --query "select * from orders WHERE o_orderdate between '19950101' and '19951231'" ` --directory "D:\temp" ` --fileoutput "mssql_orders.csv" ` --decimalseparator "," ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Ntile" ` --distributekeycolumn "o_orderdate" ` --paralleldegree 12 ` --merge "False" ` --runid "mssql_to_csv_parallel12_Ntile_using_query" ``` ## Parallel Export - DataDriven Method[​](#parallel-export---datadriven-method "Direct link to Parallel Export - DataDriven Method") Export using DataDriven distribution based on distinct values of a column. **Using partition function:** ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "tpch10_collation_bin2" ` --directory "D:\temp" ` --fileoutput "mssql_orders.csv" ` --trusted ` --sourceschema "dbo" ` --sourcetable "orders_part" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "DataDriven" ` --distributekeycolumn "`$partition.PF_DATE(o_orderdate)" ` --merge "False" ` --paralleldegree 10 ``` ## Export to Parquet[​](#export-to-parquet "Direct link to Export to Parquet") Export SQL Server data to Parquet format. **Single-threaded:** ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "faker" ` --trusted ` --sourceschema "dbo" ` --sourcetable "faker_s1000" ` --directory "D:\temp" ` --fileoutput "mssql_faker_s1000.parquet" ` --parallelmethod "None" ` --runid "mssql_to_parquet_NoParallel" ``` **Parallel with RangeId:** ``` .\FastBCP.exe ` --connectiontype "mssql" ` --trusted ` --server "localhost" ` --database "tpch10_collation_bin2" ` --directory "D:\temp" ` --fileoutput "mssql_orders.parquet" ` --parallelmethod "RangeId" ` --distributekeycolumn "o_orderkey" ` --paralleldegree 7 ` --sourceschema "dbo" ` --sourcetable "orders" ` --merge "False" ``` **Parallel with Ntile and query:** ``` .\FastBCP.exe ` --connectiontype "mssql" ` --trusted ` --server "localhost" ` --database "tpch10_collation_bin2" ` --directory "D:\temp" ` --fileoutput "mssql_orders_1995.parquet" ` --parallelmethod "Ntile" ` --distributekeycolumn "o_orderkey" ` --paralleldegree 7 ` --query "select * from dbo.orders where o_orderdate between '1995-01-01' and '1995-12-31'" ` --merge "False" ``` ## OLEDB Connection[​](#oledb-connection "Direct link to OLEDB Connection") Alternative connection method using OLEDB provider. **Single-threaded:** ``` $query="SELECT top 10000 * FROM FASTExportData.dbo.TEST_71_1M_12m" $target="localhost" .\FastBCP.exe ` --connectiontype "oledb" ` --provider "MSOLEDBSQL" ` --server $target ` --directory "C:\temp" ` --fileoutput "TEST.CSV" ` --paralleldegree 1 ` --trusted ` --query $query ` --parallelmethod "None" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ``` **Parallel Random with Windows Auth:** ``` .\FastBCP.exe ` --connectiontype "oledb" ` --provider "MSOLEDBSQL" ` --server $target ` --directory "C:\temp" ` --fileoutput "TEST.CSV" ` --paralleldegree 6 ` --trusted ` --query $query ` --parallelmethod "Random" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --distributekeycolumn "ID_ARTICLE" ` --merge "False" ``` **Parallel Random with SQL Auth:** ``` .\FastBCP.exe ` --connectiontype "oledb" ` --provider "MSOLEDBSQL" ` --server $target ` --directory "C:\temp" ` --fileoutput "TEST.CSV" ` --paralleldegree 6 ` --user "FastUser" ` --password "FastPassword" ` --query $query ` --parallelmethod "Random" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --distributekeycolumn "ID_ARTICLE" ` --merge "False" ``` **Parallel DataDriven:** ``` .\FastBCP.exe ` --connectiontype "oledb" ` --provider "MSOLEDBSQL" ` --server $target ` --directory "C:\temp" ` --fileoutput "TEST.CSV" ` --paralleldegree 6 ` --trusted ` --query $query ` --parallelmethod "DataDriven" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --distributekeycolumn "ID_DECOUPE_GEO" ` --merge "False" ``` ## ODBC Connection[​](#odbc-connection "Direct link to ODBC Connection") Using ODBC DSN for connection. **Single-threaded:** ``` .\FastBCP.exe ` --connectiontype "odbc" ` --dsn "DSN4FastBCP" ` --directory "C:\temp" ` --fileoutput "TEST.CSV" ` --paralleldegree 1 ` --trusted ` --query "SELECT * FROM [TEST_71_1M_12m]" ` --parallelmethod "None" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ``` **Parallel Random with Windows Auth:** ``` .\FastBCP.exe ` --connectiontype "odbc" ` --dsn "DSN4FastBCP" ` --directory "C:\temp" ` --fileoutput "TEST.CSV" ` --paralleldegree 6 ` --trusted ` --query "SELECT * FROM [TEST_71_1M_12m]" ` --parallelmethod "Random" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --distributekeycolumn "ID_ARTICLE" ` --merge "False" ``` **Parallel Random with SQL Auth:** ``` .\FastBCP.exe ` --connectiontype "odbc" ` --dsn "DSN4FastBCP" ` --directory "C:\temp" ` --fileoutput "TEST.CSV" ` --paralleldegree 6 ` --user "FastUser" ` --password "FastPassword" ` --query "SELECT * FROM [TEST_71_1M_12m]" ` --parallelmethod "Random" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --distributekeycolumn "ID_ARTICLE" ` --merge "False" ``` **Parallel DataDriven:** ``` .\FastBCP.exe ` --connectiontype "odbc" ` --dsn "DSN4FastBCP" ` --directory "C:\temp" ` --fileoutput "TEST.CSV" ` --paralleldegree 6 ` --trusted ` --query "SELECT * FROM [TEST_71_1M_12m]" ` --parallelmethod "DataDriven" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --distributekeycolumn "ID_GEO" ` --merge "False" ``` tip Build your command with the [Wizard](/latest/wizard.md) --- # Configuration Examples Here are sample configuration files for different logging scenarios: ## FastBCP\_Settings.json : Sinks on Console + Files (Windows path style) + MSSQL[​](#fastbcp_settingsjson---sinks-on-console--files-windows-path-style--mssql "Direct link to FastBCP_Settings.json : Sinks on Console + Files (Windows path style) + MSSQL") For logs with Console + Files stored on Windows machine + MSSQL sinks: ``` { "ConnectionStrings": { "MS_FastBCPLogs": "Server=localhost;Database=FastBCPLogs;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\\FastBCP_.json", "retainedFileCountLimit": 10, "rollingInterval": "Day", "rollOnFileSizeLimit": true } }, { "Name": "MSSqlServer", "Args": { "connectionString": "MS_FastBCPLogs", "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": "FastBCP" } } } ``` ## FastBCP\_Settings\_Linux\_Console\_Files.json[​](#fastbcp_settings_linux_console_filesjson "Direct link to FastBCP_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/FastBCP_.json", "retainedFileCountLimit": 10, "rollingInterval": "Day", "rollOnFileSizeLimit": true } } ], "Enrich": [ "FromLogContext", "WithMachineName", "WithProcessId", "WithThreadId" ], "Properties": { "Application": "FastBCP" } } } ``` ## FastBCP\_Settings\_Map\_for\_Windows.json[​](#fastbcp_settings_map_for_windowsjson "Direct link to FastBCP_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}\\FastBCP-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": "FastBCP" } } } ``` ## FastBCP\_Settings\_Map\_for\_Linux\_and\_Container.json[​](#fastbcp_settings_map_for_linux_and_containerjson "Direct link to FastBCP_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}/FastBCP-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": "FastBCP" } } } ``` ## FastBCP\_Settings\_Log\_to\_PGSQL.json : Console + PostgreSQL log database[​](#fastbcp_settings_log_to_pgsqljson--console--postgresql-log-database "Direct link to FastBCP_Settings_Log_to_PGSQL.json : Console + PostgreSQL log database") ``` { "ConnectionStrings": { "PG_FastBCPLogs": "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_FastBCPLogs", "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": "FastBCP" } } } ``` ## FastBCP\_Settings\_OpenTelemetry.json[​](#fastbcp_settings_opentelemetryjson "Direct link to FastBCP_Settings_OpenTelemetry.json") For Console with trace correlation and OpenTelemetry log export (e.g., to [Jaeger](https://www.jaegertracing.io/)): ``` { "Serilog": { "MinimumLevel": { "Default": "Debug", "Override": { "Microsoft": "Warning", "System": "Warning" } }, "Properties": { "LogDirectory": "logs" }, "Enrich": [ "FromLogContext", "WithEnvironmentUserName", "WithProcessId", "WithThreadId", "WithMachineName", "fulltargetname" ], "WriteTo": [ { "Name": "Console", "Args": { "restrictedToMinimumLevel": "Information", "outputTemplate": "{Timestamp:yyyy-MM-ddTHH:mm:ss.fff zzz} -|- {Application} -|- {Level:u12} -|- {fulltargetname} -|- TraceId={TraceId} SpanId={SpanId} -|- {Message}{NewLine}{Exception}", "theme": "Serilog.Sinks.SystemConsole.Themes.SystemConsoleTheme::Literate, Serilog.Sinks.Console" } }, { "Name": "OpenTelemetry", "Args": { "Endpoint": "http://localhost:4317", "Protocol": "Grpc", "ResourceAttributes": { "service.name": "FastBCP", "deployment.environment": "local-test" } } } ] } } ``` Usage with the `--traceparent` parameter to correlate with an upstream caller: ``` ./FastBCP \ --connectiontype mssql \ --server localhost \ --database "tpch10" \ --trusted \ --query "SELECT * FROM dbo.orders" \ --directory "/data/temp" \ --fileoutput "orders.csv" \ --traceparent "00-abcdef1234567890abcdef1234567890-1234567890abcdef-01" \ --settingsfile "/config/FastBCP_Settings_OpenTelemetry.json" ``` **Result in Jaeger UI:** ![FastBCP OpenTelemetry result in Jaeger UI](/assets/images/FastBCP_OpenTelemetry_result_sample-729a1de4f4ccde92a0856f3f4e8b9468.jpg) --- # Log Database FastBCP 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 `FastBCP_settings.json` * You can specify a custom settings file using the `--settingsfile` parameter Information **Log table is created automatically if not exists but it is not indexed.** Up to you to choose you indexed column(s) you prefer to index. We Advice you to index event\_timestamp column and run\_id Information No internal purge of the log table, it is up to you to decide when and how filter the log table Complete configuration examples for both MSSQL and PostgreSQL are available in the [Configuration Examples](/0.32/documentation/logging/examples.md#fastbcp_settingsjson-for-windows) page. Information **In case the database is not reachable, FastBCP will fail and will refuse to continue.** If you want to continue without logging in the database, you can rename the `FastBCP_settings.json` file to something else (like `FastBCP_settings.json.save`) and FastBCP 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 ***FastBCP\_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}/FastBCP-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**: [FastBCP\_Settings\_Map\_for\_Windows.json](/0.32/documentation/logging/examples.md#fastbcp_settings_map_for_windowsjson) * **Linux/Container**: [FastBCP\_Settings\_Map\_for\_Linux\_and\_Container.json](/0.32/documentation/logging/examples.md#fastbcp_settings_map_for_linux_and_containerjson) --- # Log Levels FastBCP 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 | | **Critical** | Severe errors causing termination | Fatal application errors | ## Configuration[​](#configuration "Direct link to Configuration") You can also configure the log level in the `FastBCP_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\\FastBCP_.json", "rollingInterval": "Day" } } ] } } ``` --- # OpenTelemetry FastBCP supports [OpenTelemetry](https://opentelemetry.io/) for distributed tracing and log correlation. This allows you to correlate FastBCP operations with upstream callers (orchestrators, APIs, pipelines) and export structured logs to any OpenTelemetry-compatible backend such as [Jaeger](https://www.jaegertracing.io/), [Zipkin](https://zipkin.io/), or [Grafana Tempo](https://grafana.com/oss/tempo/). ## The `--traceparent` Parameter[​](#the---traceparent-parameter "Direct link to the---traceparent-parameter") The `--traceparent` parameter accepts a [W3C Trace Context](https://www.w3.org/TR/trace-context/) traceparent identifier. When provided, FastBCP uses this trace context to link its internal spans and logs to the calling system's trace, enabling end-to-end distributed tracing. **Syntax:** * Long form only: `--traceparent ""` **Format:** The traceparent value follows the W3C Trace Context specification: ``` {version}-{trace-id}-{parent-id}-{trace-flags} ``` | Field | Format | Description | | --------------- | ------------- | --------------------------------------------- | | **version** | 2 hex digits | Version of the trace context (currently `00`) | | **trace-id** | 32 hex digits | Globally unique trace identifier | | **parent-id** | 16 hex digits | Identifier of the calling span | | **trace-flags** | 2 hex digits | Trace flags (e.g., `01` for sampled) | **Example:** * Windows * Linux ``` .\FastBCP.exe ` ... --traceparent "00-abcdef1234567890abcdef1234567890-1234567890abcdef-01" ` ... ``` ``` ./FastBCP \ ... --traceparent "00-abcdef1234567890abcdef1234567890-1234567890abcdef-01" \ ... ``` Tips Pass the traceparent from your orchestrator (Airflow, Kestra, CI/CD pipeline, or any OpenTelemetry-instrumented caller) so that FastBCP operations appear as child spans in your distributed traces. ## Configuring the OpenTelemetry Endpoint[​](#configuring-the-opentelemetry-endpoint "Direct link to Configuring the OpenTelemetry Endpoint") FastBCP uses the Serilog OpenTelemetry sink to export logs. You can configure the endpoint using either **environment variables** or a **`FastBCP_Settings.json`** file. ### Using Environment Variables[​](#using-environment-variables "Direct link to Using Environment Variables") Set the `OTEL_EXPORTER_OTLP_ENDPOINT` environment variable to point to your OpenTelemetry collector: * Windows * Linux ``` $env:OTEL_EXPORTER_OTLP_ENDPOINT = "http://localhost:4317" ``` ``` export OTEL_EXPORTER_OTLP_ENDPOINT="http://localhost:4317" ``` ### Using `FastBCP_Settings.json`[​](#using-fastbcp_settingsjson "Direct link to using-fastbcp_settingsjson") Add the OpenTelemetry sink to the `WriteTo` section of your `FastBCP_Settings.json` file. This gives you full control over the protocol, endpoint, and resource attributes. ``` { "Serilog": { "MinimumLevel": { "Default": "Debug", "Override": { "Microsoft": "Warning", "System": "Warning" } }, "Properties": { "LogDirectory": "logs" }, "Enrich": [ "FromLogContext", "WithEnvironmentUserName", "WithProcessId", "WithThreadId", "WithMachineName", "fulltargetname" ], "WriteTo": [ { "Name": "Console", "Args": { "restrictedToMinimumLevel": "Information", "outputTemplate": "{Timestamp:yyyy-MM-ddTHH:mm:ss.fff zzz} -|- {Application} -|- {Level:u12} -|- {fulltargetname} -|- TraceId={TraceId} SpanId={SpanId} -|- {Message}{NewLine}{Exception}", "theme": "Serilog.Sinks.SystemConsole.Themes.SystemConsoleTheme::Literate, Serilog.Sinks.Console" } }, { "Name": "OpenTelemetry", "Args": { "Endpoint": "http://localhost:4317", "Protocol": "Grpc", "ResourceAttributes": { "service.name": "FastBCP", "deployment.environment": "local-test" } } } ] } } ``` **Key settings in the OpenTelemetry sink:** | Setting | Description | | ---------------------- | ----------------------------------------------------------------------------- | | **Endpoint** | URL of your OpenTelemetry collector (default: `http://localhost:4317`) | | **Protocol** | Transport protocol: `Grpc` (default) or `HttpProtobuf` | | **ResourceAttributes** | Key-value pairs attached to every log entry (e.g., service name, environment) | Information The `TraceId` and `SpanId` fields in the console output template allow you to see trace correlation directly in the console logs, even without an OpenTelemetry backend. note When both an environment variable and a `FastBCP_Settings.json` configuration are present, the settings file takes precedence for the OpenTelemetry sink configuration. --- # Logging Overview ## Parameter Logs targets using FastBCP\_settings.json[​](#parameter-logs-targets-using-fastbcp_settingsjson "Direct link to Parameter Logs targets using FastBCP_settings.json") In FastBCP can log informations in 3 modes : * **[Console](/0.32/documentation/logging/logs-level.md)** * **[Database (MSSQL and PostgreSQL Only)](/0.32/documentation/logging/log-database.md)** * **[File (or Map)](/0.32/documentation/logging/log-files-names-mapping-using-variables.md)** FastBCP also supports **[OpenTelemetry](/0.32/documentation/logging/OpenTelemetry.md)** for distributed tracing and log export to any OpenTelemetry-compatible backend. Tips You can use several targets (sinks) at the same time. You can adapt what and where you want to log using the `FastBCP_settings.json` file. By default if no custom path is provided, FastBCP looks for the settings file in : * the current directory (the working directory) * the same directory where the FastBCP executable is located (the executable directory). If this file is not present, FastBCP will use the console log only. You can specify a custom path to the settings file using the `-f` or `--settingsfile` parameter. * Windows * Linux ``` .\FastBCP.exe ` --connectiontype mssql ` --server localhost ` --database "tpch10_collation_bin2" ` --trusted ` --query "SELECT * FROM dbo.orders" ` --directory "D:\temp" ` --fileoutput "mssql_orders.csv" ` --parallelmethod Ntile ` --distributekeycolumn "o_orderkey" ` --paralleldegree 7 ` --settingsfile "D:\logs\config\FastBCP_settings.json" ``` ``` ./FastBCP \ --connectiontype mssql \ --server localhost \ --database "tpch10_collation_bin2" \ --trusted \ --query "SELECT * FROM dbo.orders" \ --directory "/data/temp" \ --fileoutput "mssql_orders.csv" \ --parallelmethod Ntile \ --distributekeycolumn "o_orderkey" \ --paralleldegree 7 \ --settingsfile "/etc/fastbcp/FastBCP_settings.json" ``` Some settings files samples can be found in the [Configuration Examples](/0.32/documentation/logging/examples.md) page. --- # Installation ## Instructions[​](#instructions "Direct link to Instructions") * Windows * Linux * Docker/MacOS To start using FastBCP, first **[request a trial](https://arpe.io/get-trial?product=FastBCP)** to download the latest version. Once downloaded, unzip FastBCP to a directory of your choice. ``` Expand-Archive -Path .\FastBCP.zip -DestinationPath .\FastBCP ``` You can verify the installation by checking the version: ``` .\FastBCP.exe --version ``` To start using FastBCP, first **[request a trial](https://arpe.io/get-trial?product=FastBCP)** to download the latest version. Once downloaded, unzip FastBCP to a directory of your choice. ``` unzip FastBCP.zip -d FastBCP ``` On **Linux**, you need to give execution rights to the FastBCP binary: ``` chmod +x FastBCP ```
You can verify the installation by checking the version: ``` ./FastBCP --version ``` FastBCP is available as a Docker image on **[Docker Hub](https://hub.docker.com/repository/docker/arpeio/fastbcp/general)**. Pull the latest version: ``` docker pull arpeio/fastbcp ``` Or pull a specific version: ``` docker pull arpeio/fastbcp:v0.0.0 ``` You can verify the installation by checking the version: ``` docker run --rm arpeio/fastbcp:latest --version ```
**You are now ready to run FastBCP.** License Information After the trial period you will need a valid license. By default, FastBCP will try to find a `FastBCP.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 FastBCP : | 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 in order to use it with ODBC or OLEDB connection type. --- # Apache Airflow [Apache Airflow](https://airflow.apache.org/) is a powerful open-source platform for developing, scheduling, and monitoring batch-oriented workflows. FastBCP 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") FastBCP provides an official Docker image available on Docker Hub: **Image:** `arpeio/fastbcp:latest`
**Repository:** ## Prerequisites[​](#prerequisites "Direct link to Prerequisites") ### Install Docker Provider[​](#install-docker-provider "Direct link to Install Docker Provider") To use FastBCP 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. FastBCP integration requires connections for your source database and cloud storage. ### 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:** `host.docker.internal` (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) AWS Connection (for S3 Export)[​](#b-aws-connection-for-s3-export "Direct link to B) AWS Connection (for S3 Export)") Create an AWS connection to pass cloud credentials to the container: 1. Navigate to **Admin** → **Connections** in the Airflow UI 2. Click **+** to create a new connection 3. In the **Connection Type** dropdown, select **Amazon Web Services** 4. Configure the connection: **Connection Settings:** * **Connection Id:** `aws_fastbcp` (or your preferred name) * **Connection Type:** `Amazon Web Services` (select this from the dropdown) * **AWS Access Key ID:** Your AWS access key (in the Login field) * **AWS Secret Access Key:** Your AWS secret key (in the Password field) * **Extra:** `{"region_name":"eu-west-1"}` (or your preferred region) tip Airflow AWS providers commonly use `region_name` in Extra JSON. Alternatively, you can use `{"region":"eu-west-1"}` or `{"aws_default_region":"eu-west-1"}`. ## 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 FastBCP 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., `fastbcp_orders_mssql_to_s3.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 _mssql_parts(conn_id: str): """ Extract MSSQL connection details from Airflow connection. Expected Airflow connection (using ODBC): - Conn Id: mssql_tpch10 (conn_type: odbc) - Host: host.docker.internal - Port: 11433 - Login/Password: FastLogin / FastPassword - Extra JSON: {"database":"tpch10"} """ c = BaseHook.get_connection(conn_id) host = c.host port = c.port user = c.login pwd = c.password # For ODBC MSSQL, the database is typically stored in Extra JSON # (because the UI may not expose a dedicated "Database" field). db = c.extra_dejson.get("database") or c.schema if not db: raise ValueError( f"Connection '{conn_id}': missing database. Put it in Extra JSON " f'{{"database":"tpch10"}} (recommended for ODBC).' ) return host, port, user, pwd, db def _aws_env(conn_id: str): """ Extract AWS credentials from Airflow connection and map to container env vars. Expected Airflow AWS connection: - Conn Id: aws_fastbcp - Conn Type: Amazon Web Services - Login -> AWS_ACCESS_KEY_ID - Password -> AWS_SECRET_ACCESS_KEY - Extra -> {"region_name":"eu-west-1"} (or your region) Returns a dictionary with: - AWS_ACCESS_KEY_ID - AWS_SECRET_ACCESS_KEY - AWS_DEFAULT_REGION """ c = BaseHook.get_connection(conn_id) # Keys can be in login/password or in Extra JSON access_key = c.login or c.extra_dejson.get("aws_access_key_id") secret_key = c.password or c.extra_dejson.get("aws_secret_access_key") # Airflow AWS providers commonly use "region_name" in Extra JSON region = ( c.extra_dejson.get("region_name") or c.extra_dejson.get("region") or c.extra_dejson.get("aws_default_region") ) missing = [ k for k, v in { "AWS_ACCESS_KEY_ID": access_key, "AWS_SECRET_ACCESS_KEY": secret_key, "AWS_DEFAULT_REGION": region, }.items() if not v ] if missing: raise ValueError( f"Connection '{conn_id}': missing AWS fields: {missing}. " f"Set login/password and add Extra.region_name (or region)." ) return { "AWS_ACCESS_KEY_ID": access_key, "AWS_SECRET_ACCESS_KEY": secret_key, "AWS_DEFAULT_REGION": region, } with DAG( dag_id="fastbcp_export_orders_parquet_to_s3", start_date=datetime(2025, 1, 1), schedule=None, catchup=False, tags=["fastbcp", "mssql", "s3", "docker"], ) as dag: mssql_host, mssql_port, mssql_user, mssql_pwd, mssql_db = _mssql_parts("mssql_tpch10") aws_env = _aws_env("aws_fastbcp") DockerOperator( task_id="export_orders_parquet_to_s3", image="arpeio/fastbcp: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, environment=aws_env, command=[ "--connectiontype", "mssql", "--server", f"{mssql_host},{mssql_port}", "--user", mssql_user, "--password", mssql_pwd, "--database", mssql_db, "--sourceschema", "dbo", "--sourcetable", "orders", "--fileoutput", "orders.parquet", "--directory", "s3://fastbcp-export/orders/parquet", "--parallelmethod", "Ntile", "--paralleldegree", "12", "--distributekeycolumn", "o_orderkey", "--merge", "false", "--nobanner", ], network_mode="bridge", ) ``` **Key Parameters:** * `image`: Specifies the FastBCP Docker image * `docker_url`: Docker daemon endpoint * `environment`: Dictionary of environment variables (AWS credentials in this case) * `command`: List of FastBCP CLI arguments * `auto_remove`: Automatically remove the container after successful execution ### Helper Functions Explained[​](#helper-functions-explained "Direct link to Helper Functions Explained") The DAG includes two utility functions: #### `_mssql_parts(conn_id)`[​](#_mssql_partsconn_id "Direct link to _mssql_partsconn_id") Extracts connection details from an Airflow ODBC connection. This function: * Retrieves host, port, username, and password * Extracts the database name from the Extra JSON field * Returns all components needed to build the FastBCP connection string #### `_aws_env(conn_id)`[​](#_aws_envconn_id "Direct link to _aws_envconn_id") Extracts AWS credentials from an Airflow AWS connection and maps them to the environment variables expected by FastBCP: * `AWS_ACCESS_KEY_ID` * `AWS_SECRET_ACCESS_KEY` * `AWS_DEFAULT_REGION` This function supports multiple Extra JSON formats for flexibility. ## Logging[​](#logging "Direct link to Logging") All FastBCP 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., `fastbcp_export_orders_parquet_to_s3`) 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: * FastBCP 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 16:15:37] INFO - Settings file not found in the working directory nor in the executable directory [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.882 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- The "FastBCP_Settings.json" file does not exist. Using default settings. Console Only with loglevel=Information [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.892 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- FastBCP Trial – will expires on "2026‑03‑27" (24 day(s) left). [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.892 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Starting [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- FastBCP Version : "0.29.2.0" Architecture : "X64" - Framework : ".NET 8.0.24" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Internal Trace ID : "5ccea857-1538-4a28-8b1c-cfe5c51fbd43" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Internal Run ID : "5ccea857-1538-4a28-8b1c-cfe5c51fbd43" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- OS : "Debian GNU/Linux 13 (trixie)" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Connection Type : "mssql" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Source SqlInstance : "sql22,1433" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Source Database : "tpch" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Source Schema : "tpch10" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Source Table : "orders" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Trusted Connection : False [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- User : "migadmin" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Output File : "orders.parquet" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Output Directory : /data/parquet [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Degree : 12 [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Distribute Method : "Ntile" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Distribute Column : "o_orderkey" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Decimal Separator : "," [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Delimiter : "|" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Use quotes : False [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Date format: "yyyy-MM-dd" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Encoding : "UTF-8" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- No Header : False [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Timestamped : False [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Boolean Format : "automatic" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Cloud Profile : "" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Application Intent : "ReadOnly" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.906 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- file extension is ".parquet" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.909 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Encoding used : Unicode (UTF-8) - 65001 - utf-8 [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.965 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- 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=FastBCP;Application Intent=ReadOnly" [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.086 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- 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 16:15:38] INFO - 2026-03-02T15:15:38.110 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Get DataTypes with header end : Elapsed=6 ms [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Data Segments Computation Completed in 260 ms [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Distribute Column Type : "Int32" [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 0 : 1 : 1 - 5000001 or "o_orderkey" is null [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 1 : 2 : 5000002 - 10000002 [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 2 : 3 : 10000003 - 15000003 [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 3 : 4 : 15000004 - 20000004 [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 4 : 5 : 20000005 - 25000005 [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 5 : 6 : 25000006 - 30000006 [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 6 : 7 : 30000007 - 35000007 [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 7 : 8 : 35000032 - 40000032 [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 8 : 9 : 40000033 - 45000033 [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 9 : 10 : 45000034 - 50000034 [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 10 : 11 : 50000035 - 55000035 [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 11 : 12 : 55000036 - 60000000 [2026-03-02 16:15:46] INFO - 2026-03-02T15:15:46.611 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 002 for o_orderkey between 10000003 and 15000003 into /data/parquet/orders_chunk_002.parquet : 1250001 rows x 9 columns in 8234ms [2026-03-02 16:15:46] INFO - 2026-03-02T15:15:46.611 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 011 for o_orderkey between 55000036 and 60000000 into /data/parquet/orders_chunk_011.parquet : 1249989 rows x 9 columns in 8234ms [2026-03-02 16:15:46] INFO - 2026-03-02T15:15:46.790 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 003 for o_orderkey between 15000004 and 20000004 into /data/parquet/orders_chunk_003.parquet : 1250001 rows x 9 columns in 8413ms [2026-03-02 16:15:46] INFO - 2026-03-02T15:15:46.797 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 005 for o_orderkey between 25000006 and 30000006 into /data/parquet/orders_chunk_005.parquet : 1250001 rows x 9 columns in 8420ms [2026-03-02 16:15:46] INFO - 2026-03-02T15:15:46.936 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 008 for o_orderkey between 40000033 and 45000033 into /data/parquet/orders_chunk_008.parquet : 1250001 rows x 9 columns in 8559ms [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.139 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 010 for o_orderkey between 50000035 and 55000035 into /data/parquet/orders_chunk_010.parquet : 1250001 rows x 9 columns in 8763ms [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.154 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 000 for o_orderkey between 1 and 5000001 into /data/parquet/orders_chunk_000.parquet : 1250001 rows x 9 columns in 8777ms [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.247 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 009 for o_orderkey between 45000034 and 50000034 into /data/parquet/orders_chunk_009.parquet : 1250001 rows x 9 columns in 8870ms [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.308 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 006 for o_orderkey between 30000007 and 35000007 into /data/parquet/orders_chunk_006.parquet : 1250001 rows x 9 columns in 8931ms [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.309 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 001 for o_orderkey between 5000002 and 10000002 into /data/parquet/orders_chunk_001.parquet : 1250001 rows x 9 columns in 8932ms [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.363 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 007 for o_orderkey between 35000032 and 40000032 into /data/parquet/orders_chunk_007.parquet : 1250001 rows x 9 columns in 8986ms [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.366 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 004 for o_orderkey between 20000005 and 25000005 into /data/parquet/orders_chunk_004.parquet : 1250001 rows x 9 columns in 8989ms [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- files generation end : Elapsed=9257 ms - maxdop=12 [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total data rows : 15000000 [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total data columns : 9 [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total cells : 135000000 [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Throughput rows : 1568531 rows/s [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Throughput cells : 14116787 cells/s [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total time : Elapsed=9563 ms [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total data rows : 15000000 [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total data columns : 9 [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total cells : 135000000 [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Final Throughput rows : 1568482 rows/s [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Final Throughput cells : 14116346 cells/s [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Completed Load [2026-03-02 16:15:47] INFO - Task instance in success state [2026-03-02 16:15:47] INFO - Previous state of the Task instance: TaskInstanceState.RUNNING [2026-03-02 16:15:47] INFO - Task operator: ``` --- # Docker Minimal, production-ready container image to run FastBCP, a high-performance bulk copy 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/FastBCP` * **Repository**: [FastBCP-Image on GitHub](https://github.com/arpe-io/FastBCP-Image) * **DockerHub**: [arpeio/fastbcp](https://hub.docker.com/repository/docker/arpeio/fastbcp/general) * Published automatically via GitHub Actions for each new release and weekly security updates ## Prerequisites[​](#prerequisites "Direct link to Prerequisites") * Docker 24+ (or Podman) * FastBCP Linux x64 ≥ 0.28.0 binary (for build only) * Optional: `FastBCP_Settings.json` to mount/copy into `/config` for custom logging settings ## Using the Prebuilt Image from DockerHub[​](#using-the-prebuilt-image-from-dockerhub "Direct link to Using the Prebuilt Image from DockerHub") You can use a prebuilt image from DockerHub that already includes the FastBCP binary. You must provide your own license at runtime. ### Available Tags[​](#available-tags "Direct link to Available Tags") * **Version-specific tags** are aligned with FastBCP releases (e.g., `v0.28.3`) * **`latest` tag** always points to the most recent FastBCP version ### Automatic Updates[​](#automatic-updates "Direct link to Automatic Updates") * **New releases**: Images are automatically built when new FastBCP versions are released * **Security updates**: The latest version of each minor branch (e.g., latest v0.27.x, v0.28.x, v0.29.x) is automatically rebuilt weekly (every Monday) with the latest base image and security patches * This ensures that all actively used versions remain secure without breaking compatibility * Example: If you use `v0.28.8` (latest of 0.28.x branch), it gets security updates even after `v0.29.0` is released ### Pull the Image[​](#pull-the-image "Direct link to Pull the Image") ``` # Latest version docker pull arpeio/fastbcp:latest # Specific version docker pull arpeio/fastbcp:v0.28.3 ``` ### Basic Commands[​](#basic-commands "Direct link to Basic Commands") ``` # Get command line help docker run --rm arpeio/fastbcp:latest # Check version docker run --rm arpeio/fastbcp:latest --version ``` ### License Requirement[​](#license-requirement "Direct link to License Requirement") Since version 0.28.0, pass the license content directly via `--license "…"`. ``` export licenseContent=$(cat ./FastBCP.lic) # Use $licenseContent in your docker run commands docker run --rm arpeio/fastbcp: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. ## Usage Examples[​](#usage-examples "Direct link to Usage Examples") The Docker image uses the FastBCP binary as its entrypoint, so you can run it directly with parameters as defined in the [FastBCP documentation](/latest/.md). ### Example 1: SQL Server → Parquet on S3[​](#example-1-sql-server--parquet-on-s3 "Direct link to Example 1: SQL Server → Parquet on S3") ``` export licenseContent=$(cat ./FastBCP.lic) docker run --rm \ -e AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID} \ -e AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY} \ -e AWS_REGION=${AWS_REGION} \ arpeio/fastbcp:latest \ --connectiontype "mssql" \ --server "host.docker.internal,1433" \ --user "FastUser" \ --password "FastPassword" \ --database "tpch_test" \ --query "SELECT * FROM dbo.orders WHERE year(o_orderdate)=1998" \ --fileoutput "orders.parquet" \ --directory "s3://arpeioftoutput/dockertest/" \ --paralleldegree 12 \ --parallelmethod "Ntile" \ --distributekeycolumn "o_orderkey" \ --merge false \ --license "$licenseContent" ``` ### Example 2: SQL Server → CSV with Custom Logging[​](#example-2-sql-server--csv-with-custom-logging "Direct link to Example 2: SQL Server → CSV with Custom Logging") ``` export licenseContent=$(cat ./FastBCP.lic) docker run --rm \ -v fastbcp-config:/config \ -v fastbcp-data:/data \ -v fastbcp-logs:/logs \ arpeio/fastbcp:latest \ --settingsfile "/config/FastBCP_Settings_Logs_To_Files.json" \ --connectiontype "mssql" \ --server "host.docker.internal,1433" \ --user "FastUser" \ --password "FastPassword" \ --database "tpch_test" \ --query "SELECT * FROM dbo.orders WHERE year(o_orderdate)=1998" \ --fileoutput "orders.csv" \ --directory "/data/orders/csv" \ --delimiter "|" \ --decimalseparator "." \ --dateformat "yyyy-MM-dd HH:mm:ss" \ --paralleldegree 12 \ --parallelmethod "Ntile" \ --distributekeycolumn "o_orderkey" \ --merge false \ --license "$licenseContent" ``` ### Example 3: PostgreSQL → Parquet on Azure Data Lake Storage (ADLS)[​](#example-3-postgresql--parquet-on-azure-data-lake-storage-adls "Direct link to Example 3: PostgreSQL → Parquet on Azure Data Lake Storage (ADLS)") ``` export licenseContent=$(cat ./FastBCP.lic) export adlscontainer="arpeioadlseu" docker run --rm \ -e AZURE_CLIENT_ID=${AZURE_CLIENT_ID} \ -e AZURE_TENANT_ID=${AZURE_TENANT_ID} \ -e AZURE_CLIENT_SECRET=${AZURE_CLIENT_SECRET} \ arpeio/fastbcp:latest \ --connectiontype "pgcopy" \ --server "host.docker.internal:15432" \ --user "FastUser" \ --password "FastPassword" \ --database "tpch" \ --sourceschema "tpch_10" \ --sourcetable "orders" \ --query "SELECT * FROM tpch_10.orders WHERE o_orderdate >= '1998-01-01' AND o_orderdate < '1999-01-01'" \ --fileoutput "orders.parquet" \ --directory "abfss://${adlscontainer}.dfs.core.windows.net/fastbcpoutput/testdfs/orders" \ --paralleldegree -2 \ --parallelmethod "Ctid" \ --license "$licenseContent" ``` ### Example 4: Oracle → Parquet on Google Cloud Storage (GCS)[​](#example-4-oracle--parquet-on-google-cloud-storage-gcs "Direct link to Example 4: Oracle → Parquet on Google Cloud Storage (GCS)") ``` export licenseContent=$(cat ./FastBCP.lic) export gcsbucket="arpeio-gcs-bucket" export GOOGLE_APPLICATION_CREDENTIALS_JSON=$(cat ./gcp-credentials.json) docker run --rm \ -e GOOGLE_APPLICATION_CREDENTIALS="${GOOGLE_APPLICATION_CREDENTIALS_JSON}" \ arpeio/fastbcp:latest \ --connectiontype "oraodp" \ --server "host.docker.internal:1521/FREEPDB1" \ --user "TPCH_IN" \ --password "TPCH_IN" \ --database "FREEPDB1" \ --sourceschema "TPCH_IN" \ --sourcetable "ORDERS" \ --fileoutput "orders.parquet" \ --directory "gs://${gcsbucket}/fastbcpoutput/testgs/orders" \ --parallelmethod "Rowid" \ --paralleldegree -2 \ --license "$licenseContent" ``` ## Volumes[​](#volumes "Direct link to Volumes") The Docker image declares several volumes to organize data and configuration: ``` VOLUME ["/config", "/data", "/work", "/logs"] ``` ### Volume Configuration and Access Modes[​](#volume-configuration-and-access-modes "Direct link to Volume Configuration and Access Modes") | **Volume** | **Purpose** | **Access Mode** | **Notes** | | ---------- | ------------------------------------------------------------------- | --------------------- | ----------------------------------------------- | | `/config` | Contains user-provided configuration files (e.g., Serilog settings) | Read-only / Read-many | Shared across multiple containers; not modified | | `/data` | Input/output data directory | 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 FastBCP Logging[​](#configuring-fastbcp-logging "Direct link to Configuring FastBCP Logging") info Available starting from version v0.28.3 FastBCP supports custom logging configuration through an external Serilog settings file in JSON format. This allows you to control how and where logs are written — to the console, to files, or dynamically per run. You can download an example logging settings file directly from GitHub: [FastBCP\_Settings\_Logs\_To\_Files.json](https://raw.githubusercontent.com/aetperf/FastBCP-Image/main/FastBCP_Settings_Logs_To_Files.json) Custom settings files must be mounted into the container under the `/config` directory. ### 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") The following configuration is recommended for most production or Airflow environments. It writes: * Logs to the console for real-time visibility * Run summary logs to `/airflow/xcom/return.json` for Airflow integration * Per-run logs under `/logs`, automatically named with `{LogTimestamp}` and `{TraceId}` ``` { "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": "FastBCP" } } } ``` Important Notes * If a target directory (such as `/logs` or `/airflow/xcom`) does not exist, FastBCP 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") You can use the following placeholders to dynamically generate log file names or directories: | **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") Your Serilog configuration file (for example, `FastBCP_Settings_Logs_To_Files.json`) must be placed in `/config`, either by mounting a local directory or by using a Docker named volume. Example with named volumes: ``` # First, copy your config file to a volume location cp ~/FastBCP_Settings_Logs_To_Files.json /volumes/fastbcp-config/ # Then run FastBCP with mounted volumes docker run --rm \ -v fastbcp-config:/config \ -v fastbcp-data:/data \ -v fastbcp-logs:/logs \ arpeio/fastbcp:latest \ --settingsfile "/config/FastBCP_Settings_Logs_To_Files.json" \ --connectiontype "mssql" \ --server "host.docker.internal,1433" \ --user "FastUser" \ --password "FastPassword" \ --database "tpch_test" \ --query "SELECT * FROM dbo.orders" \ --fileoutput "orders.csv" \ --directory "/data" \ --paralleldegree 12 \ --parallelmethod "Ntile" \ --distributekeycolumn "o_orderkey" \ --merge false \ --license "$licenseContent" ``` If the `--settingsfile` argument is not provided, FastBCP will use its built-in default logging configuration. --- # Kestra [Kestra](https://kestra.io/) is a powerful open-source orchestration platform that can be used to automate and schedule FastBCP data export workflows. FastBCP can be seamlessly integrated into Kestra flows using its Docker image. ## Docker Image[​](#docker-image "Direct link to Docker Image") FastBCP provides an official Docker image available on Docker Hub: **Image:** `arpeio/fastbcp:latest`
**Repository:** ## Integration with Docker Run Plugin[​](#integration-with-docker-run-plugin "Direct link to Integration with Docker Run Plugin") The [`io.kestra.plugin.docker.Run`](https://kestra.io/plugins/plugin-docker/io.kestra.plugin.docker.run) plugin provides a direct way to execute FastBCP commands in a Docker container. This is the recommended method for integrating FastBCP with Kestra. ### Basic Example[​](#basic-example "Direct link to Basic Example") ``` id: fastbcp_export_orders namespace: arpe.io tasks: - id: export_orders_parquet type: io.kestra.plugin.docker.Run containerImage: arpeio/fastbcp:latest host: "tcp://host.docker.internal:2375" commands: - --connectiontype - mssql - --server - "host.docker.internal,11433" - --user - FastLogin - --password - FastPassword - --database - tpch10 - --sourceschema - dbo - --sourcetable - orders - --fileoutput - orders.parquet - --directory - /data/export - --parallelmethod - Ntile - --paralleldegree - "12" - --distributekeycolumn - o_orderkey - --nobanner ``` **Key Parameters:** * `containerImage`: Specifies the FastBCP Docker image * `host`: Docker daemon endpoint (required for Docker Run plugin) * `commands`: Array of FastBCP CLI arguments ## Environment Variables for Cloud Storage[​](#environment-variables-for-cloud-storage "Direct link to Environment Variables for Cloud Storage") When exporting data to cloud storage (AWS S3, Azure Blob, Google Cloud Storage), you can pass cloud credentials using environment variables (see [Cloud Connectivity](/0.32/documentation/cloud-connectivity/overview.md) for more details). ### Example with AWS S3[​](#example-with-aws-s3 "Direct link to Example with AWS S3") ``` id: fastbcp_export_to_s3 namespace: arpe.io tasks: - id: export_orders_to_s3 type: io.kestra.plugin.docker.Run containerImage: arpeio/fastbcp:latest host: "tcp://host.docker.internal:2375" env: AWS_ACCESS_KEY_ID: "AKIAIOSFODNN7EXAMPLE" AWS_SECRET_ACCESS_KEY: "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY" AWS_DEFAULT_REGION: "us-east-1" commands: - --connectiontype - mssql - --server - "host.docker.internal,11433" - --user - FastLogin - --password - FastPassword - --database - tpch10 - --sourceschema - dbo - --sourcetable - orders - --fileoutput - orders.parquet - --directory - s3://my-bucket/exports/orders - --parallelmethod - Ntile - --paralleldegree - "12" - --distributekeycolumn - o_orderkey - --merge - "false" - --nobanner ``` ## 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, connection strings, and cloud credentials, 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: * `FASTBCP_MSSQL_USER` * `FASTBCP_MSSQL_PASSWORD` * `FASTBCP_AWS_ACCESS_KEY_ID` * `FASTBCP_AWS_SECRET_ACCESS_KEY` * `FASTBCP_AWS_DEFAULT_REGION` ### Example with Secrets[​](#example-with-secrets "Direct link to Example with Secrets") ``` id: fastbcp_export_orders_s3_secret namespace: arpe.io tasks: - id: export_orders_parquet_to_s3 type: io.kestra.plugin.docker.Run containerImage: arpeio/fastbcp:latest host: "tcp://host.docker.internal:2375" env: AWS_ACCESS_KEY_ID: "{{ secret('FASTBCP_AWS_ACCESS_KEY_ID') }}" AWS_SECRET_ACCESS_KEY: "{{ secret('FASTBCP_AWS_SECRET_ACCESS_KEY') }}" AWS_DEFAULT_REGION: "{{ secret('FASTBCP_AWS_DEFAULT_REGION') }}" commands: - --connectiontype - mssql - --server - "host.docker.internal,11433" - --user - "{{ secret('FASTBCP_MSSQL_USER') }}" - --password - "{{ secret('FASTBCP_MSSQL_PASSWORD') }}" - --database - tpch10 - --sourceschema - dbo - --sourcetable - orders - --fileoutput - orders.parquet - --directory - s3://fastbcp-export/orders/parquet - --parallelmethod - Ntile - --paralleldegree - "12" - --distributekeycolumn - o_orderkey - --merge - "false" - --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 FastBCP 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 export process, including configuration parameters, connection details, data export progress, and performance metrics. ### Example Log Output[​](#example-log-output "Direct link to Example Log Output") ``` 2026-03-02T15:15:37.882 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- The "FastBCP_Settings.json" file does not exist. Using default settings. Console Only with loglevel=Information 2026-03-02 16:15:37.8922026-03-02T15:15:37.892 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- FastBCP Trial – will expires on "2026‑03‑27" (24 day(s) left). 2026-03-02 16:15:37.8922026-03-02T15:15:37.892 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Starting 2026-03-02 16:15:37.8932026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- FastBCP Version : "0.29.2.0" Architecture : "X64" - Framework : ".NET 8.0.24" 2026-03-02 16:15:37.8932026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Internal Trace ID : "5ccea857-1538-4a28-8b1c-cfe5c51fbd43" 2026-03-02 16:15:37.8932026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Internal Run ID : "5ccea857-1538-4a28-8b1c-cfe5c51fbd43" 2026-03-02 16:15:37.8932026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- OS : "Debian GNU/Linux 13 (trixie)" 2026-03-02 16:15:37.8932026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Connection Type : "mssql" 2026-03-02 16:15:37.8932026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Source SqlInstance : "sql22,1433" 2026-03-02 16:15:37.8932026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Source Database : "tpch" 2026-03-02 16:15:37.8932026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Source Schema : "tpch10" 2026-03-02 16:15:37.8932026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Source Table : "orders" 2026-03-02 16:15:37.8932026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Trusted Connection : False 2026-03-02 16:15:37.8932026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- User : "migadmin" 2026-03-02 16:15:37.8932026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Output File : "orders.parquet" 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Output Directory : /data/parquet 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Degree : 12 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Distribute Method : "Ntile" 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Distribute Column : "o_orderkey" 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Decimal Separator : "," 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Delimiter : "|" 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Use quotes : False 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Date format: "yyyy-MM-dd" 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Encoding : "UTF-8" 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- No Header : False 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Timestamped : False 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Boolean Format : "automatic" 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Cloud Profile : "" 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Application Intent : "ReadOnly" 2026-03-02 16:15:37.9062026-03-02T15:15:37.906 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- file extension is ".parquet" 2026-03-02 16:15:37.9092026-03-02T15:15:37.909 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Encoding used : Unicode (UTF-8) - 65001 - utf-8 2026-03-02 16:15:37.9652026-03-02T15:15:37.965 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- 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=FastBCP;Application Intent=ReadOnly" 2026-03-02 16:15:38.0862026-03-02T15:15:38.086 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- 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 16:15:38.1102026-03-02T15:15:38.110 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Get DataTypes with header end : Elapsed=6 ms 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Data Segments Computation Completed in 260 ms 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Distribute Column Type : "Int32" 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 0 : 1 : 1 - 5000001 or "o_orderkey" is null 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 1 : 2 : 5000002 - 10000002 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 2 : 3 : 10000003 - 15000003 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 3 : 4 : 15000004 - 20000004 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 4 : 5 : 20000005 - 25000005 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 5 : 6 : 25000006 - 30000006 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 6 : 7 : 30000007 - 35000007 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 7 : 8 : 35000032 - 40000032 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 8 : 9 : 40000033 - 45000033 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 9 : 10 : 45000034 - 50000034 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 10 : 11 : 50000035 - 55000035 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 11 : 12 : 55000036 - 60000000 2026-03-02 16:15:46.6112026-03-02T15:15:46.611 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 002 for o_orderkey between 10000003 and 15000003 into /data/parquet/orders_chunk_002.parquet : 1250001 rows x 9 columns in 8234ms 2026-03-02 16:15:46.6112026-03-02T15:15:46.611 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 011 for o_orderkey between 55000036 and 60000000 into /data/parquet/orders_chunk_011.parquet : 1249989 rows x 9 columns in 8234ms 2026-03-02 16:15:46.7902026-03-02T15:15:46.790 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 003 for o_orderkey between 15000004 and 20000004 into /data/parquet/orders_chunk_003.parquet : 1250001 rows x 9 columns in 8413ms 2026-03-02 16:15:46.7972026-03-02T15:15:46.797 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 005 for o_orderkey between 25000006 and 30000006 into /data/parquet/orders_chunk_005.parquet : 1250001 rows x 9 columns in 8420ms 2026-03-02 16:15:46.9362026-03-02T15:15:46.936 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 008 for o_orderkey between 40000033 and 45000033 into /data/parquet/orders_chunk_008.parquet : 1250001 rows x 9 columns in 8559ms 2026-03-02 16:15:47.1392026-03-02T15:15:47.139 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 010 for o_orderkey between 50000035 and 55000035 into /data/parquet/orders_chunk_010.parquet : 1250001 rows x 9 columns in 8763ms 2026-03-02 16:15:47.1542026-03-02T15:15:47.154 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 000 for o_orderkey between 1 and 5000001 into /data/parquet/orders_chunk_000.parquet : 1250001 rows x 9 columns in 8777ms 2026-03-02 16:15:47.2472026-03-02T15:15:47.247 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 009 for o_orderkey between 45000034 and 50000034 into /data/parquet/orders_chunk_009.parquet : 1250001 rows x 9 columns in 8870ms 2026-03-02 16:15:47.3082026-03-02T15:15:47.308 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 006 for o_orderkey between 30000007 and 35000007 into /data/parquet/orders_chunk_006.parquet : 1250001 rows x 9 columns in 8931ms 2026-03-02 16:15:47.3092026-03-02T15:15:47.309 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 001 for o_orderkey between 5000002 and 10000002 into /data/parquet/orders_chunk_001.parquet : 1250001 rows x 9 columns in 8932ms 2026-03-02 16:15:47.3632026-03-02T15:15:47.363 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 007 for o_orderkey between 35000032 and 40000032 into /data/parquet/orders_chunk_007.parquet : 1250001 rows x 9 columns in 8986ms 2026-03-02 16:15:47.3662026-03-02T15:15:47.366 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 004 for o_orderkey between 20000005 and 25000005 into /data/parquet/orders_chunk_004.parquet : 1250001 rows x 9 columns in 8989ms 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- files generation end : Elapsed=9257 ms - maxdop=12 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total data rows : 15000000 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total data columns : 9 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total cells : 135000000 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Throughput rows : 1568531 rows/s 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Throughput cells : 14116787 cells/s 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total time : Elapsed=9563 ms 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total data rows : 15000000 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total data columns : 9 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total cells : 135000000 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Final Throughput rows : 1568482 rows/s 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Final Throughput cells : 14116346 cells/s 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Completed Load ``` --- # PostgreSQL The **pg\_fastbcp** extension allows you to run the FastBCP tool directly from an SQL function, enabling fast data export from databases to various formats (CSV, Parquet) and cloud storage directly from PostgreSQL. ## Extension Overview[​](#extension-overview "Direct link to Extension Overview") * **Repository**: [arpe-io/pg\_fastbcp](https://github.com/arpe-io/pg_fastbcp) * **License**: MIT * **Latest version**: v0.30.0 * **Platforms**: Linux (Debian/Ubuntu) and Windows ![pg\_fastbcp Demo](/assets/images/pg_fastbcp-e5e0b5519f8de77a14a8f8cba33d251c.gif) ## Features[​](#features "Direct link to Features") * **Native PostgreSQL Integration**: Execute FastBCP commands directly from SQL * **Secure Password Management**: Built-in encryption for sensitive credentials * **Detailed Result Return**: Get export statistics and performance metrics as SQL results * **Cross-Platform**: Available for both Linux and Windows environments * **Flexible Configuration**: Support for all FastBCP parameters * **Multiple Output Formats**: Export to CSV, Parquet, or directly to cloud storage (AWS S3, Azure Blob, Google Cloud Storage, OneLake) ## Prerequisites[​](#prerequisites "Direct link to Prerequisites") * PostgreSQL 15, 16, 17, or 18 * Sudo/Administrator privileges to install the extension * Valid FastBCP license (request a [trial license](https://arpe.io/get-trial?product=FastBCP)) * FastBCP 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 `FastBCP` 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\_fastbcp releases page](https://github.com/arpe-io/pg_fastbcp/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_fastbcp.so` * `pg_fastbcp.control` * `pg_fastbcp--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_fastbcp.so /usr/lib/postgresql//lib/ sudo cp pg_fastbcp.control pg_fastbcp--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 FastBCP binary sudo chmod +x /path/to/FastBCP sudo chown postgres:postgres /path/to/FastBCP sudo chmod 750 /path/to/FastBCP # 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_fastbcp.dll` * `pg_fastbcp.control` * `pg_fastbcp--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_fastbcp.dll` file into the `lib` folder 4. Copy the `pg_fastbcp.control` and `pg_fastbcp--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 `FastBCP.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_fastbcp CASCADE; ``` ### Create the extension[​](#create-the-extension "Direct link to Create the extension") ``` CREATE EXTENSION pg_fastbcp CASCADE; ``` ## Functions[​](#functions "Direct link to Functions") ### pg\_fastbcp\_encrypt[​](#pg_fastbcp_encrypt "Direct link to pg_fastbcp_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_RunFastBcp_secure` function will automatically decrypt any values passed to its `password` argument. **Syntax:** ``` pg_fastbcp_encrypt(text_to_encrypt text) RETURNS text ``` **Example:** ``` SELECT pg_fastbcp_encrypt('MySecurePassword'); -- Returns: A base64-encoded encrypted string, e.g., "PgP...base64encodedstring==" ``` ### xp\_RunFastBcp\_secure[​](#xp_runfastbcp_secure "Direct link to xp_RunFastBcp_secure") This is the main function to execute the FastBCP tool. It takes various parameters to configure the data export operation. Password arguments (`password`) will be automatically decrypted. **Syntax:** ``` xp_RunFastBcp_secure( connectiontype text DEFAULT NULL, sourceconnectstring text DEFAULT NULL, dsn text DEFAULT NULL, provider text DEFAULT NULL, server text DEFAULT NULL, user_ text DEFAULT NULL, password text DEFAULT NULL, trusted boolean DEFAULT NULL, database_name text DEFAULT NULL, applicationintent text DEFAULT NULL, fileinput text DEFAULT NULL, query text DEFAULT NULL, sourceschema text DEFAULT NULL, sourcetable text DEFAULT NULL, fileoutput text DEFAULT NULL, directory text DEFAULT NULL, timestamped boolean DEFAULT NULL, encoding text DEFAULT NULL, delimiter text DEFAULT NULL, usequotes boolean DEFAULT NULL, dateformat text DEFAULT NULL, decimalseparator text DEFAULT NULL, boolformat text DEFAULT NULL, noheader boolean DEFAULT NULL, parquetcompression text DEFAULT NULL, cloudprofile text DEFAULT NULL, parallelmethod text DEFAULT NULL, paralleldegree integer DEFAULT NULL, distributekeycolumn text DEFAULT NULL, datadrivenquery text DEFAULT NULL, merge boolean DEFAULT NULL, loglevel text DEFAULT NULL, runid text DEFAULT NULL, settingsfile text DEFAULT NULL, config text DEFAULT NULL, nobanner boolean DEFAULT NULL, license text DEFAULT NULL, fastbcp_path text DEFAULT NULL ) RETURNS TABLE ( exit_code integer, output text, total_rows bigint, total_columns integer, total_time bigint ) ``` ## Usage Examples[​](#usage-examples "Direct link to Usage Examples") ### Linux Example - PostgreSQL to CSV[​](#linux-example---postgresql-to-csv "Direct link to Linux Example - PostgreSQL to CSV") Export data from PostgreSQL to CSV files: ``` SELECT * FROM xp_RunFastBcp_secure( connectiontype := 'pgsql', server := 'localhost:5432', user_ := 'postgres', password := pg_fastbcp_encrypt('MyActualPassword'), database_name := 'tpch', sourceschema := 'tpch_1', sourcetable := 'orders', fileoutput := 'orders.csv', directory := '/tmp/export', paralleldegree := 4, parallelmethod := 'Ntile', distributekeycolumn := 'o_orderkey', noheader := false, delimiter := ',', license := '/tmp/FastBCP_linux-x64_v0.30.0/FastBCP.lic', loglevel := 'information', nobanner := false, fastbcp_path := '/tmp/FastBCP_linux-x64_v0.30.0' ); ``` ## 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 FastBCP process. | | `output` | text | The full log output from the FastBCP tool. | | `total_rows` | bigint | The total number of rows transferred. | | `total_columns` | integer | The total number of columns transferred. | | `total_time` | bigint | The total execution time in milliseconds. | ## Output[​](#output "Direct link to Output") You can view the full FastBCP output using the `output` column returned by the function. ## Resources[​](#resources "Direct link to Resources") * [pg\_fastbcp GitHub Repository](https://github.com/arpe-io/pg_fastbcp) * [FastBCP Documentation](https://fastbcp-docs.arpe.io/latest/integration/postgresql-integration) * [Get a Trial License](https://arpe.io/get-trial?product=FastBCP) * [Report Issues](https://github.com/arpe-io/pg_fastbcp/issues) --- # Release Notes 0.32 ## New Features[​](#new-features "Direct link to New Features") ### OpenTelemetry Support[​](#opentelemetry-support "Direct link to OpenTelemetry Support") FastBCP now supports [OpenTelemetry](https://opentelemetry.io/) for distributed tracing and log correlation. **New parameter:** * `--traceparent`: Accept a [W3C Trace Context](https://www.w3.org/TR/trace-context/) traceparent identifier from an external caller, enabling end-to-end trace correlation across distributed systems. **OpenTelemetry log export:** * Logs can be exported to any OpenTelemetry-compatible collector (e.g., Jaeger, Zipkin, Grafana Tempo) via the Serilog OpenTelemetry sink. * Configuration through environment variables or the `FastBCP_Settings.json` file. See the [OpenTelemetry logging documentation](/0.32/documentation/logging/OpenTelemetry.md) for setup details and examples. ### Gzip Compression[​](#gzip-compression "Direct link to Gzip Compression") **Streamed gzip compression** is now possible by adding `.gz` to file extension. For csv, tsv and json only. * use `--fileoutput file.csv.gz` ### BREAKING CHANGE[​](#breaking-change "Direct link to BREAKING CHANGE") * `--merge` default is Switched from `true` to `false` ### Others[​](#others "Direct link to Others") * Better datatypes coverage for csv and json --- # Sitemap ## [Installation](/0.32/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](/0.32/.md) * CLI Reference * [Authentication](/0.32/documentation/cli/authentication.md) * [Connection Parameters](/0.32/documentation/cli/connection_parameters.md) * [Source Info](/0.32/documentation/cli/source_info.md) * [Output Info](/0.32/documentation/cli/output_info.md) * [CSV Formatting](/0.32/documentation/cli/csv_formatting.md) * [Parquet Formatting](/0.32/documentation/cli/parquet_formatting.md) * [Cloud Options](/0.32/documentation/cli/cloud_options.md) * [Parallel Parameters](/0.32/documentation/cli/parallel_parameters.md) * [Advanced Parameters](/0.32/documentation/cli/advanced_parameters.md) * [License](/0.32/documentation/cli/license.md) * Cloud Connectivity * [Overview](/0.32/documentation/cloud-connectivity/overview.md) * [AWS S3](/0.32/documentation/cloud-connectivity/aws-s3.md) * [Azure](/0.32/documentation/cloud-connectivity/azure.md) * [Google Cloud Storage](/0.32/documentation/cloud-connectivity/google-cloud.md) * [OneLake](/0.32/documentation/cloud-connectivity/onelake.md) * Logging * [Overview](/0.32/documentation/logging/Overview.md) * [Logs Level](/0.32/documentation/logging/logs-level.md) * [Log Database](/0.32/documentation/logging/log-database.md) * [Log Files Names Mapping using variables](/0.32/documentation/logging/log-files-names-mapping-using-variables.md) * [OpenTelemetry](/0.32/documentation/logging/OpenTelemetry.md) * [Examples](/0.32/documentation/logging/examples.md) * Examples * [SQL Server Examples](/0.32/documentation/examples/sql-server.md) * [PostgreSQL Examples](/0.32/documentation/examples/postgresql.md) * [MySQL Examples](/0.32/documentation/examples/mysql.md) * [Oracle Examples](/0.32/documentation/examples/oracle.md) * [Other Databases](/0.32/documentation/examples/other-databases.md) * [Output Formats](/0.32/documentation/examples/output-formats.md) * [Cloud Storage](/0.32/documentation/examples/cloud-storage.md) * [Advanced Scenarios](/0.32/documentation/examples/advanced-scenarios.md) * Compatibility * [Sources & Platforms](/0.32/documentation/compatibility/sources_platforms.md) * [Operating Systems](/0.32/documentation/compatibility/operating_systems.md) ## Datatypes Conversion[​](#datatypes-conversion "Direct link to Datatypes Conversion") * [Overview](/0.32/datatypes-conversion/overview.md) * SQL Server * [mssql](/0.32/datatypes-conversion/mssql/parquet.md) * MySQL * [mysql](/0.32/datatypes-conversion/mysql/parquet.md) * Oracle * [oraodp](/0.32/datatypes-conversion/oracle/parquet.md) * PostgreSQL * [pgsql](/0.32/datatypes-conversion/postgresql/parquet.md) * [pgcopy](/0.32/datatypes-conversion/postgresql-copy/parquet.md) * SAP HANA * [hana](/0.32/datatypes-conversion/saphana/parquet.md) * Teradata * [teradata](/0.32/datatypes-conversion/teradata/parquet.md) ## Integration[​](#integration "Direct link to Integration") * [Docker](/0.32/integration/docker-integration.md) * [Kestra](/0.32/integration/kestra-integration.md) * [Airflow](/0.32/integration/airflow-integration.md) * [PostgreSQL](/0.32/integration/postgresql-integration.md) ## Release Notes[​](#release-notes "Direct link to Release Notes") * [Release Notes 0.32](/0.32/release-notes/release-notes-0.32.md) ## [Sitemap](/0.32/sitemap.md)[​](#sitemap-1 "Direct link to sitemap-1") --- # FastBCP Command Wizard Expand All\[ ] ### PlatformWindows Windows ![Linux](/img/tux.svg)Linux ### Connection ParametersClickHouse Connection Type? : ClickHouse MS SQL Server MySQL Netezza ODBC OLEDB Oracle (ODP) PostgreSQL (pgcopy) PostgreSQL (pgsql) SAP HANA Teradata | Provider? : | SQLOLEDB | | ------------------------ | ----------------------------- | | Server? : | clickhouse-server:8123 | | Source Connect String? : | Server=myserver;Database=mydb | | DSN? : | MyDSN | | Trusted? : | \[ ] | | User? : | username | | Password? : | password | | Database? : | mydb | | Application Intent? : | ReadOnlyReadWrite | ### Source Query / Table ### Output Options ### Format Options ### Parquet Options ### Cloud Options ### Parallel Parameters ### Advanced Parameters ### License ### Generated Command Multi-line\[x] generate config sharecopy ``` ``` --- # Getting Started with FastBCP If you haven't installed FastBCP yet, please check the [Installation](/1.0/installation.md) section first. You can also build your first FastBCP command using our interactive [Command Builder Wizard](/latest/wizard.md). [FastBCP Tutorial](https://www.youtube.com/embed/7YaXaue7CdA) --- # SQL Server (ADBC) → Parquet Datatypes conversion mapping when exporting from **SQL Server** using the ADBC connector (`--connectiontype adbc_mssql`) to **Parquet** format. | | | | --------------- | ------------------------ | | **Source** | SQL Server (adbc\_mssql) | | **Format** | Parquet | | **FastBCP** | 1.0.3.0 | | **Test Status** | PARTIAL (30/31 Nullable) | Failed Types The following datatype is **not supported** with the ADBC connector: * `SQL_VARIANT` — export fails ## Parquet Schema: testdatatypes\_nullable[​](#parquet-schema-testdatatypes_nullable "Direct link to Parquet Schema: testdatatypes_nullable") | name | physical\_type | converted\_type | logical\_type | | --------------------- | ----------------------- | ----------------- | --------------------------------------------- | | col\_bigint | INT64 | — | — | | col\_int | INT32 | — | — | | col\_smallint | INT32 | INT\_16 | IntType(bitWidth=16, isSigned=1) | | col\_tinyint | INT32 | UINT\_8 | IntType(bitWidth=8, isSigned=0) | | col\_bit | BOOLEAN | — | — | | col\_decimal | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=2, precision=18) | | col\_numeric | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=2, precision=18) | | col\_money | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=4, precision=19) | | col\_smallmoney | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=4, precision=10) | | col\_float | DOUBLE | — | — | | col\_real | FLOAT | — | — | | col\_date | INT32 | DATE | DateType() | | col\_time | INT64 | — | TimeType(isAdjustedToUTC=0, unit=NANOS) | | col\_datetime | INT64 | TIMESTAMP\_MILLIS | TimestampType(isAdjustedToUTC=0, unit=MILLIS) | | col\_datetime2 | INT64 | — | TimestampType(isAdjustedToUTC=0, unit=NANOS) | | col\_datetimeoffset | INT64 | — | TimestampType(isAdjustedToUTC=1, unit=NANOS) | | col\_smalldatetime | INT64 | TIMESTAMP\_MILLIS | TimestampType(isAdjustedToUTC=0, unit=MILLIS) | | col\_char | BYTE\_ARRAY | UTF8 | StringType() | | col\_varchar | BYTE\_ARRAY | UTF8 | StringType() | | col\_nchar | BYTE\_ARRAY | UTF8 | StringType() | | col\_nvarchar | BYTE\_ARRAY | UTF8 | StringType() | | col\_text | BYTE\_ARRAY | UTF8 | StringType() | | col\_ntext | BYTE\_ARRAY | UTF8 | StringType() | | col\_binary | BYTE\_ARRAY | — | — | | col\_varbinary | BYTE\_ARRAY | — | — | | col\_image | BYTE\_ARRAY | — | — | | col\_uniqueidentifier | BYTE\_ARRAY | UTF8 | StringType() | | col\_xml | BYTE\_ARRAY | UTF8 | StringType() | | col\_geography | BYTE\_ARRAY | — | — | | col\_geometry | BYTE\_ARRAY | — | — | --- # SQL Server → Parquet Datatypes conversion mapping when exporting from **SQL Server** (`--connectiontype mssql`) to **Parquet** format. | | | | --------------- | ------------------ | | **Source** | SQL Server (mssql) | | **Format** | Parquet | | **FastBCP** | 1.0.3.0 | | **Test Status** | PASS (Nullable) | ## Parquet Schema: testdatatypes\_nullable[​](#parquet-schema-testdatatypes_nullable "Direct link to Parquet Schema: testdatatypes_nullable") | name | physical\_type | converted\_type | logical\_type | | --------------------- | ----------------------- | ----------------- | ---------------------------------------- | | col\_bigint | INT64 | INT\_64 | IntType(bitWidth=64, isSigned=1) | | col\_int | INT32 | INT\_32 | IntType(bitWidth=32, isSigned=1) | | col\_smallint | INT32 | INT\_16 | IntType(bitWidth=16, isSigned=1) | | col\_tinyint | INT32 | UINT\_8 | IntType(bitWidth=8, isSigned=0) | | col\_bit | BOOLEAN | — | — | | col\_decimal | INT64 | DECIMAL | DecimalType(scale=2, precision=18) | | col\_numeric | INT64 | DECIMAL | DecimalType(scale=2, precision=18) | | col\_money | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=4, precision=19) | | col\_smallmoney | INT64 | DECIMAL | DecimalType(scale=4, precision=10) | | col\_float | DOUBLE | — | — | | col\_real | FLOAT | — | — | | col\_date | INT32 | DATE | — | | col\_time | INT64 | TIME\_MICROS | TimeType(isAdjustedToUTC=0, unit=MICROS) | | col\_datetime | INT64 | TIMESTAMP\_MILLIS | — | | col\_datetime2 | INT64 | TIMESTAMP\_MILLIS | — | | col\_datetimeoffset | BYTE\_ARRAY | UTF8 | StringType() | | col\_smalldatetime | INT64 | TIMESTAMP\_MILLIS | — | | col\_char | BYTE\_ARRAY | UTF8 | StringType() | | col\_varchar | BYTE\_ARRAY | UTF8 | StringType() | | col\_nchar | BYTE\_ARRAY | UTF8 | StringType() | | col\_nvarchar | BYTE\_ARRAY | UTF8 | StringType() | | col\_text | BYTE\_ARRAY | UTF8 | StringType() | | col\_ntext | BYTE\_ARRAY | UTF8 | StringType() | | col\_binary | BYTE\_ARRAY | — | — | | col\_varbinary | BYTE\_ARRAY | — | — | | col\_image | BYTE\_ARRAY | — | — | | col\_uniqueidentifier | BYTE\_ARRAY | UTF8 | StringType() | | col\_xml | BYTE\_ARRAY | UTF8 | StringType() | | col\_sql\_variant | BYTE\_ARRAY | UTF8 | StringType() | | col\_geography | BYTE\_ARRAY | UTF8 | StringType() | | col\_geometry | BYTE\_ARRAY | UTF8 | StringType() | --- # MySQL → Parquet Datatypes conversion mapping when exporting from **MySQL** (`--connectiontype mysql`) to **Parquet** format. | | | | --------------- | --------------- | | **Source** | MySQL (mysql) | | **Format** | Parquet | | **FastBCP** | 1.0.3.0 | | **Test Status** | PASS (Nullable) | ## Parquet Schema: testdatatypes\_nullable[​](#parquet-schema-testdatatypes_nullable "Direct link to Parquet Schema: testdatatypes_nullable") | name | physical\_type | converted\_type | logical\_type | | --------------- | -------------- | ----------------- | ---------------------------------- | | col\_bigint | INT64 | INT\_64 | IntType(bitWidth=64, isSigned=1) | | col\_int | INT32 | INT\_32 | IntType(bitWidth=32, isSigned=1) | | col\_mediumint | INT32 | INT\_32 | IntType(bitWidth=32, isSigned=1) | | col\_smallint | INT32 | INT\_16 | IntType(bitWidth=16, isSigned=1) | | col\_tinyint | BYTE\_ARRAY | UTF8 | StringType() | | col\_bit | BYTE\_ARRAY | UTF8 | StringType() | | col\_decimal | INT64 | DECIMAL | DecimalType(scale=2, precision=18) | | col\_float | FLOAT | — | — | | col\_double | DOUBLE | — | — | | col\_date | INT64 | TIMESTAMP\_MILLIS | — | | col\_time | BYTE\_ARRAY | UTF8 | StringType() | | col\_datetime | INT64 | TIMESTAMP\_MILLIS | — | | col\_timestamp | INT64 | TIMESTAMP\_MILLIS | — | | col\_year | INT32 | INT\_32 | IntType(bitWidth=32, isSigned=1) | | col\_char | BYTE\_ARRAY | UTF8 | StringType() | | col\_varchar | BYTE\_ARRAY | UTF8 | StringType() | | col\_tinytext | BYTE\_ARRAY | UTF8 | StringType() | | col\_text | BYTE\_ARRAY | UTF8 | StringType() | | col\_mediumtext | BYTE\_ARRAY | UTF8 | StringType() | | col\_longtext | BYTE\_ARRAY | UTF8 | StringType() | | col\_binary | BYTE\_ARRAY | — | — | | col\_varbinary | BYTE\_ARRAY | — | — | | col\_tinyblob | BYTE\_ARRAY | — | — | | col\_blob | BYTE\_ARRAY | — | — | | col\_mediumblob | BYTE\_ARRAY | — | — | | col\_longblob | BYTE\_ARRAY | — | — | | col\_enum | BYTE\_ARRAY | UTF8 | StringType() | | col\_set | BYTE\_ARRAY | UTF8 | StringType() | | col\_json | BYTE\_ARRAY | UTF8 | StringType() | | col\_geometry | BYTE\_ARRAY | — | — | | col\_point | BYTE\_ARRAY | — | — | | col\_linestring | BYTE\_ARRAY | — | — | | col\_polygon | BYTE\_ARRAY | — | — | --- # Oracle → Parquet Datatypes conversion mapping when exporting from **Oracle** (`--connectiontype oracle`) to **Parquet** format. | | | | --------------- | --------------- | | **Source** | Oracle (oraodp) | | **Format** | Parquet | | **FastBCP** | 1.0.3.0 | | **Test Status** | PASS (Nullable) | ## Parquet Schema: testdatatypes\_nullable[​](#parquet-schema-testdatatypes_nullable "Direct link to Parquet Schema: testdatatypes_nullable") | name | physical\_type | converted\_type | logical\_type | | ------------------- | ----------------------- | ----------------- | ----------------------------------- | | COL\_NUMBER | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=18, precision=38) | | COL\_NUMBER10 | INT64 | INT\_64 | IntType(bitWidth=64, isSigned=1) | | COL\_NUMBER18\_2 | INT64 | DECIMAL | DecimalType(scale=2, precision=18) | | COL\_FLOAT | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=18, precision=38) | | COL\_BINARY\_FLOAT | FLOAT | — | — | | COL\_BINARY\_DOUBLE | DOUBLE | — | — | | COL\_CHAR | BYTE\_ARRAY | UTF8 | StringType() | | COL\_VARCHAR2 | BYTE\_ARRAY | UTF8 | StringType() | | COL\_NCHAR | BYTE\_ARRAY | UTF8 | StringType() | | COL\_NVARCHAR2 | BYTE\_ARRAY | UTF8 | StringType() | | COL\_CLOB | BYTE\_ARRAY | UTF8 | StringType() | | COL\_NCLOB | BYTE\_ARRAY | UTF8 | StringType() | | COL\_BLOB | BYTE\_ARRAY | — | — | | COL\_RAW | BYTE\_ARRAY | — | — | | COL\_LONG\_RAW | BYTE\_ARRAY | — | — | | COL\_DATE | INT64 | TIMESTAMP\_MILLIS | — | | COL\_TIMESTAMP | INT64 | TIMESTAMP\_MILLIS | — | | COL\_TIMESTAMP\_TZ | BYTE\_ARRAY | UTF8 | StringType() | | COL\_TIMESTAMP\_LTZ | INT64 | TIMESTAMP\_MILLIS | — | | COL\_INTERVAL\_YM | INT64 | INT\_64 | IntType(bitWidth=64, isSigned=1) | | COL\_INTERVAL\_DS | BYTE\_ARRAY | UTF8 | StringType() | | COL\_ROWID | BYTE\_ARRAY | UTF8 | StringType() | | COL\_UROWID | BYTE\_ARRAY | UTF8 | StringType() | | COL\_XMLTYPE | BYTE\_ARRAY | UTF8 | StringType() | | COL\_BFILE | BYTE\_ARRAY | — | — | --- # Datatypes Conversion When FastBCP exports a table, every native source column type is mapped to a type in the target output format. This section documents the **exact mappings** FastBCP produces. These pages are not a specification: each one is the Parquet schema read back from a real export of a test table covering all of the source's native datatypes. ## Supported Sources[​](#supported-sources "Direct link to Supported Sources") Sources are grouped by database system. A system can be read through several connection types (`--connectiontype`), and each one has its own page because the mappings it produces can differ — `pgcopy` produces exactly the same mappings as `pgsql`, while `adbc_mssql` differs from `mssql` on several types. | Database | Connection Types | | ---------- | ----------------------------------------------------------------------------------------------------------------------------- | | SQL Server | [`mssql`](/1.0/datatypes-conversion/mssql/parquet.md) · [`adbc_mssql`](/1.0/datatypes-conversion/mssql/adbc-parquet.md) | | MySQL | [`mysql`](/1.0/datatypes-conversion/mysql/parquet.md) | | Oracle | [`oraodp`](/1.0/datatypes-conversion/oracle/parquet.md) | | PostgreSQL | [`pgsql`](/1.0/datatypes-conversion/postgresql/parquet.md) · [`pgcopy`](/1.0/datatypes-conversion/postgresql-copy/parquet.md) | | SAP HANA | [`hana`](/1.0/datatypes-conversion/saphana/parquet.md) | | Teradata | [`teradata`](/1.0/datatypes-conversion/teradata/parquet.md) | Parquet is the only output format documented here. ## How to Read a Page[​](#how-to-read-a-page "Direct link to How to Read a Page") Each page opens with a summary of the export it documents — source, output format, the FastBCP build used and the test status — followed by the Parquet schema produced from the **`testdatatypes_nullable`** table, in which every column accepts `NULL`. | Column | Description | | ------------------- | ------------------------------------------------------------------------------------------------------------------------- | | **name** | The column name in the source table | | **physical\_type** | The Parquet physical storage type: `BOOLEAN`, `INT32`, `INT64`, `FLOAT`, `DOUBLE`, `BYTE_ARRAY` or `FIXED_LEN_BYTE_ARRAY` | | **converted\_type** | The legacy Parquet annotation on top of it (`UTF8`, `DECIMAL`, `DATE`, `TIMESTAMP_MILLIS`, …) | | **logical\_type** | The modern Parquet annotation (`StringType()`, `DecimalType(scale=2, precision=18)`, `IntType(…)`, …) | A `—` means the column carries no annotation of that kind, so the physical type alone describes it. NOT NULL columns Declaring the source columns `NOT NULL` does not change the mapping. The only difference is the Parquet repetition level (REQUIRED instead of OPTIONAL), which these tables do not show. --- # PostgreSQL COPY → Parquet Datatypes conversion mapping when exporting from **PostgreSQL** using the COPY protocol (`--connectiontype pgcopy`) to **Parquet** format. | | | | --------------- | ------------------------ | | **Source** | PostgreSQL COPY (pgcopy) | | **Format** | Parquet | | **FastBCP** | 1.0.3.0 | | **Test Status** | PASS (Nullable) | info The COPY protocol variant produces the same type mappings as the standard PostgreSQL driver. See also [PostgreSQL (pgsql)](/1.0/datatypes-conversion/postgresql/parquet.md). ## Parquet Schema: testdatatypes\_nullable[​](#parquet-schema-testdatatypes_nullable "Direct link to Parquet Schema: testdatatypes_nullable") | name | physical\_type | converted\_type | logical\_type | | ---------------------- | ----------------------- | ----------------- | ---------------------------------------- | | col\_bigint | INT64 | INT\_64 | IntType(bitWidth=64, isSigned=1) | | col\_integer | INT32 | INT\_32 | IntType(bitWidth=32, isSigned=1) | | col\_smallint | INT32 | INT\_16 | IntType(bitWidth=16, isSigned=1) | | col\_boolean | BOOLEAN | — | — | | col\_numeric | INT64 | DECIMAL | DecimalType(scale=2, precision=18) | | col\_real | FLOAT | — | — | | col\_double\_precision | DOUBLE | — | — | | col\_money | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=4, precision=19) | | col\_date | INT32 | DATE | — | | col\_time | INT32 | TIME\_MILLIS | TimeType(isAdjustedToUTC=0, unit=MILLIS) | | col\_timestamp | INT64 | TIMESTAMP\_MILLIS | — | | col\_timestamptz | BYTE\_ARRAY | UTF8 | StringType() | | col\_interval | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | col\_char | BYTE\_ARRAY | UTF8 | StringType() | | col\_varchar | BYTE\_ARRAY | UTF8 | StringType() | | col\_text | BYTE\_ARRAY | UTF8 | StringType() | | col\_bytea | BYTE\_ARRAY | — | — | | col\_uuid | BYTE\_ARRAY | UTF8 | StringType() | | col\_json | BYTE\_ARRAY | UTF8 | StringType() | | col\_jsonb | BYTE\_ARRAY | — | — | | col\_xml | BYTE\_ARRAY | UTF8 | StringType() | | col\_inet | BYTE\_ARRAY | UTF8 | StringType() | | col\_cidr | BYTE\_ARRAY | UTF8 | StringType() | | col\_macaddr | BYTE\_ARRAY | UTF8 | StringType() | | col\_point | BYTE\_ARRAY | UTF8 | StringType() | | col\_line | BYTE\_ARRAY | UTF8 | StringType() | | col\_lseg | BYTE\_ARRAY | UTF8 | StringType() | | col\_box | BYTE\_ARRAY | UTF8 | StringType() | | col\_path | BYTE\_ARRAY | UTF8 | StringType() | | col\_polygon | BYTE\_ARRAY | UTF8 | StringType() | | col\_circle | BYTE\_ARRAY | UTF8 | StringType() | | col\_int4range | BYTE\_ARRAY | UTF8 | StringType() | | col\_int8range | BYTE\_ARRAY | UTF8 | StringType() | | col\_numrange | BYTE\_ARRAY | UTF8 | StringType() | | col\_tsrange | BYTE\_ARRAY | UTF8 | StringType() | | col\_tstzrange | BYTE\_ARRAY | UTF8 | StringType() | | col\_daterange | BYTE\_ARRAY | UTF8 | StringType() | | col\_bit | BYTE\_ARRAY | UTF8 | StringType() | | col\_bit\_varying | BYTE\_ARRAY | UTF8 | StringType() | | col\_oid | BYTE\_ARRAY | UTF8 | StringType() | | col\_int\_array | BYTE\_ARRAY | UTF8 | StringType() | --- # PostgreSQL → Parquet Datatypes conversion mapping when exporting from **PostgreSQL** (`--connectiontype pgsql`) to **Parquet** format. | | | | --------------- | ------------------ | | **Source** | PostgreSQL (pgsql) | | **Format** | Parquet | | **FastBCP** | 1.0.3.0 | | **Test Status** | PASS (Nullable) | info See also [PostgreSQL COPY](/1.0/datatypes-conversion/postgresql-copy/parquet.md) for the COPY protocol variant (`--connectiontype pgcopy`), which produces identical type mappings. ## Parquet Schema: testdatatypes\_nullable[​](#parquet-schema-testdatatypes_nullable "Direct link to Parquet Schema: testdatatypes_nullable") | name | physical\_type | converted\_type | logical\_type | | ---------------------- | ----------------------- | ----------------- | ---------------------------------------- | | col\_bigint | INT64 | INT\_64 | IntType(bitWidth=64, isSigned=1) | | col\_integer | INT32 | INT\_32 | IntType(bitWidth=32, isSigned=1) | | col\_smallint | INT32 | INT\_16 | IntType(bitWidth=16, isSigned=1) | | col\_boolean | BOOLEAN | — | — | | col\_numeric | INT64 | DECIMAL | DecimalType(scale=2, precision=18) | | col\_real | FLOAT | — | — | | col\_double\_precision | DOUBLE | — | — | | col\_money | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=4, precision=19) | | col\_date | INT32 | DATE | — | | col\_time | INT32 | TIME\_MILLIS | TimeType(isAdjustedToUTC=0, unit=MILLIS) | | col\_timestamp | INT64 | TIMESTAMP\_MILLIS | — | | col\_timestamptz | BYTE\_ARRAY | UTF8 | StringType() | | col\_interval | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | col\_char | BYTE\_ARRAY | UTF8 | StringType() | | col\_varchar | BYTE\_ARRAY | UTF8 | StringType() | | col\_text | BYTE\_ARRAY | UTF8 | StringType() | | col\_bytea | BYTE\_ARRAY | — | — | | col\_uuid | BYTE\_ARRAY | UTF8 | StringType() | | col\_json | BYTE\_ARRAY | UTF8 | StringType() | | col\_jsonb | BYTE\_ARRAY | — | — | | col\_xml | BYTE\_ARRAY | UTF8 | StringType() | | col\_inet | BYTE\_ARRAY | UTF8 | StringType() | | col\_cidr | BYTE\_ARRAY | UTF8 | StringType() | | col\_macaddr | BYTE\_ARRAY | UTF8 | StringType() | | col\_point | BYTE\_ARRAY | UTF8 | StringType() | | col\_line | BYTE\_ARRAY | UTF8 | StringType() | | col\_lseg | BYTE\_ARRAY | UTF8 | StringType() | | col\_box | BYTE\_ARRAY | UTF8 | StringType() | | col\_path | BYTE\_ARRAY | UTF8 | StringType() | | col\_polygon | BYTE\_ARRAY | UTF8 | StringType() | | col\_circle | BYTE\_ARRAY | UTF8 | StringType() | | col\_int4range | BYTE\_ARRAY | UTF8 | StringType() | | col\_int8range | BYTE\_ARRAY | UTF8 | StringType() | | col\_numrange | BYTE\_ARRAY | UTF8 | StringType() | | col\_tsrange | BYTE\_ARRAY | UTF8 | StringType() | | col\_tstzrange | BYTE\_ARRAY | UTF8 | StringType() | | col\_daterange | BYTE\_ARRAY | UTF8 | StringType() | | col\_bit | BYTE\_ARRAY | UTF8 | StringType() | | col\_bit\_varying | BYTE\_ARRAY | UTF8 | StringType() | | col\_oid | BYTE\_ARRAY | UTF8 | StringType() | | col\_int\_array | BYTE\_ARRAY | UTF8 | StringType() | --- # SAP HANA → Parquet Datatypes conversion mapping when exporting from **SAP HANA** (`--connectiontype hana`) to **Parquet** format. | | | | --------------- | --------------- | | **Source** | SAP HANA (hana) | | **Format** | Parquet | | **FastBCP** | 1.0.3.0 | | **Test Status** | PASS (Nullable) | ## Parquet Schema: testdatatypes\_nullable[​](#parquet-schema-testdatatypes_nullable "Direct link to Parquet Schema: testdatatypes_nullable") | name | physical\_type | converted\_type | logical\_type | | ----------------- | -------------- | ----------------- | ---------------------------------- | | COL\_TINYINT | INT32 | UINT\_8 | IntType(bitWidth=8, isSigned=0) | | COL\_SMALLINT | INT32 | INT\_16 | IntType(bitWidth=16, isSigned=1) | | COL\_INTEGER | INT32 | INT\_32 | IntType(bitWidth=32, isSigned=1) | | COL\_BIGINT | INT64 | INT\_64 | IntType(bitWidth=64, isSigned=1) | | COL\_DECIMAL | INT64 | DECIMAL | DecimalType(scale=2, precision=18) | | COL\_SMALLDECIMAL | INT64 | DECIMAL | DecimalType(scale=0, precision=16) | | COL\_REAL | FLOAT | — | — | | COL\_DOUBLE | DOUBLE | — | — | | COL\_FLOAT | DOUBLE | — | — | | COL\_BOOLEAN | BOOLEAN | — | — | | COL\_DATE | INT64 | TIMESTAMP\_MILLIS | — | | COL\_TIME | BYTE\_ARRAY | UTF8 | StringType() | | COL\_TIMESTAMP | INT64 | TIMESTAMP\_MILLIS | — | | COL\_SECONDDATE | INT64 | TIMESTAMP\_MILLIS | — | | COL\_CHAR | BYTE\_ARRAY | UTF8 | StringType() | | COL\_VARCHAR | BYTE\_ARRAY | UTF8 | StringType() | | COL\_NCHAR | BYTE\_ARRAY | UTF8 | StringType() | | COL\_NVARCHAR | BYTE\_ARRAY | UTF8 | StringType() | | COL\_ALPHANUM | BYTE\_ARRAY | UTF8 | StringType() | | COL\_CLOB | BYTE\_ARRAY | UTF8 | StringType() | | COL\_NCLOB | BYTE\_ARRAY | UTF8 | StringType() | | COL\_BLOB | BYTE\_ARRAY | — | — | | COL\_BINARY | BYTE\_ARRAY | — | — | | COL\_VARBINARY | BYTE\_ARRAY | — | — | | COL\_ST\_GEOMETRY | BYTE\_ARRAY | — | — | | COL\_ST\_POINT | BYTE\_ARRAY | — | — | | COL\_SHORTTEXT | BYTE\_ARRAY | UTF8 | StringType() | --- # Teradata → Parquet Datatypes conversion mapping when exporting from **Teradata** (`--connectiontype teradata`) to **Parquet** format. | | | | --------------- | ------------------- | | **Source** | Teradata (teradata) | | **Format** | Parquet | | **FastBCP** | 1.0.3.0 | | **Test Status** | PASS (Nullable) | ## Parquet Schema: testdatatypes\_nullable[​](#parquet-schema-testdatatypes_nullable "Direct link to Parquet Schema: testdatatypes_nullable") | name | physical\_type | converted\_type | logical\_type | | ------------------------ | ----------------------- | --------------- | ---------------------------------------- | | col\_byteint | INT32 | INT\_16 | IntType(bitWidth=16, isSigned=1) | | col\_smallint | INT32 | INT\_16 | IntType(bitWidth=16, isSigned=1) | | col\_integer | INT32 | INT\_32 | IntType(bitWidth=32, isSigned=1) | | col\_bigint | INT64 | INT\_64 | IntType(bitWidth=64, isSigned=1) | | col\_decimal18\_2 | INT64 | DECIMAL | DecimalType(scale=2, precision=18) | | col\_float | DOUBLE | — | — | | col\_number | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=18, precision=38) | | col\_number18\_2 | INT64 | DECIMAL | DecimalType(scale=2, precision=18) | | col\_date | INT32 | DATE | — | | col\_time | INT64 | TIME\_MICROS | TimeType(isAdjustedToUTC=0, unit=MICROS) | | col\_timestamp | BYTE\_ARRAY | UTF8 | StringType() | | col\_timestamp\_tz | BYTE\_ARRAY | UTF8 | StringType() | | tdintervalyear | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | tdintervalyeartomonth | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | tdintervalmonth | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | tdintervalday | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | tdintervaldaytohour | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | tdintervaldaytominute | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | tdintervaldaytosecond | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | tdintervalhour | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | tdintervalhourtominute | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | tdintervalhourtosecond | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | tdintervalminute | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | tdintervalminutetosecond | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | tdintervalsecond | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | col\_real | DOUBLE | — | — | | col\_double\_precision | DOUBLE | — | — | | col\_char | BYTE\_ARRAY | UTF8 | StringType() | | col\_varchar | BYTE\_ARRAY | UTF8 | StringType() | | col\_clob | BYTE\_ARRAY | UTF8 | StringType() | | col\_byte | BYTE\_ARRAY | — | — | | col\_varbyte | BYTE\_ARRAY | — | — | | col\_blob | BYTE\_ARRAY | — | — | | col\_period\_date | BYTE\_ARRAY | UTF8 | StringType() | | col\_period\_timestamp | BYTE\_ARRAY | UTF8 | StringType() | | col\_json | BYTE\_ARRAY | UTF8 | StringType() | | col\_xml | BYTE\_ARRAY | UTF8 | StringType() | | col\_st\_geometry | BYTE\_ARRAY | UTF8 | StringType() | --- # Advanced Parameters This section covers advanced configuration options for FastBCP. ## Run ID[​](#run-id "Direct link to Run ID") The Run ID parameter `--runid` is a unique identifier for the current export operation. It can be used for tracking, logging, and monitoring purposes. Information If not specified, FastBCP will generate a unique Run ID automatically. Tips If possible, inject the RunId provided by the caller (e.g., SSIS, Airflow, or any scheduler that supports a run identifier). This will greatly facilitate log correlation and troubleshooting. ``` ./FastBCP \ ... --runid "export-2024-01-09-001" \ ... ``` **Syntax:** * Long form only: `--runid ""` ## Log Level[​](#log-level "Direct link to Log Level") The Log Level parameter `--loglevel` controls the verbosity of logging output during export operations. **Available values:** * `Information` (default): Standard logging with key operation details * `Debug`: Verbose logging with detailed diagnostic information ``` ./FastBCP \ ... --loglevel "Debug" \ ... ``` **Syntax:** * Long form only: `--loglevel ""` note If a settings file is specified with `--settingsfile`, the log level defined in the settings file takes precedence unless overridden by the command-line parameter. Information See [Logging Overview](/1.0/documentation/logging/Overview.md) for detailed information about logging configuration and output. ## Settings File[​](#settings-file "Direct link to Settings File") The Settings File parameter `--settingsfile` allows you to store all FastBCP parameters in a configuration file, making it easier to manage complex exports and reuse configurations. ``` ./FastBCP \ ... --settingsfile "/path/to/config/export-config.json" \ ... ``` **Syntax:** * Long form only: `--settingsfile ""` Information See [Logging Overview](/1.0/documentation/logging/Overview.md) for examples of settings file configuration. ## Config File[​](#config-file "Direct link to Config File") The Config File parameter `--config` allows you to define all FastBCP parameters in a YAML configuration file. This provides a more structured and readable way to manage export configurations compared to JSON settings files. * Windows * Linux ``` .\FastBCP.exe --config samples\sample_mssql_to_csv.yaml ``` ``` ./FastBCP --config samples/sample_mssql_to_csv.yaml ``` **Syntax:** * Long form only: `--config ""` ### YAML Configuration Example[​](#yaml-configuration-example "Direct link to YAML Configuration Example") Here's a complete example of a YAML configuration file: ``` # FastBCP – MSSQL to CSV using RangeId parallel method # # Usage: # .\FastBCP.exe --config samples\sample_mssql_to_csv.yaml connection: type: mssql server: localhost database: tpch10_collation_bin2 trusted: true source: schema: dbo table: orders output: file: "mssql_orders_{startdate}.csv" directory: 'D:\temp\{database}\{schema}\{table}\full\' delimiter: "|" decimal_separator: "." date_format: "yyyy-MM-dd HH:mm:ss" encoding: UTF-8 performance: method: RangeId degree: -2 distribute_key_column: o_orderkey merge: false logging: run_id: mssql_to_csv_parallel-2_rangeid ``` Benefits of YAML Configuration * **Structured and readable**: YAML format is more human-friendly than JSON * **Comments support**: Add documentation directly in your configuration files * **Reusable configurations**: Version control your export settings * **Simplified command-line**: Reduce complex exports to a single `--config` parameter ## Traceparent[​](#traceparent "Direct link to Traceparent") The `--traceparent` parameter accepts a [W3C Trace Context](https://www.w3.org/TR/trace-context/) traceparent identifier from an external caller. This enables distributed trace correlation between FastBCP and upstream systems such as orchestrators, APIs, or CI/CD pipelines. Information See [OpenTelemetry](/1.0/documentation/logging/OpenTelemetry.md) for detailed information about configuring OpenTelemetry tracing and log export. ``` ./FastBCP \ ... --traceparent "00-abcdef1234567890abcdef1234567890-1234567890abcdef-01" \ ... ``` **Syntax:** * Long form only: `--traceparent ""` ## No Banner[​](#no-banner "Direct link to No Banner") Disable the FastBCP banner display in the command line output. This is useful for scripting or when you want cleaner output in automated processes. **Example:** ``` ./FastBCP \ ... --nobanner \ ... ``` **Syntax:** * Long form: `--nobanner` Clean Output Using `--nobanner` is recommended when running FastBCP 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 ``` .\FastBCP.exe ` --connectiontype "oraodp" ` --server "localhost:1521/OraService" ` --database "tpch" ` --user "FastUser" ` --password "FastPassword" ` --sourceschema "TPCH" ` --sourcetable "ORDERS" ` --directory "D:\temp" ` --fileoutput "orders.xlsx" ` --encoding "UTF-8" ` --parallelmethod RowId ` --paralleldegree 7 ` --merge false ` --loglevel "Debug" ` --runid "oracle_to_excel_parallel_rowid" ` --settingsfile "C:\config\oracle-export.json" ` --nobanner ``` ``` ./FastBCP \ --connectiontype "oraodp" \ --server "localhost:1521/OraService" \ --database "tpch" \ --user "FastUser" \ --password "FastPassword" \ --sourceschema "TPCH" \ --sourcetable "ORDERS" \ --directory "/temp" \ --fileoutput "orders.xlsx" \ --encoding "UTF-8" \ --parallelmethod RowId \ --paralleldegree 7 \ --merge false \ --loglevel "Debug" \ --runid "oracle_to_excel_parallel_rowid" \ --settingsfile "/config/oracle-export.json" \ --nobanner ``` This example: * Connects to an Oracle database using the RowId parallel method * Exports ORDERS table to Excel format with UTF-8 encoding * Uses 7 parallel threads with separate files (merge=false) * Enables Debug logging for detailed diagnostics * Uses a custom Run ID for tracking * Loads additional configuration from a settings file * Disables the banner for cleaner output --- # Authentication FastBCP supports two types of authentication methods depending on your database platform. ## Authentication Methods[​](#authentication-methods "Direct link to Authentication Methods") ### 1. Trusted Connection[​](#1-trusted-connection "Direct link to 1. Trusted Connection") Uses the current Windows user's credentials or the operating system authentication if allowed by the RDBMS. ``` .\FastBCP.exe ` ... --trusted ` ... ``` **Syntax:** * Short form: `-A` * Long form: `--trusted` Warning This method is only available if your RDBMS supports trusted/integrated authentication (e.g., SQL Server with Windows Authentication). ### 2. SQL Login with Username and Password[​](#2-sql-login-with-username-and-password "Direct link to 2. SQL Login with Username and Password") Standard database authentication with explicit credentials. ``` ./FastBCP ` ... --user "myuser" ` --password "mypassword" ` ... ``` **Syntax:** * Username: `-U "username"` or `--user "username"` * Password: `-X "password"` or `--password "password"` ### Alternative: Connection String Parameter[​](#alternative-connection-string-parameter "Direct link to Alternative: Connection String Parameter") You can also use the `--sourceconnectstring` parameter where you pass the user and password directly in the connection string. This parameter will be covered in detail in the [Connection Parameters](/1.0/documentation/cli/connection_parameters.md#source-connection-string) section. Password Security in Logs All passwords passed either through the `--password` parameter or within the `--sourceconnectstring` parameter 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 FASTBCP\_USER and FASTBCP\_PASSWORD for exemple or store the password in an encrypted file. Up to you to decrypt the file and it’s content before using it in a shell variable that will be used with FastBCP. --- # Cloud Options FastBCP supports direct exports to cloud storage platforms: AWS S3, Azure Blob Storage, Azure Data Lake Gen2, and Google Cloud Storage. For detailed cloud authentication setup and configuration, see the [Cloud Connectivity](/1.0/documentation/cloud-connectivity/overview.md) documentation. note FastBCP will use multi-part uploads for all cloud provider Warning Since FastBCP 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**. ## Supported Cloud Platforms[​](#supported-cloud-platforms "Direct link to Supported Cloud Platforms") To export data to a cloud storage service, use the URI scheme specific to your target destination with the `--directory` value | Platform | URI Scheme | Example | | ------------------------ | ------------ | ----------------------------------------------------------- | | **AWS S3** | `s3://` | `s3://my-bucket/data/` | | **Azure Blob** | `abs://` | `abs://myaccount.blob.core.windows.net/mycontainer/mydir/` | | **Azure Data Lake Gen2** | `abfss://` | `abfss://myaccount.dfs.core.windows.net/mycontainer/mydir/` | | **Google Cloud Storage** | `gs://` | `gs://my-bucket/data/` | | **S3-Compatible** | `s3://` | `s3://mybucket/export/` (MinIO, OVH, etc.) | | **OneLake** | `onelake://` | `onelake://MyWorSpace/MyLakeHouse/MyDir/` | ## Cloud Profile[​](#cloud-profile "Direct link to Cloud Profile") You can use the `--cloudprofile` parameter to specify which cloud credentials profile to use. ``` ./FastBCP \ ... --directory "s3://my-bucket/exports" \ --fileoutput "orders.parquet" \ --cloudprofile "production" \ ... ``` **Syntax:** * Long form: `--cloudprofile ` --- # Connection Parameters FastBCP requires connection information to access your database. This page covers all connection-related parameters. ## Connection Type[​](#connection-type "Direct link to Connection Type") Specify the type of database connection driver to use. This parameter determines how FastBCP connects to your database. ``` ./FastBCP \ ... --connectiontype mssql \ ... ``` **Syntax:** * Short form: `-C "connection_type"` * Long form: `--connectiontype "connection_type"` **Available Connection Types:** | Connection Type | Description | | --------------- | ------------------------------------------------------------------------------------------- | | `adbc_mssql` | Microsoft SQL Server via ADBC (Arrow Database Connectivity) - 2x faster for Parquet exports | | `clickhouse` | ClickHouse database | | `hana` | SAP HANA database | | `mssql` | Microsoft SQL Server (default) | | `mysql` | MySQL/MariaDB database | | `nzsql` | IBM Netezza | | `odbc` | Generic ODBC connection | | `oledb` | Generic OLE DB connection | | `oraodp` | Oracle Data Provider | | `pgcopy` | PostgreSQL with COPY protocol | | `pgsql` | PostgreSQL standard connection | | `teradata` | Teradata database | ## DSN (Data Source Name)[​](#dsn-data-source-name "Direct link to DSN (Data Source Name)") If you have chosen an ODBC connection type, you must define the DSN with the `-N` or `--dsn` parameter, or alternatively define a connection string using `-g` or `--sourceconnectstring`. ``` ./FastBCP \ ... --connectiontype odbc \ --dsn "MyODBCDataSource" \ ... ``` **Syntax:** * Short form: `-N "DSN_name"` * Long form: `--dsn "DSN_name"` ## Provider[​](#provider "Direct link to Provider") If you have chosen an OLEDB connection type, you must define the OLEDB provider with the `-P` or `--provider` parameter. ``` ./FastBCP \ ... --connectiontype oledb \ --provider MSOLEDBSQL \ ... ``` ``` ./FastBCP \ ... --connectiontype oledb \ --provider NZOLEDB \ ... ``` **Syntax:** * Short form: `-P "provider_name"` * Long form: `--provider "provider_name"` ## Server[​](#server "Direct link to Server") Except if you have defined a connection string (`-g` or `--sourceconnectstring`), you must define a server (or could also be a TNS entry for Oracle). **Syntax:** * Short form: `-S "server"` * Long form: `--server "server"` ### Server Format Examples[​](#server-format-examples "Direct link to Server Format Examples") The server parameter accepts different formats depending on your database: **IP address or DNS name:** ``` ./FastBCP \ ... --server "myserver.mydomain.com" \ ... ``` **IP address or DNS name with port number:** ``` ./FastBCP \ ... --server "myserver.mydomain.com:2433" \ ... ``` or ``` ./FastBCP \ ... --server "myserver.mydomain.com,2433" \ ... ``` **IP address or DNS name with named instance:** ``` ./FastBCP \ ... --server "myserver.mydomain.com\myinstance" \ ... ``` **For Oracle - Easy Connect string:** ``` ./FastBCP \ ... --server "myserver.mydomain.com:1521/myinstance" \ ... ``` ## Trusted or User & Password[​](#trusted-or-user--password "Direct link to Trusted or User & Password") ### Trusted[​](#trusted "Direct link to Trusted") You can used a trusted (Windows or Kerberos Authentication) using the `--trusted` switch parameter. ``` ./FastBCP \ ... --server "myserver.mydomain.com\myinstance \ --trusted \ --database MySourceDB" \ ... ``` ### User and Password[​](#user-and-password "Direct link to User and Password") You can also provide a user and password the `--user` and `--password` can be used like this ``` ./FastBCP \ ... --server "myserver.mydomain.com\myinstance \ --user "FastUser" \ --password "FastPassword" \ --database MySourceDB" \ ... ``` ## 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 database. This connection string will override any other connection parameters and can be used if the other authentication mode are not enougth for your case You can use the connection string for any connection type. The connection string must be enclosed in double quotes. **Example:** ``` ./FastBCP \ ... --sourceconnectstring "Server=myserver;Database=mydb;User ID=FastUser;Password=FastPassword;Encrypt=True;TrustServerCertificate=True" ... ``` **Syntax:** * Short form: `-g "connection_string"` * Long form: `--sourceconnectstring "connection_string"` ## Database[​](#database "Direct link to Database") Optionally define a source database. **Example:** ``` ./FastBCP \ ... --database "AdventureWorks" \ ... ``` **Syntax:** * Short form: `-I "database_name"` * Long form: `--database "database_name"` ## Application Intent[​](#application-intent "Direct link to Application Intent") Specifies the application workload type when connecting to SQL Server. This parameter is only applicable for SQL Server (`mssql`) and OLEDB (`oledb`) connection types. **Syntax:** * Long form: `--applicationintent "ReadOnly|ReadWrite"` **Values:** * `ReadOnly` (default) - Declares the read-only workload type when connecting to a read-only replica in an Always On availability group * `ReadWrite` - Declares a read-write workload type (standard connection) **Example (Read-Only):** ``` ./FastBCP \ --connectiontype mssql \ --server "myserver.mydomain.com" \ --applicationintent ReadOnly \ --database "AdventureWorks" \ ... ``` **Example (Read-Write):** ``` ./FastBCP \ --connectiontype mssql \ --server "myserver.mydomain.com" \ --applicationintent ReadWrite \ --database "AdventureWorks" \ ... ``` info When using `ReadOnly`, the connection will be routed to a read-only replica if available in an Always On availability group configuration. This is useful for offloading reporting and export workloads from the primary replica. --- # CSV Formatting When exporting to CSV format (`.csv` extension), FastBCP provides extensive formatting options. ## Delimiter[​](#delimiter "Direct link to Delimiter") Use the `-d` or `--delimiter` parameter to specify the character(s) used to separate fields. ``` ./FastBCP \ ... --fileoutput "data.csv" \ --delimiter "," \ ... ``` **Syntax:** * Short form: `-d "delimiter"` * Long form: `--delimiter "delimiter"` **Default:** `,` (comma) ### Common Delimiters[​](#common-delimiters "Direct link to Common Delimiters") * Comma (CSV) * Tab (TSV) * Pipe * Semicolon ``` --delimiter "," ``` ``` --delimiter "\t" ``` ``` --delimiter "|" ``` ``` --delimiter ";" ``` ## Use Quotes[​](#use-quotes "Direct link to Use Quotes") Use the `-t` or `--quotes` switch to enclose string fields in double quotes. ``` ./FastBCP \ ... --fileoutput "products.csv" \ --quotes \ ... ``` **Syntax:** * Short form: `-t` * Long form: `--quotes` **Default:** Without quotes * Without --quotes * With --quotes ``` ProductID,ProductName,Description,Price 1,Widget A,Small widget,19.99 2,Widget B,Large widget,29.99 ``` ``` "ProductID","ProductName","Description","Price" "1","Widget A","Small widget","19.99" "2","Widget B","Large widget","29.99" ``` Information When `--quotes`, any double quotes (`"`) in the data are escaped with backslash (`\"`). ## Date Format[​](#date-format "Direct link to Date Format") Use the `-f` or `--dateformat` parameter to specify how dates and timestamps are formatted. ``` ./FastBCP \ ... --fileoutput "orders.csv" --dateformat "yyyy-MM-dd HH:mm:ss" \ ... ``` **Syntax:** * Short form: `-f "format"` * Long form: `--dateformat "format"` **Default:** Database default format ### Format Codes[​](#format-codes "Direct link to Format Codes") | Code | Description | Example | | ------ | ---------------- | ------- | | `yyyy` | 4-digit year | `2026` | | `MM` | Month (01-12) | `01` | | `dd` | Day (01-31) | `07` | | `HH` | Hour 24h (00-23) | `14` | | `mm` | Minute (00-59) | `30` | | `ss` | Second (00-59) | `22` | ## Decimal Separator[​](#decimal-separator "Direct link to Decimal Separator") Use the `-n` or `--decimalseparator` parameter to specify the decimal separator for numeric values. ``` ./FastBCP \ ... --fileoutput "products.csv" --decimalseparator "," ... ``` **Syntax:** * Short form: `-n "separator"` * Long form: `--decimalseparator "separator"` **Default:** `.` (period/dot) ## No Header[​](#no-header "Direct link to No Header") Use the `-h` or `--noheader` parameter to exclude column headers from the output. ``` ./FastBCP \ ... --fileoutput "customers.csv" \ --noheader \ ... ``` **Syntax:** * Short form: `-h` * Long form: `--noheader` - Without --noheader (default) - With --noheader ``` CustomerID,CustomerName,Email 1,John Doe,john@example.com 2,Jane Smith,jane@example.com ``` ``` 1,John Doe,john@example.com 2,Jane Smith,jane@example.com ``` ## Boolean Format[​](#boolean-format "Direct link to Boolean Format") Use the `-b` or `--boolformat` parameter to specify how boolean values are represented. ``` ./FastBCP \ ... --fileoutput "products.csv" \ --boolformat "1/0" \ ... ``` **Syntax:** * Short form: `-b "format"` * Long form: `--boolformat "format"` **Default:** `True/False` **Options:** * `true/false` * `t/f` * `1/0` **With `--boolformat "true/false"` (default):** ``` ProductID,ProductName,InStock,Discontinued 1,Widget A,true,false 2,Widget B,false,true ``` **With `--boolformat "1/0"`:** ``` ProductID,ProductName,InStock,Discontinued 1,Widget A,1,0 2,Widget B,0,1 ``` **With `--boolformat "yes/no"`:** ``` ProductID,ProductName,InStock,Discontinued 1,Widget A,yes,no 2,Widget B,no,yes ``` ## Complete Example[​](#complete-example "Direct link to Complete Example") * Windows * Linux ``` .\FastBCP.exe ` --connectiontype mssql ` --server "localhost" ` --database "AdventureWorks" ` --trusted ` --query "SELECT OrderID, OrderDate, CustomerName, TotalAmount, IsShipped FROM Sales.Orders WHERE OrderDate >= '2024-01-01'" ` --directory "C:\exports\sales" ` --fileoutput "orders_{startdate}.csv" ` --delimiter "," ` --quotes ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --decimalseparator "." ` --boolformat "1/0" ` --encoding "UTF-8" ``` ``` ./FastBCP \ --connectiontype mssql \ --server "localhost" \ --database "AdventureWorks" \ --trusted \ --query "SELECT OrderID, OrderDate, CustomerName, TotalAmount, IsShipped FROM Sales.Orders WHERE OrderDate >= '2024-01-01'" \ --directory "/exports/sales" \ --fileoutput "orders_{startdate}.csv" \ --delimiter "," \ --quotes \ --dateformat "yyyy-MM-dd HH:mm:ss" \ --decimalseparator "." \ --boolformat "1/0" \ --encoding "UTF-8" ``` **Output (orders\_20260107.csv):** ``` "OrderID","OrderDate","CustomerName","TotalAmount","IsShipped" "1001","2026-01-05 10:30:00","John Doe","299.99","1" "1002","2026-01-05 11:15:00","Jane Smith","149.50","0" "1003","2026-01-06 09:20:00","Bob Johnson","599.00","1" ``` tip For Excel compatibility, use `.xlsx` format instead: `--fileoutput "data.xlsx"` --- # License Configure how FastBCP 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 FastBCP license. By default, FastBCP will try to use the license file named `FastBCP.lic` in the same directory as the FastBCP executable. You can specify a custom license file using the `--license` parameter. ### License Sources[​](#license-sources "Direct link to License Sources") FastBCP 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 ``` .\FastBCP.exe ` ... --license "C:\licenses\FastBCP.lic" ` ... ``` ``` ./FastBCP \ ... --license "/path/to/licenses/FastBCP.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 ``` .\FastBCP.exe ` ... --license "https://licenseserve.yourdomain.lan/fastbcp.lic" ` ... ``` ``` ./FastBCP \ ... --license "https://licenseserve.yourdomain.lan/fastbcp.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:FASTBCP_LICENSE = "LICENSE_CONTENT_HERE" .\FastBCP.exe ` ... --license $env:FASTBCP_LICENSE ` ... # Using variable $license = Get-Content "C:\licenses\FastBCP.lic" -Raw .\FastBCP.exe ` ... --license $license ` ... ``` ``` # Using environment variable export FASTBCP_LICENSE="LICENSE_CONTENT_HERE" ./FastBCP \ ... --license "$FASTBCP_LICENSE" \ ... # Using variable license=$(cat /path/to/licenses/FastBCP.lic) ./FastBCP \ ... --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 parallel export: * Windows * Linux ``` .\FastBCP.exe ` --connectiontype pgsql ` --server "localhost:15432" ` --database "tpch10" ` --user "FastUser" ` --password "FastPassword" ` --query "SELECT * FROM dbo.orders" ` --directory "D:\temp" ` --fileoutput "pgsql_orders.parquet" ` --parallelmethod DataDriven ` --distributekeycolumn "YEAR(o_orderdate)" ` --paralleldegree 7 ` --merge false ` --runid "pgsql_to_parquet_parallel_datadriven" ` --license "//SharedUnc/licenses/fastbcp/fastbcp.lic" ``` ``` ./FastBCP \ --connectiontype pgsql \ --server "localhost:15432" \ --database "tpch10" \ --user "FastUser" \ --password "FastPassword" \ --query "SELECT * FROM dbo.orders" \ --directory "/temp" \ --fileoutput "pgsql_orders.parquet" \ --parallelmethod DataDriven \ --distributekeycolumn "YEAR(o_orderdate)" \ --paralleldegree 7 \ --merge false \ --runid "pgsql_to_parquet_parallel_datadriven" \ --license "//SharedUnc/licenses/fastbcp/fastbcp.lic" ``` This example: * Retrieves the license from a remote unc path * Connects to a PostgreSQL database * Exports orders data using DataDriven parallel method with 7 threads * Uses a YEAR expression on the distribute key column * Keeps distributed files separate (merge=false) --- # Output Info Configure where and how FastBCP saves exported data. ## Directory[​](#directory "Direct link to Directory") Use the `-D` or `--directory` parameter to specify where the output file(s) will be saved. ### Local Paths[​](#local-paths "Direct link to Local Paths") * Windows * Linux ``` .\FastBCP.exe \ ... --directory "C:\exports\sales\orders" \ ... ``` ``` ./FastBCP \ ... --directory "/exports/sales/orders" \ ... ``` ### UNC Paths[​](#unc-paths "Direct link to UNC Paths") For Windows network shares, you can use UNC paths: ``` .\FastBCP.exe \ ... --directory "\\server\share\exports\orders" \ ... ``` ### Cloud Paths[​](#cloud-paths "Direct link to Cloud Paths") FastBCP supports direct export to cloud storage: * AWS S3 * Azure Blob * Azure Data Lake Gen2 * Google Cloud Storage * S3-Compatible (MinIO, OVH) * OneLake ``` ./FastBCP \ ... --directory "s3://my-bucket/exports/orders" \ ... ``` ``` ./FastBCP \ ... --directory "abs://mystorageaccount.blob.core.windows.net/container/path" \ ... ``` ``` ./FastBCP \ ... --directory "abfss://mystorageaccount.dfs.core.windows.net/container/path/to/data" \ ... ``` ``` ./FastBCP \ ... --directory "gs://my-bucket/exports/orders" \ ... ``` ``` ./FastBCP \ ... --directory "s3://my-bucket/exports" \ ... ``` ``` ./FastBCP \ ... --directory "onelake://myworkspace.dfs.core.windows.net/lakehouse/path/to/data" \ ... ``` Information See [Cloud Options](/1.0/documentation/cli/cloud_options.md) for authentication and configuration details. **Syntax:** * Short form: `-D "path"` * Long form: `--directory "path"` ## Output File[​](#output-file "Direct link to Output File") Use the `-o` or `--fileoutput` parameter to specify the name of the output file. The file extension determines the output format. ``` ./FastBCP \ ... --fileoutput "orders.parquet" \ ... ``` **Syntax:** * Short form: `-o "filename"` * Long form: `--fileoutput "filename"` ### Supported Formats[​](#supported-formats "Direct link to Supported Formats") | Extension | Format | Description | | ---------- | ------------ | --------------------------------------------------- | | `.parquet` | Parquet | Columnar, compressed (recommended) | | `.csv` | CSV | Delimiter-separated values | | `.tsv` | TSV | Tab-separated values | | `.json` | JSON | JavaScript Object Notation | | `.bson` | BSON | Binary JSON | | `.xlsx` | Excel | Microsoft Excel format | | `.bin` | Binary | PostgreSQL COPY binary format | | `.csv.gz` | CSV Gzipped | Delimiter-separated values and compressed with Gzip | | `.tsv.gz` | TSV Gzipped | Tab delimited values and compressed with Gzip | | `.json.gz` | JSON Gzipped | JavaScript Object Notation with Gzip | ## Tokens[​](#tokens "Direct link to Tokens") Use tokens in `--directory` and `--fileoutput` parameters for dynamic paths and filenames. ``` ./FastBCP \ ... --directory "/exports/{sourcedatabase}/{sourceschema}" \ --fileoutput "{sourcetable}_{startdate}.parquet" \ ... ``` **Syntax:** Tokens are enclosed in curly braces `{token_name}` ### Available Tokens[​](#available-tokens "Direct link to Available Tokens") | Token | Description | Example Value | | ------------------------- | ---------------------------------- | ------------------------------------ | | `{sourcedatabase}` | Value from `--database` | `AdventureWorks` | | `{sourceschema}` | Value from `--sourceschema` | `Sales` | | `{sourcetable}` | Value from `--sourcetable` | `Orders` | | `{starttimestamp}` | Job start (yyyyMMddHHmmss) | `20260107143022` | | `{starttimestamp:FORMAT}` | Custom timestamp format | [See below](#timestamp-format-codes) | | `{startdate}` | Job start date (yyyyMMdd) | `20260107` | | `{starttime}` | Job start time (HHmmss) | `143022` | | `{starthour}` | Job start hour (HH) | `14` | | `{user}` | Username (from `--user` or system) | `dbuser` | | `{filetype}` | Output format extension | `parquet` | | `{datadrivencolumn}` | Data-driven split value | Varies | ### Timestamp Format Codes[​](#timestamp-format-codes "Direct link to Timestamp Format Codes") Use `{starttimestamp:FORMAT}` with custom format: | Format | Description | Example | | ------ | ---------------- | ------- | | `yyyy` | 4-digit year | `2026` | | `yy` | 2-digit year | `26` | | `MM` | Month (01-12) | `01` | | `dd` | Day (01-31) | `07` | | `HH` | Hour 24h (00-23) | `14` | | `mm` | Minute (00-59) | `30` | | `ss` | Second (00-59) | `22` | **Examples:** ``` # yyyyMMdd format ./FastBCP \ ... --fileoutput "orders_{starttimestamp:yyyyMMdd}.parquet" \ ... # yyyy-MM-dd format ./FastBCP \ ... --fileoutput "orders_{starttimestamp:yyyy-MM-dd}.parquet" \ ... # yyyyMMddHH format (hourly) ./FastBCP \ ... --fileoutput "logs_{starttimestamp:yyyyMMddHH}.parquet" \ ... ``` ## Timestamped Output[​](#timestamped-output "Direct link to Timestamped Output") Use the `-x` or `--timestamped` parameter to automatically add a timestamp to the filename. ``` ./FastBCP \ ... --fileoutput "orders.parquet" \ --timestamped \ ... ``` **Syntax:** * Short form: `-x` * Long form: `--timestamped` tip `--timestamped` automatically appends `_yyyyMMddHHmmss` to the filename. For more control over format and placement, use timestamp tokens instead. ## Encoding[​](#encoding "Direct link to Encoding") Use the `-e` or `--encoding` parameter to specify character encoding for text formats (CSV, JSON, TSV). ``` ./FastBCP \ ... --fileoutput "orders.csv" \ --encoding "UTF-8" \ ... ``` **Syntax:** * Short form: `-e "encoding"` * Long form: `--encoding "encoding"` **Default:** `UTF-8` note Encoding is not applicable to Parquet files (they use UTF-8 internally). --- # Parallel Parameters FastBCP 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 ``` .\FastBCP.exe ` ... --parallelmethod Ntile ` ... ``` ``` ./FastBCP \ ... --parallelmethod Ntile \ ... ``` **Syntax:** * Short form: `-m ` * Long form: `--parallelmethod ` ### Methods Comparison[​](#methods-comparison "Direct link to Methods Comparison") | Method | Parallel | Needs Distributed Column | Database Source Type | | --------------- | -------- | ------------------------ | ------------------------- | | `None` | | | Any | | `Random` | | | Any | | `DataDriven` | | | Any | | `RangeId` | | | Any | | `Ntile` | | | Any | | `Ctid` | | | PostgreSQL (pgsql/pgcopy) | | `Physloc` | | | SQL Server (mssql) | | `Rowid` | | | Oracle (oraodp) | | `NZDataSlice` | | | Netezza (nzsql) | | `Timepartition` | | | Any | ### Available Methods[​](#available-methods "Direct link to Available Methods") **None** - No parallel processing. Data is exported sequentially. **DataDriven** - Uses all values of a column (or a given list provided by `--datadrivenquery`) to split the export. If the number of values is greater than the degree of parallelism, throttling will be applied. tip You can use an expression in the distribute key column instead of a column name.
Example: `YEAR(o_orderdate)` **Ntile** - Uses the distributed column field and ntile values to retrieve evenly distributed chunks of data. Each parallel thread exports a portion based on a range built using the distributed column values. The uniqueness of the distributed column is not mandatory. **RangeId** - Uses the distributed column field and its min/max values to retrieve chunks of data. Each parallel thread exports a portion based on a range built using the distributed column values. **Random** - Requires a distribution column that must be an integer/bigint with many values (at least as many as the degree of parallelism). **Ctid** - Uses an internal hidden field to retrieve chunks of data. Each parallel thread exports a portion based on the CTID range. note PostgreSQL databases only (and some compatible PostgreSQL databases). **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. **Rowid** - Uses an internal hidden field to retrieve chunks of data. Each parallel thread exports a portion based on the ROWID range. note `RowId` parallel method is for Oracle databases only. **NZDataSlice** - Uses the native Netezza data slices to retrieve chunks of data. Each parallel thread exports a portion based on the data slice distribution. note `NZDataSlice` parallel method is for Netezza databases only. **Timepartition** - Uses a date/datetime column to partition data into time-based chunks. Each parallel thread exports data for a specific time period (year, month, week, or day). The distributed key column must be specified in a special format: `(datecolumn, year, month)`, `(datecolumn, year, month, day)`, `(datecolumn, year)`, or `(datecolumn, year, week)`. tip This method is ideal for time-series data and allows efficient parallel export based on temporal ranges. ## Distribute Key Column[​](#distribute-key-column "Direct link to Distribute Key Column") Use the `-c` or `--distributekeycolumn` parameter to define the column (or computation) on the data source that will be used to split the data into several parts. FastBCP 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. Timepartition Special Format When using the `Timepartition` method, the distribute key column must be specified in a special format: * `(datecolumn, year, month)` - Partition by year and month * `(datecolumn, year, month, day)` - Partition by year, month, and day * `(datecolumn, year)` - Partition by year only * `(datecolumn, year, week)` - Partition by year and week Example: `--distributekeycolumn "(o_orderdate, year, month)"` * Windows * Linux ``` # Using a column name .\FastBCP.exe ` ... --distributekeycolumn order_date ` ... # Using an expression .\FastBCP.exe ` ... --distributekeycolumn "YEAR(order_date)" ` ... ``` ``` # Using a column name ./FastBCP \ ... --distributekeycolumn order_date \ ... # Using an expression ./FastBCP \ ... --distributekeycolumn "YEAR(order_date)" \ ... ``` **Syntax:** * Short form: `-c ` * Long form: `--distributekeycolumn ` ## Degree of Parallelism[​](#degree-of-parallelism "Direct link to Degree of Parallelism") Use the `-p` or `--paralleldegree` 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 .\FastBCP.exe ` ... --paralleldegree 8 ` ... # Auto-detect based on CPU cores .\FastBCP.exe ` ... --paralleldegree 0 ` ... # Use half of available cores .\FastBCP.exe ` ... --paralleldegree -2 ` ... ``` ``` # Use 8 parallel threads ./FastBCP \ ... --paralleldegree 8 \ ... # Auto-detect based on CPU cores ./FastBCP \ ... --paralleldegree 0 \ ... # Use half of available cores ./FastBCP \ ... --paralleldegree -2 \ ... ``` **Syntax:** * Short form: `-p ` * Long form: `--paralleldegree ` **Default:** `-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. * Windows * Linux ``` .\FastBCP.exe ` ... --datadrivenquery "SELECT tagname FROM tags" ` ... ``` ``` ./FastBCP \ ... --datadrivenquery "SELECT tagname FROM tags" \ ... ``` * Windows * Linux ``` .\FastBCP.exe ` ... --datadrivenquery "SELECT o_orderdate FROM dim_date where ref_date > getdate() - 30" ` ... ``` ``` ./FastBCP \ ... --datadrivenquery "SELECT o_orderdate FROM dim_date where ref_date > getdate() - 30" \ ... ``` **Syntax:** * Long form only: `--datadrivenquery ""` ## Merge (boolean)[​](#merge-boolean "Direct link to Merge (boolean)") Use the `-M` or `--merge` true/false to specify if the temporary files generated for the parallel export should be kept splitted. Default `false` warning Current version allows valid merge for CSV and Parquet formats only. warning Merge is not available for cloud destinations warning Merge is automatic for local files destination * Windows * Linux ``` # Merge files after parallel export (default for local files) .\FastBCP.exe ` ... --merge true ` ... # Keep distributed files .\FastBCP.exe ` ... --merge false ` ... ``` ``` # Merge files after parallel export (default for local files) ./FastBCP \ ... --merge true \ ... # Keep distributed files ./FastBCP \ ... --merge false \ ... ``` **Syntax:** * Short form: `-M` * Long form: `--merge` **Default:** `true` ## Complete Example[​](#complete-example "Direct link to Complete Example") Here's a complete example using parallel parameters with the DataDriven method: * Windows * Linux ``` .\FastBCP.exe ` --connectiontype "pgcopy" ` --server "localhost:15432" ` --database "tpch" ` --user "FastUser" ` --password "FastPassword" ` --query "with T1 AS (select *, to_char(o_orderdate, 'YYYYMM') o_ordermonth from tpch_10.orders) SELECT * FROM T1" ` --directory "D:\temp\tpch\orders\" ` --fileoutput "pgcopy_orders.parquet" ` --method "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" ` --paralleldegree 10 ` --merge "False" ` --runid "pgcopy_to_parquet_parallel12_DataDriven" ``` ``` ./FastBCP \ --connectiontype "pgcopy" \ --server "localhost:15432" \ --database "tpch" \ --user "FastUser" \ --password "FastPassword" \ --query "with T1 AS (select *, to_char(o_orderdate, 'YYYYMM') o_ordermonth from tpch_10.orders) SELECT * FROM T1" \ --directory "/data/export/tpch/orders/" \ --fileoutput "pgcopy_orders.parquet" \ --method "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" \ --paralleldegree 10 \ --merge "False" \ --runid "pgcopy_to_parquet_parallel12_DataDriven" ``` This example: * Connects to a PostgreSQL database on localhost:15432 * Exports data from the dbo.orders table * Uses the DataDriven distribution method * Distributes work based on the month of the order date using an expression * Use a custom query to generate month values to extract from a light query (instead of a `SELECT DISTINCT o_ordermonth` from the source query) * Uses 10 parallel threads (even if there is 12 month to export) * Keeps distributed files without merging (--merge false) * Assigns a custom Run ID for tracking ## Timepartition Example[​](#timepartition-example "Direct link to Timepartition Example") Here's an example using the Timepartition method to partition data based on a date column: * Windows * Linux ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "tpch_copy" ` --user "FastUser" ` --password "FastPassword" ` --sourceschema "tpch_10" ` --sourcetable "orders_date_sorted" ` --directory "D:\temp\TestPartition" ` --fileoutput "orders.csv" ` --decimalseparator "," ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --method "Timepartition" ` --distributekeycolumn "(o_orderdate,year,month)" ` --paralleldegree 16 ` --merge "False" ` --runid "mssql_to_csv_parallel8_timepartition" ``` ``` ./FastBCP \ --connectiontype "mssql" \ --server "localhost" \ --database "tpch_copy" \ --user "FastUser" \ --password "FastPassword" \ --sourceschema "tpch_10" \ --sourcetable "orders_date_sorted" \ --directory "/data/export/TestPartition" \ --fileoutput "orders.csv" \ --decimalseparator "," \ --delimiter "|" \ --dateformat "yyyy-MM-dd HH:mm:ss" \ --encoding "UTF-8" \ --method "Timepartition" \ --distributekeycolumn "(o_orderdate,year,month)" \ --paralleldegree 16 \ --merge "False" \ --runid "mssql_to_csv_parallel8_timepartition" ``` This example: * Connects to a SQL Server database on localhost * Exports data from the tpch\_10.orders\_date\_sorted table * Uses the Timepartition distribution method * Partitions data by year and month based on the o\_orderdate column * Uses 16 parallel threads * Keeps distributed files without merging * Assigns a custom Run ID for tracking --- # Parquet Formatting [Apache Parquet](https://parquet.apache.org/) is a columnar storage format optimized for analytics. FastBCP automatically uses Parquet format when the output file has a `.parquet` extension. ## Parquet Compression[​](#parquet-compression "Direct link to Parquet Compression") Use the `--parquetcompression` parameter to specify the parquet compression codec. ``` ./FastBCP \ ... --fileoutput "orders.parquet" \ --parquetcompression Snappy \ ... ``` **Syntax:** * Long form: `--parquetcompression ` **Default:** `Zstd` (faster and better compression ratio than others) **Available Algorithms:** * `None` - No compression * `Snappy` - Fast, small compression, classic * `Gzip` - Smaller files, slower * `Lzo` - Slower, medium compression (rarely used) * `Lz4` - Slower, moderate compression * `Zstd` - Best compression and Fast (default) tip The **Zstd** (default) is best for most cases. It provides the best compression ratio with moderate speed, ideal for cloud storage to minimize storage costs and transfer time. * So no need to set this parameter to use Zstd. ## Row Group Size Configuration[​](#row-group-size-configuration "Direct link to Row Group Size Configuration") Available since version 0.30.1 This feature is available starting from FastBCP version 0.30.1. You can control the Parquet row group size using the `FASTBCP_RGSIZE` environment variable. Row groups are the unit of parallelization in Parquet files, and their size can impact query performance and memory usage. **Environment Variable:** `FASTBCP_RGSIZE` **Default Value:** `max(2^18/sqrt(degree),64000)` **Usage:** * Windows * Linux ``` # Set the row group size to 500,000 rows $env:FASTBCP_RGSIZE = "500000" # Run FastBCP .\FastBCP.exe --connectiontype mssql --server "localhost" ... ``` ``` # Set the row group size to 500,000 rows export FASTBCP_RGSIZE=500000 # Run FastBCP ./FastBCP --connectiontype mssql --server "localhost" ... ``` ## Complete Example[​](#complete-example "Direct link to Complete Example") * Windows * Linux ``` $env:FASTBCP_RGSIZE = "500000" .\FastBCP.exe ` --connectiontype mssql ` --server "localhost" ` --database "sales" ` --trusted ` --query "SELECT * FROM orders WHERE OrderDate >= '2024-01-01'" ` --directory "C:\exports" ` --fileoutput "orders.parquet" ` --parquetcompression Snappy ``` ``` export FASTBCP_RGSIZE=500000 ./FastBCP \ --connectiontype mssql \ --server "localhost" \ --database "sales" \ --trusted \ --query "SELECT * FROM orders WHERE OrderDate >= '2024-01-01'" \ --directory "/exports" \ --fileoutput "orders.parquet" \ --parquetcompression Snappy ``` --- # Source Info FastBCP offers multiple ways to define your data source for extraction. You can use a query, an input file, or specify schema and table names directly. ## Query[​](#query "Direct link to Query") Use the `-q` or `--query` parameter to specify your extraction as a SELECT statement. ``` ./FastBCP \ ... --query "SELECT * FROM Sales.Orders WHERE OrderDate >= '2024-01-01'" \ ... ``` **Syntax:** * Short form: `-q "SELECT_statement"` * Long form: `--query "SELECT_statement"` ## Input File[​](#input-file "Direct link to Input File") Use the `-F` or `--fileinput` parameter to specify an input file that contains only one query. ``` ./FastBCP \ ... --fileinput "/sources/sql/queries/my_extraction.sql" \ ... ``` **Syntax:** * Short form: `-F "file_path"` * Long form: `--fileinput "file_path"` Warning The query in the input file must not end with a semicolon (`;`). ## Source Schema[​](#source-schema "Direct link to Source Schema") If no query or input file is used, you can specify the source schema with the `-s` or `--sourceschema` parameter. Combined with the source table, this will extract data from `sourceschema.sourcetable`. ``` ./FastBCP \ ... --sourceschema "Sales" \ --sourcetable "Orders" \ ... ``` **Syntax:** * Short form: `-s "schema_name"` * Long form: `--sourceschema "schema_name"` Information This field is mandatory if some parallel method is used. See **[Advanced Parameters](/1.0/documentation/cli/advanced_parameters.md)** section for more details. ## Source Table[​](#source-table "Direct link to Source Table") If no query or input file is used, you can specify the source table with the `-T` or `--sourcetable` parameter. Combined with the source schema, this will extract data from `sourceschema.sourcetable`. ``` ./FastBCP \ ... --sourceschema "Sales" \ --sourcetable "Orders" \ ... ``` **Syntax:** * Short form: `-T "table_name"` * Long form: `--sourcetable "table_name"` Information This field is mandatory if some parallel method is used. See **[Advanced Parameters](/1.0/documentation/cli/advanced_parameters.md)** section for more details. Warning if you use the placeholder `{sourceschema}` and `{sourcetable}` in the `--directory` or `--fileoutput` (See **[Output Info](/1.0/documentation/cli/output_info.md)**) then you must set the `--sourceschema `and the `--sourcetable `even you use `--query `or `--inputfile` --- # AWS S3 Configuration Complete guide for configuring AWS S3 connectivity with FastBCP. ## Authentication Methods[​](#authentication-methods "Direct link to Authentication Methods") FastBCP 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 FastBCP:** ``` # Use default profile ./FastBCP \ ... --directory "s3://my-bucket/exports" \ --fileoutput "data.parquet" \ ... # Use production profile ./FastBCP \ ... --directory "s3://prod-bucket/exports" \ --cloudprofile "production" \ --fileoutput "data.parquet" \ ... # Use development profile ./FastBCP \ ... --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 FastBCP .\FastBCP.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 FastBCP ./FastBCP \ ... --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 FastBCP 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 FastBCP:** ``` { "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 ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "orders" ` --directory "s3://my-bucket/exports/{sourcetable}" ` --fileoutput "{sourcetable}.parquet" ``` ``` ./FastBCP \ --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 ``` .\FastBCP.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" ``` ``` ./FastBCP \ --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 ``` .\FastBCP.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 ``` ``` ./FastBCP \ --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") FastBCP 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 FastBCP. ## 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") FastBCP 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 ``` FastBCP will automatically use the Azure CLI's authentication credentials. **Using with FastBCP:** ``` # No additional configuration needed - just run FastBCP ./FastBCP \ ... --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 FastBCP .\FastBCP.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 FastBCP ./FastBCP \ ... --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 FastBCP .\FastBCP.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 FastBCP ./FastBCP \ ... --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 FastBCP 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 ``` .\FastBCP.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" ``` ``` ./FastBCP \ --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 ``` .\FastBCP.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 ``` ``` ./FastBCP \ --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 ``` .\FastBCP.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" ``` ``` ./FastBCP \ --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 ``` .\FastBCP.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 ``` ``` ./FastBCP \ --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 FastBCP. ## Authentication Methods[​](#authentication-methods "Direct link to Authentication Methods") FastBCP 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 ``` FastBCP will automatically use the gcloud CLI's authentication credentials. **Using with FastBCP:** ``` # No additional configuration needed - just run FastBCP ./FastBCP \ ... --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., "fastbcp-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 fastbcp-export \ --display-name="FastBCP Export Service Account" # Grant Storage Object Admin role gcloud projects add-iam-policy-binding my-project-id \ --member="serviceAccount:fastbcp-export@my-project-id.iam.gserviceaccount.com" \ --role="roles/storage.objectAdmin" # Create and download key file gcloud iam service-accounts keys create ~/fastbcp-key.json \ --iam-account=fastbcp-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\fastbcp-key.json" # Run FastBCP .\FastBCP.exe ` ... --directory "gs://my-bucket/exports" ` --fileoutput "data.parquet" ` ... ``` ``` # Set path to service account key file export GOOGLE_APPLICATION_CREDENTIALS="/path/to/fastbcp-key.json" # Run FastBCP ./FastBCP \ ... --directory "gs://my-bucket/exports" \ --fileoutput "data.parquet" \ ... ``` ### 3. Default Application Credentials[​](#3-default-application-credentials "Direct link to 3. Default Application Credentials") When FastBCP 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 ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Orders" ` --directory "gs://my-bucket/exports/orders" ` --fileoutput "orders.parquet" ``` ``` ./FastBCP \ --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 ``` .\FastBCP.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 ``` ``` ./FastBCP \ --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 ``` .\FastBCP.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 ``` ``` ./FastBCP \ --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 ``` .\FastBCP.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 ``` ``` ./FastBCP \ --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:fastbcp-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 FastBCP 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" .\FastBCP.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 "onelake://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" ./FastBCP ` --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 "onelake://myworkspace/mylakehouse/{sourcedatabase}/{sourceschema}/{sourcetable}/year=2024/" \ --fileoutput "orders_2024.parquet" \ --parallelmethod "Ctid" \ --paralleldegree 8 ``` --- # Cloud Connectivity Overview FastBCP 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 FastBCP will use multi-part uploads for all cloud provider Warning Since FastBCP 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") FastBCP 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](/1.0/documentation/cloud-connectivity/aws-s3.md) * [Azure Setup](/1.0/documentation/cloud-connectivity/azure.md) * [Google Cloud Storage Setup](/1.0/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 ./FastBCP / ... --directory "s3://my-bucket/exports" / --fileoutput "data.parquet" / ... ``` ``` # Azure Blob ./FastBCP \ ... --directory "abs://account.blob.core.windows.net/container/exports/" \ --fileoutput "data.parquet" \ ... ``` ``` # Azure Datalake Gen 2 ./FastBCP \ ... --directory "abs://account.dfs.core.windows.net/container/exports/" \ --fileoutput "data.parquet" \ ... ``` ``` # Google Cloud Storage ./FastBCP \ ... --directory "gs://my-bucket/exports" \ --fileoutput "data.parquet" \ ... ``` ``` # OneLake ./FastBCP \ ... --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: ``` ./FastBCP \ ... --directory "s3://prod-bucket/exports" \ --cloudprofile "production" \ ... ./FastBCP \ ... --directory "s3://dev-bucket/exports" \ --cloudprofile "development" ... ``` --- # Operating Systems FastBCP supports Windows and Linux 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 | | ------------------------ | -------------------------- | ------------- | --------- | | Amazon Linux | 2023 (Kernel 6.1) | Arm64, x64 | | | 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 FastBCP supports a wide range of database systems across different platforms. ## Supported Databases & Platforms[​](#supported-databases--platforms "Direct link to Supported Databases & Platforms") | Database | Windows AMD64 | Linux AMD64 | Linux ARM64 | | -------------- | ------------- | ----------- | ----------- | | **SQL Server** | | | | | **PostgreSQL** | | | | | **MySQL** | | | | | **Oracle** | | | | | **ClickHouse** | | | | | **DuckDB** | | | | | **Teradata** | | | | | **Netezza** | | | | | **SAP HANA** | | | | | **ODBC** | | | | | **OLEDB** | | | | --- # FASTBCP\_CLOUD\_ISBUFFERED ## Overview[​](#overview "Direct link to Overview") The `FASTBCP_CLOUD_ISBUFFERED` environment variable controls whether FastBCP uses buffered uploads when writing to cloud storage. ## Syntax[​](#syntax "Direct link to Syntax") * Windows * Linux ``` $env:FASTBCP_CLOUD_ISBUFFERED = "True" # or "False" ``` ``` export FASTBCP_CLOUD_ISBUFFERED=True # or False ``` ## Configuration[​](#configuration "Direct link to Configuration") | Property | Value | | -------------- | --------------------------------------------------------------------- | | **Type** | Boolean (`True` / `False`) | | **Default** | `False` | | **Applies to** | Azure Data Lake Storage (ADLS), OneLake, AWS S3, Google Cloud Storage | | **Since** | FastBCP 1.0 | ## Behavior[​](#behavior "Direct link to Behavior") ### When `False` (Default)[​](#when-false-default "Direct link to when-false-default") FastBCP uses the cloud SDK's `OpenWriteAsync` streaming upload: * Data is written directly to the cloud storage in chunks * Each chunk blocks the writer until acknowledged * **Simpler** but can be **slower** for Azure storage ### When `True` (Recommended for Azure)[​](#when-true-recommended-for-azure "Direct link to when-true-recommended-for-azure") FastBCP uses buffered uploads: * Data is first written to a local temporary file (see [`FASTBCP_TMPPATH`](/1.0/documentation/environment-variables/fastbcp-tmppath.md)) * When the stream is closed, the file is uploaded in parallel blocks (azcopy-like pattern) * **Significantly faster** for Azure Data Lake Storage and OneLake * Requires temporary disk space --- # FASTBCP\_CLOUD\_MAXUPLOADTHREAD\_PER\_STREAM ## Overview[​](#overview "Direct link to Overview") The `FASTBCP_CLOUD_MAXUPLOADTHREAD_PER_STREAM` environment variable controls the maximum number of parallel threads used to upload each file to cloud storage during buffered uploads. ## Syntax[​](#syntax "Direct link to Syntax") * Windows * Linux ``` $env:FASTBCP_CLOUD_MAXUPLOADTHREAD_PER_STREAM = "16" ``` ``` export FASTBCP_CLOUD_MAXUPLOADTHREAD_PER_STREAM=16 ``` ## Configuration[​](#configuration "Direct link to Configuration") | Property | Value | | -------------- | -------------------------------------------------------------------------------------------------------------------------- | | **Type** | Integer (> 0) | | **Default** | `8` when `parallelmethod=None`, `2` otherwise | | **Applies to** | Cloud uploads when [`FASTBCP_CLOUD_ISBUFFERED=True`](/1.0/documentation/environment-variables/fastbcp-cloud-isbuffered.md) | | **Since** | FastBCP 1.0 | ## Behavior[​](#behavior "Direct link to Behavior") ### Default Values[​](#default-values "Direct link to Default Values") FastBCP automatically adjusts the default based on the parallel extraction method: | Parallel Method | Default Threads | Reason | | --------------------------- | --------------- | ---------------------------------------------------------------------------------------------- | | `None` (single stream) | `8` | FastBCP itself is not parallelized, so more bandwidth can be allocated to upload | | `Ntile`, `DataDriven`, etc. | `2` | FastBCP is already extracting in parallel, so limit upload threads to avoid saturating network | ### How It Works[​](#how-it-works "Direct link to How It Works") When [`FASTBCP_CLOUD_ISBUFFERED=True`](/1.0/documentation/environment-variables/fastbcp-cloud-isbuffered.md): 1. Data is written to a local temporary file 2. On stream close, the file is uploaded in parallel blocks 3. `FASTBCP_CLOUD_MAXUPLOADTHREAD_PER_STREAM` controls how many threads upload blocks concurrently 4. Maps to `StorageTransferOptions.MaximumConcurrency` in Azure SDK --- # FASTBCP\_DATEFORMAT ## Overview[​](#overview "Direct link to Overview") The `FASTBCP_DATEFORMAT` environment variable lets you specify a custom format string for converting date values to strings in the output. When not set, FastBCP uses the ISO 8601 default `yyyy-MM-dd`. The format string follows [.NET standard and custom date/time format patterns](https://learn.microsoft.com/en-us/dotnet/standard/base-types/custom-date-and-time-format-strings). ## Syntax[​](#syntax "Direct link to Syntax") * Windows * Linux ``` $env:FASTBCP_DATEFORMAT = "yyyyMMdd" ``` ``` export FASTBCP_DATEFORMAT=yyyyMMdd ``` ## Configuration[​](#configuration "Direct link to Configuration") | Property | Value | | -------------- | --------------------------------------------------------------------------- | | **Type** | Format string | | **Default** | `yyyy-MM-dd` | | **Applies to** | All output formats that serialize date columns as strings (CSV, JSON, etc.) | | **Since** | FastBCP 1.0 | ## Format Examples[​](#format-examples "Direct link to Format Examples") | Format string | Example output | | ---------------------- | -------------- | | `yyyy-MM-dd` (default) | `2026-06-28` | | `yyyyMMdd` | `20260628` | | `dd/MM/yyyy` | `28/06/2026` | | `MM-dd-yyyy` | `06-28-2026` | | `yyyy/MM/dd` | `2026/06/28` | ## Examples[​](#examples "Direct link to Examples") ### Compact date format — no separators[​](#compact-date-format--no-separators "Direct link to Compact date format — no separators") * Windows * Linux ``` $env:FASTBCP_DATEFORMAT = "yyyyMMdd" fastbcp -S myserver.database.windows.net ` -d MyDatabase ` -T dbo.MyTable ` --fileoutput "output.csv" ``` ``` export FASTBCP_DATEFORMAT=yyyyMMdd fastbcp -S myserver.database.windows.net \ -d MyDatabase \ -T dbo.MyTable \ --fileoutput "output.csv" ``` Output column value: `20260628` ### Restore default ISO 8601 format[​](#restore-default-iso-8601-format "Direct link to Restore default ISO 8601 format") * Windows * Linux ``` Remove-Item Env:FASTBCP_DATEFORMAT ``` ``` unset FASTBCP_DATEFORMAT ``` --- # FASTBCP\_RGSIZE ## Overview[​](#overview "Direct link to Overview") The `FASTBCP_RGSIZE` environment variable controls the row group size for Parquet file exports. Row groups are the primary unit for organizing data within a Parquet file and significantly impact query performance and compression efficiency. ## Syntax[​](#syntax "Direct link to Syntax") * Windows * Linux ``` $env:FASTBCP_RGSIZE = "500000" ``` ``` export FASTBCP_RGSIZE=500000 ``` ## Configuration[​](#configuration "Direct link to Configuration") | Property | Value | | -------------- | ------------------------------ | | **Type** | Integer (> 0) | | **Default** | `max(2^18/sqrt(degree),64000)` | | **Applies to** | Parquet file exports | | **Since** | FastBCP 0.30 | ## What is a Row Group?[​](#what-is-a-row-group "Direct link to What is a Row Group?") A **row group** is a horizontal partition of data in a Parquet file: * Parquet files are divided into one or more row groups * Each row group contains a subset of rows * Column data within a row group is compressed together * Query engines can skip entire row groups based on metadata ``` Parquet File Structure: ├── Row Group 1 (1M rows) │ ├── Column A (compressed) │ ├── Column B (compressed) │ └── Column C (compressed) ├── Row Group 2 (1M rows) │ ├── Column A (compressed) │ ├── Column B (compressed) │ └── Column C (compressed) └── Footer (metadata) ``` --- # FASTBCP\_TMPPATH ## Overview[​](#overview "Direct link to Overview") The `FASTBCP_TMPPATH` environment variable specifies the base directory where FastBCP creates temporary files during buffered cloud uploads. ## Syntax[​](#syntax "Direct link to Syntax") * Windows * Linux ``` $env:FASTBCP_TMPPATH = "D:\temp\fastbcp" ``` ``` export FASTBCP_TMPPATH=/tmp/fastbcp ``` ## Configuration[​](#configuration "Direct link to Configuration") | Property | Value | | -------------- | -------------------------------------------------------------------------------------------------------------------------- | | **Type** | Directory path (absolute or relative) | | **Default** | System temp directory (`%TEMP%` on Windows, `$TMPDIR` on Linux/macOS) | | **Applies to** | Cloud uploads when [`FASTBCP_CLOUD_ISBUFFERED=True`](/1.0/documentation/environment-variables/fastbcp-cloud-isbuffered.md) | | **Since** | FastBCP 1.0 | ## Behavior[​](#behavior "Direct link to Behavior") ### Default Behavior (Not Set)[​](#default-behavior-not-set "Direct link to Default Behavior (Not Set)") FastBCP uses the system's default temporary directory: * **Windows**: `%TEMP%` (typically `C:\Users\\AppData\Local\Temp`) * **Linux/macOS**: `$TMPDIR` (typically `/tmp`) ### Custom Path[​](#custom-path "Direct link to Custom Path") When set, FastBCP creates a unique subdirectory per process: ``` /fastbcp_/ ``` **Example:** ``` D:\temp\fastbcp\fastbcp_a1b2c3d4-e5f6-7890-abcd-ef1234567890\ ``` ### Automatic Cleanup[​](#automatic-cleanup "Direct link to Automatic Cleanup") * Subdirectories are created automatically * Temporary files are deleted after successful upload * In case of errors, files may remain and need manual cleanup --- # FASTBCP\_UID\_STRING\_CASING ## Overview[​](#overview "Direct link to Overview") The `FASTBCP_UID_STRING_CASING` environment variable controls whether UID (UUID) values are converted to lowercase or uppercase strings in the output. The default is lowercase, which follows [RFC 4122](https://www.rfc-editor.org/rfc/rfc4122) standard formatting (e.g. `550e8400-e29b-41d4-a716-446655440000`). ## Syntax[​](#syntax "Direct link to Syntax") * Windows * Linux ``` $env:FASTBCP_UID_STRING_CASING = "upper" ``` ``` export FASTBCP_UID_STRING_CASING=upper ``` ## Configuration[​](#configuration "Direct link to Configuration") | Property | Value | | -------------- | -------------------------------------------------------- | | **Type** | `lower` / `upper` | | **Default** | `lower` | | **Applies to** | All output formats that serialize UID columns as strings | | **Since** | FastBCP 1.0 | ## Values[​](#values "Direct link to Values") | Value | Output example | | ----------------- | -------------------------------------- | | `lower` (default) | `550e8400-e29b-41d4-a716-446655440000` | | `upper` | `550E8400-E29B-41D4-A716-446655440000` | ## Examples[​](#examples "Direct link to Examples") ### Export with uppercase UIDs[​](#export-with-uppercase-uids "Direct link to Export with uppercase UIDs") * Windows * Linux ``` $env:FASTBCP_UID_STRING_CASING = "upper" fastbcp -S myserver.database.windows.net ` -d MyDatabase ` -T dbo.MyTable ` --fileoutput "output.csv" ``` ``` export FASTBCP_UID_STRING_CASING=upper fastbcp -S myserver.database.windows.net \ -d MyDatabase \ -T dbo.MyTable \ --fileoutput "output.csv" ``` ### Restore default lowercase (RFC 4122)[​](#restore-default-lowercase-rfc-4122 "Direct link to Restore default lowercase (RFC 4122)") * Windows * Linux ``` $env:FASTBCP_UID_STRING_CASING = "lower" ``` ``` export FASTBCP_UID_STRING_CASING=lower ``` --- # Environment Variables Overview FastBCP supports several environment variables to customize its behavior. This page provides a comprehensive overview of all available environment variables. ## Quick Reference Table[​](#quick-reference-table "Direct link to Quick Reference Table") | Variable | Type | Default | Category | Description | | ---------------------------------------------------------------------------------------------------------------------------------- | ----------------- | ---------------------------- | ------------ | ---------------------------------------------------------- | | [`FASTBCP_CLOUD_ISBUFFERED`](/1.0/documentation/environment-variables/fastbcp-cloud-isbuffered.md) | `True` / `False` | `False` | Cloud Upload | Enables buffered cloud uploads for better performance | | [`FASTBCP_TMPPATH`](/1.0/documentation/environment-variables/fastbcp-tmppath.md) | Directory path | System temp | Cloud Upload | Base directory for temporary files during buffered uploads | | [`FASTBCP_CLOUD_MAXUPLOADTHREAD_PER_STREAM`](/1.0/documentation/environment-variables/fastbcp-cloud-maxuploadthread-per-stream.md) | Integer (> 0) | `8` or `2` | Cloud Upload | Maximum parallel upload threads per cloud stream | | [`FASTBCP_RGSIZE`](/1.0/documentation/environment-variables/fastbcp-rgsize.md) | Integer (> 0) | max(2^18/sqrt(degree),64000) | Parquet | Row group size for Parquet files | | [`FASTBCP_UID_STRING_CASING`](/1.0/documentation/environment-variables/fastbcp-uid-string-casing.md) | `lower` / `upper` | `lower` | Output | Casing for UID-to-string conversion (RFC 4122) | | [`FASTBCP_DATEFORMAT`](/1.0/documentation/environment-variables/fastbcp-dateformat.md) | Format string | `yyyy-MM-dd` | Output | Custom date format string for date-to-string conversion | --- # Advanced Scenarios Advanced use cases, partition functions, and troubleshooting examples. ## SQL Server Partition Functions[​](#sql-server-partition-functions "Direct link to SQL Server Partition Functions") Use SQL Server partition functions for efficient parallel exports. ### Using Partition Function with DataDriven[​](#using-partition-function-with-datadriven "Direct link to Using Partition Function with DataDriven") Leverage existing partition functions to distribute work: ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "tpch10_collation_bin2" ` --trusted ` --sourceschema "dbo" ` --sourcetable "orders_part" ` --directory "D:\temp" ` --fileoutput "orders_partitioned.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "DataDriven" ` --distributekeycolumn "`$partition.PF_DATE(o_orderdate)" ` --paralleldegree 10 ` --merge "False" ``` Partition Function Syntax Use `` `$partition.FunctionName(ColumnName) `` to reference a partition function. The backtick escapes the dollar sign in PowerShell. ### Date-based Partitioning[​](#date-based-partitioning "Direct link to Date-based Partitioning") #### Partition by date ranges for time-series data using database partitions:[​](#partition-by-date-ranges-for-time-series-data-using-database-partitions "Direct link to Partition by date ranges for time-series data using database partitions:") ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "TimeSeriesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "SensorReadings" ` --directory "C:\temp" ` --fileoutput "sensor_readings.parquet" ` --parallelmethod "DataDriven" ` --distributekeycolumn "`$partition.PF_Monthly(reading_date)" ` --paralleldegree 12 ` --merge "False" ``` #### Partition by date ranges for time-series data using Timepartition FastBCP parallelmethod :[​](#partition-by-date-ranges-for-time-series-data-using-timepartition-fastbcp-parallelmethod-- "Direct link to Partition by date ranges for time-series data using Timepartition FastBCP parallelmethod :") ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "TimeSeriesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "SensorReadings" ` --directory "s3://mycorpexportbucket/raw/TimeSeriesDB/SensorReadings/" ` --fileoutput "sensor_readings.parquet" ` --cloudprofile "mycorps3profile" ` --parallelmethod "Timepartition" ` --distributekeycolumn "(reading_date,year,month,day)" ` --paralleldegree 12 ` --merge "False" ``` This technic will produce one file per day inside a directory structure (local or cloud) as a Hive partitionning directory : /year=2026/month=11/day=11/sensor\_readings.parquet You can after a full export use a query to filter your data and overwrite files that was already generated on the overlaping period. ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "TimeSeriesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "SensorReadings_Part" ` --query "SELECT * FROM dbo.SensorReadings_Part WHERE reading_date >= CAST(GETDATE() - 10 AS DATE)" ` --directory "s3://mycorpexportbucket/raw/TimeSeriesDB/SensorReadings/" ` --fileoutput "sensor_readings.parquet" ` --cloudprofile "mycorps3profile" ` --parallelmethod "Timepartition" ` --distributekeycolumn "(reading_date,year,month,day)" ` --paralleldegree 10 ` --merge "False" ``` ## Complex Queries[​](#complex-queries "Direct link to Complex Queries") ### Multi-table Joins[​](#multi-table-joins "Direct link to Multi-table Joins") Export data with a query with joins: ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --query "SELECT o.order_id, o.order_date, c.customer_name, od.product_id, od.quantity, od.unit_price FROM orders o INNER JOIN customers c ON o.customer_id = c.customer_id INNER JOIN order_details od ON o.order_id = od.order_id WHERE o.order_date >= '2024-01-01'" ` --directory "C:\temp" ` --fileoutput "sales_detail.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Ntile" ` --distributekeycolumn "o.order_id" ` --paralleldegree 8 ` --merge "False" ``` ### Aggregated Data[​](#aggregated-data "Direct link to Aggregated Data") Export pre-aggregated data: ``` .\FastBCP.exe ` --connectiontype "pgsql" ` --server "localhost" ` --port "5432" ` --database "analytics" ` --user "postgres" ` --password "postgres" ` --query "SELECT date_trunc('day', order_date) as order_day, customer_region, COUNT(*) as order_count, SUM(total_amount) as total_sales FROM orders GROUP BY date_trunc('day', order_date), customer_region" ` --directory "C:\temp" ` --fileoutput "daily_sales_by_region.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd" ` --encoding "UTF-8" ` --parallelmethod "None" ``` ## Performance Tuning[​](#performance-tuning "Direct link to Performance Tuning") ### Optimal Parallel Degree[​](#optimal-parallel-degree "Direct link to Optimal Parallel Degree") * Auto-detect * Manual Use negative values to auto-calculate based on CPU cores: ``` # Use all cores minus 2 .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "LargeDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "BigTable" ` --directory "C:\temp" ` --fileoutput "bigtable.parquet" ` --parallelmethod "RangeId" ` --distributekeycolumn "id" ` --paralleldegree -2 ` --merge "False" ``` Specify exact thread count: ``` # Use exactly 16 threads .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "LargeDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "BigTable" ` --directory "C:\temp" ` --fileoutput "bigtable.parquet" ` --parallelmethod "RangeId" ` --distributekeycolumn "id" ` --paralleldegree 16 ` --merge "False" ``` ### Parquet RowGroup Size[​](#parquet-rowgroup-size "Direct link to Parquet RowGroup Size") To reduce memory pressure and, in many cases, improve export performance, you can configure the Parquet row group size by setting the `FASTBCP_RGSIZE` environment variable. A smaller `FASTBCP_RGSIZE` value reduces memory usage during export. However, this comes with a trade-off: smaller row groups may reduce Parquet compression efficiency and can sometimes increase the final file size. Recommended values range from `1000` to `1_000_000`. In practice, values between 32,000 and 64,000 often provide a good balance between memory usage, performance, and compression efficiency. * Windows * Linux ``` $Env:FASTBCP_RGSIZE=32000 .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "LargeDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "BigTable" ` --directory "C:\temp" ` --fileoutput "bigtable.parquet" ` --parallelmethod "RangeId" ` --distributekeycolumn "id" ` --paralleldegree -2 ` --merge "False" ``` Specify exact thread count: ``` export FASTBCP_RGSIZE=32000 .\FastBCP / --connectiontype "mssql" / --server "mssqlhost.domain.lan,1433" / --database "LargeDB" / --user "FastUSer" / --password "FastPassword" / --sourceschema "dbo" / --sourcetable "BigTable" / --directory "/data/export/bigtable/" / --fileoutput "bigtable.parquet" / --parallelmethod "RangeId" / --distributekeycolumn "id" / --paralleldegree 16 / --merge "False" ``` ### Merge vs No-Merge[​](#merge-vs-no-merge "Direct link to Merge vs No-Merge") * With Merge * Without Merge Combine parallel outputs into single file: ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "DataDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Data" ` --directory "C:\temp" ` --fileoutput "data_merged.parquet" ` --parallelmethod "RangeId" ` --distributekeycolumn "id" ` --paralleldegree 8 ` --merge "True" ``` **Result**: Single file `data_merged.parquet`, slower and only OnPremise. Keep separate files for parallel processing: ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "DataDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Data" ` --directory "C:\temp" ` --fileoutput "data_part.parquet" ` --parallelmethod "RangeId" ` --distributekeycolumn "id" ` --paralleldegree 8 ` --merge "False" ``` **Result**: Multiple files `data_part_Chunk000.parquet`, `data_part_Chunk001.parquet`, etc. ### Enable Debug Logging[​](#enable-debug-logging "Direct link to Enable Debug Logging") Get detailed execution information: ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "TestDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "TestTable" ` --directory "C:\temp" ` --fileoutput "debug_export.csv" ` --parallelmethod "Random" ` --distributekeycolumn "id" ` --paralleldegree 4 ` --merge "False" ` --loglevel "Debug" ` --runid "debug_test_run" ``` Debug Mode Use `--loglevel "Debug"` to see detailed execution steps, connection strings (without passwords), and query generation details. tip Build your command with the [Wizard](/latest/wizard.md) --- # Cloud Storage Examples Examples for exporting data directly to cloud storage platforms. ## AWS S3[​](#aws-s3 "Direct link to AWS S3") Export data directly to Amazon S3 buckets using date-based placeholders. ### S3 with Date Placeholders[​](#s3-with-date-placeholders "Direct link to S3 with Date Placeholders") Automatically organize files by date using placeholder tokens: ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "DailySales" ` --directory "s3://my-bucket/data/sales/full/" ` --fileoutput "sales.parquet" ` --parallelmethod "RangeId" ` --distributekeycolumn "sale_id" ` --paralleldegree 8 ` --runid "sales_to_s3_daily" ``` ### S3 with Nested Structure[​](#s3-with-nested-structure "Direct link to S3 with Nested Structure") Create hierarchical folder structures: ``` .\FastBCP.exe ` --connectiontype "pgsql" ` --server "localhost" ` --port "5432" ` --database "ecommerce" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "orders" ` --directory "s3://analytics-bucket/exports/orders/" ` --fileoutput "orders.parquet" ` --parallelmethod "DataDriven" ` --distributekeycolumn "o_orderdate" ` --paralleldegree 10 ` --merge "True" ``` ### S3 with CSV Format[​](#s3-with-csv-format "Direct link to S3 with CSV Format") Export CSV files to S3 with manual date partitioning: ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "LogsDB" ` --trusted ` --query "SELECT * FROM ApplicationLogs WHERE log_date = '2024-05-01'" ` --directory "s3://logs-bucket/app-logs/appdate=2024-05-01/" ` --fileoutput "app_logs.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ``` ## Azure Blob Storage[​](#azure-blob-storage "Direct link to Azure Blob Storage") Export data to Azure Blob Storage containers. ### Azure with Date Partitioning[​](#azure-with-date-partitioning "Direct link to Azure with Date Partitioning") ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "AnalyticsDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Events" ` --directory "abs://mystorageaccount.blob.core.windows.net/datacontainer/events/full/" ` --fileoutput "events.parquet" ` --parallelmethod "Timepartition" ` --distributekeycolumn "event_timestamp(year,month)" ` --paralleldegree 10 ``` ### Azure Data Lake Gen2[​](#azure-data-lake-gen2 "Direct link to Azure Data Lake Gen2") Export to Azure Data Lake Storage Gen2: ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "AnalyticsDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Events" ` --directory "abfss://mystorageaccount.dfs.core.windows.net/datacontainer/events/full/" ` --fileoutput "events.parquet" ` --parallelmethod "Timepartition" ` --distributekeycolumn "event_timestamp(year,month)" ` --paralleldegree 10 ``` ## Hourly Exports[​](#hourly-exports "Direct link to Hourly Exports") Create exports with hourly granularity. ### Hourly Data Partition by Sensor with an incremental time range drived from outside[​](#hourly-data-partition-by-sensor-with-an-incremental-time-range-drived-from-outside "Direct link to Hourly Data Partition by Sensor with an incremental time range drived from outside") ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "StreamingDB" ` --trusted ` --query "SELECT * FROM SensorData WHERE reading_time >= '2024-02-03 14:00:00' and reading_time < '2024-02-03 15:00:00'" ` --directory "s3://iot-bucket/sensor-data/" ` --fileoutput "sensors_20240203140000_20240203150000.parquet" ` --parallelmethod "DataDriven" ` --distributekeycolumn "sensor_id" ` --datadrivenquery "SELECT sensor_id From SensorList" ` --paralleldegree 8 ` --runid "hourly_sensor_export_20240203140000_20240203150000" ``` ## Best for Cloud Exports[​](#best-for-cloud-exports "Direct link to Best for Cloud Exports") ### Performance Tips[​](#performance-tips "Direct link to Performance Tips") Parquet **Use Parquet for cloud storage**: Better compression and query performance, reduce network traffic Parallelism **Enable parallel execution when needed**: * if you need to split data on a business criteria * if you have a lots of data to extract Dynamic Parallel Degree Use negativ value for `--paralleldegree` to automatically set threads to (CPU cores / abs(degree)), leaving resources for other processes. eg `--paralleldegree -2` will use half of the core of the machine from where FastBCP is launched DataDriven Query \*\*Use `--datadrivenquery` to : * speedup the retrieval of the elements list to extract. * as a technic for incremental extraction by using a where in the `--datadrivenquery` instead of the main `--query` warning Keep the degree safe for your source, to avoid a total saturation. ### Example with All Best Practices[​](#example-with-all-best-practices "Direct link to Example with All Best Practices") ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "DataWarehouse" ` --trusted ` --sourceschema "dbo" ` --sourcetable "FactSales" ` --directory "s3://analytics-bucket/warehouse/sales/{sourcetable}" ` --fileoutput "FactSales.parquet" ` --parallelmethod "DataDriven" ` --datadrivenquery "SELECT ref_date from calendar where ref_date > cast(getdate()-30 as date)" ` --distributekeycolumn "sale_date" ` --paralleldegree -2 ` --runid "daily_sales_to_s3" ` --loglevel "Information" ``` tip Build your command with the [Wizard](/latest/wizard.md) --- # MySQL Examples Examples for exporting data from MySQL databases. ## Single-threaded Export[​](#single-threaded-export "Direct link to Single-threaded Export") Simple export without parallelization. ``` .\FastBCP.exe ` --connectiontype "mysql" ` --server "localhost" ` --port "3306" ` --database "test" ` --user "root" ` --password "password" ` --query "SELECT * FROM test_table LIMIT 1000" ` --directory "C:\temp" ` --fileoutput "mysql_test.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` ## Parallel Export - Random Method[​](#parallel-export---random-method "Direct link to Parallel Export - Random Method") Export using Random distribution. ``` .\FastBCP.exe ` --connectiontype "mysql" ` --server "localhost" ` --port "3306" ` --database "test" ` --user "root" ` --password "password" ` --sourceschema "test" ` --sourcetable "orders" ` --directory "C:\temp" ` --fileoutput "mysql_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "order_id" ` --paralleldegree 8 ` --merge "False" ` --runid "mysql_to_csv_parallel8_random" ``` ## Parallel Export - DataDriven Method[​](#parallel-export---datadriven-method "Direct link to Parallel Export - DataDriven Method") Export using DataDriven distribution based on distinct column values. ``` .\FastBCP.exe ` --connectiontype "mysql" ` --server "localhost" ` --port "3306" ` --database "test" ` --user "root" ` --password "password" ` --sourceschema "test" ` --sourcetable "orders" ` --directory "C:\temp" ` --fileoutput "mysql_orders_dd.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "DataDriven" ` --distributekeycolumn "status" ` --paralleldegree 10 ` --merge "False" ` --runid "mysql_to_csv_parallel10_datadriven" ``` ## Export to Parquet[​](#export-to-parquet "Direct link to Export to Parquet") Export MySQL data to Parquet format. ``` .\FastBCP.exe ` --connectiontype "mysql" ` --server "localhost" ` --port "3306" ` --database "test" ` --user "root" ` --password "password" ` --sourceschema "test" ` --sourcetable "orders" ` --directory "C:\temp" ` --fileoutput "mysql_orders.parquet" ` --parallelmethod "Random" ` --distributekeycolumn "order_id" ` --paralleldegree 6 ` --merge "False" ``` tip Build your command with the [Wizard](/latest/wizard.md) --- # Oracle Examples Comprehensive examples for exporting data from Oracle databases. ## Connection Types[​](#connection-types "Direct link to Connection Types") Oracle exports support multiple connection types: * **oraodp**: Native Oracle Data Provider (recommended) * **oledb**: Using Oracle OLEDB Provider (OraOLEDB) * **odbc**: Using ODBC DSN ## Single-threaded Export[​](#single-threaded-export "Direct link to Single-threaded Export") Simple export without parallelization. * Oracle Data Provider * OLEDB Provider ``` .\FastBCP.exe ` --connectiontype "oraodp" ` --server "localhost:1521/ORCLPDB1" ` --user "system" ` --password "password" ` --query "SELECT * FROM customers WHERE ROWNUM <= 1000" ` --directory "C:\temp" ` --fileoutput "oracle_customers.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` ``` .\FastBCP.exe ` --connectiontype "oledb" ` --provider "OraOLEDB.Oracle" ` --server "localhost:1521/ORCLPDB1" ` --user "system" ` --password "password" ` --query "SELECT * FROM customers WHERE ROWNUM <= 1000" ` --directory "C:\temp" ` --fileoutput "oracle_customers.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` ## Parallel Export - Rowid Method[​](#parallel-export---rowid-method "Direct link to Parallel Export - Rowid Method") Oracle-specific parallel export 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 exports and does not require a specific distribute key column. **Full table export:** ``` .\FastBCP.exe ` --connectiontype "oraodp" ` --server "localhost:1521/ORCLPDB1" ` --user "system" ` --password "password" ` --sourceschema "SYSTEM" ` --sourcetable "ORDERS" ` --directory "C:\temp" ` --fileoutput "oracle_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Rowid" ` --paralleldegree 8 ` --merge "False" ` --runid "oraodp_to_csv_parallel8_rowid" ``` **With query filter:** ``` .\FastBCP.exe ` --connectiontype "oraodp" ` --server "localhost:1521/ORCLPDB1" ` --user "system" ` --password "password" ` --query "SELECT * FROM SYSTEM.ORDERS WHERE order_date >= TO_DATE('2024-01-01', 'YYYY-MM-DD')" ` --directory "C:\temp" ` --fileoutput "oracle_orders_2024.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Rowid" ` --paralleldegree 8 ` --merge "False" ` --runid "oraodp_to_csv_parallel8_rowid_filtered" ``` ## Parallel Export - Random Method[​](#parallel-export---random-method "Direct link to Parallel Export - Random Method") Export using Random distribution with modulo operation. ``` .\FastBCP.exe ` --connectiontype "oraodp" ` --server "localhost:1521/ORCLPDB1" ` --user "system" ` --password "password" ` --sourceschema "SYSTEM" ` --sourcetable "ORDERS" ` --directory "C:\temp" ` --fileoutput "oracle_orders_random.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "order_id" ` --paralleldegree 8 ` --merge "False" ` --runid "oraodp_to_csv_parallel8_random" ``` ## Parallel Export - DataDriven Method[​](#parallel-export---datadriven-method "Direct link to Parallel Export - DataDriven Method") Export using DataDriven distribution based on distinct column values. ``` .\FastBCP.exe ` --connectiontype "oraodp" ` --server "localhost:1521/ORCLPDB1" ` --user "system" ` --password "password" ` --sourceschema "SYSTEM" ` --sourcetable "ORDERS" ` --directory "C:\temp" ` --fileoutput "oracle_orders_dd.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "DataDriven" ` --distributekeycolumn "order_status" ` --paralleldegree 10 ` --merge "False" ` --runid "oraodp_to_csv_parallel10_datadriven" ``` ## Export to Parquet[​](#export-to-parquet "Direct link to Export to Parquet") Export Oracle data to Parquet format. **Single-threaded:** ``` .\FastBCP.exe ` --connectiontype "oraodp" ` --server "localhost:1521/ORCLPDB1" ` --user "system" ` --password "password" ` --sourceschema "SYSTEM" ` --sourcetable "ORDERS" ` --directory "C:\temp" ` --fileoutput "oracle_orders.parquet" ` --parallelmethod "None" ``` **Parallel with Rowid:** ``` .\FastBCP.exe ` --connectiontype "oraodp" ` --server "localhost:1521/ORCLPDB1" ` --user "system" ` --password "password" ` --sourceschema "SYSTEM" ` --sourcetable "ORDERS" ` --directory "C:\temp" ` --fileoutput "oracle_orders.parquet" ` --parallelmethod "Rowid" ` --paralleldegree 10 ` --merge "False" ``` ## OLEDB Connection Examples[​](#oledb-connection-examples "Direct link to OLEDB Connection Examples") Using Oracle OLEDB Provider for connections. **Single-threaded:** ``` .\FastBCP.exe ` --connectiontype "oledb" ` --provider "OraOLEDB.Oracle" ` --server "localhost:1521/ORCLPDB1" ` --user "system" ` --password "password" ` --query "SELECT * FROM SYSTEM.ORDERS WHERE ROWNUM <= 10000" ` --directory "C:\temp" ` --fileoutput "oracle_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` **Parallel Random:** ``` .\FastBCP.exe ` --connectiontype "oledb" ` --provider "OraOLEDB.Oracle" ` --server "localhost:1521/ORCLPDB1" ` --user "system" ` --password "password" ` --query "SELECT * FROM SYSTEM.ORDERS" ` --directory "C:\temp" ` --fileoutput "oracle_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "order_id" ` --paralleldegree 6 ` --merge "False" ``` **Parallel DataDriven:** ``` .\FastBCP.exe ` --connectiontype "oledb" ` --provider "OraOLEDB.Oracle" ` --server "localhost:1521/ORCLPDB1" ` --user "system" ` --password "password" ` --query "SELECT * FROM SYSTEM.ORDERS" ` --directory "C:\temp" ` --fileoutput "oracle_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "DataDriven" ` --distributekeycolumn "order_status" ` --paralleldegree 6 ` --merge "False" ``` tip Build your command with the [Wizard](/latest/wizard.md) --- # Other Databases Examples for exporting data from Clickhouse, SAP HANA, and Netezza databases. ## Clickhouse[​](#clickhouse "Direct link to Clickhouse") Export data from Clickhouse database. **Single-threaded export:** ``` .\FastBCP.exe ` --connectiontype "clickhouse" ` --server "localhost" ` --port "9000" ` --database "default" ` --user "default" ` --password "password" ` --query "SELECT * FROM orders LIMIT 1000" ` --directory "C:\temp" ` --fileoutput "clickhouse_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` **Parallel export with Random method:** ``` .\FastBCP.exe ` --connectiontype "clickhouse" ` --server "localhost" ` --port "9000" ` --database "default" ` --user "default" ` --password "password" ` --sourceschema "default" ` --sourcetable "orders" ` --directory "C:\temp" ` --fileoutput "clickhouse_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "order_id" ` --paralleldegree 8 ` --merge "False" ``` ## SAP HANA[​](#sap-hana "Direct link to SAP HANA") Export data from SAP HANA database using two connection types. ### HANA Connection Type[​](#hana-connection-type "Direct link to HANA Connection Type") Standard HANA connection for general exports. **Single-threaded export:** ``` .\FastBCP.exe ` --connectiontype "hana" ` --server "hanaserver:30015" ` --user "SYSTEM" ` --password "password" ` --query "SELECT * FROM ORDERS WHERE ORDER_DATE >= '2024-01-01'" ` --directory "C:\temp" ` --fileoutput "hana_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` **Parallel export with Random method:** ``` .\FastBCP.exe ` --connectiontype "hana" ` --server "hanaserver:30015" ` --user "SYSTEM" ` --password "password" ` --sourceschema "SYSTEM" ` --sourcetable "ORDERS" ` --directory "C:\temp" ` --fileoutput "hana_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "ORDER_ID" ` --paralleldegree 8 ` --merge "False" ``` ### HANA Export Connection Type[​](#hana-export-connection-type "Direct link to HANA Export Connection Type") Optimized HANA connection using native EXPORT functionality for faster bulk exports. HANA Export The `hanaexport` connection type uses SAP HANA's native EXPORT statement for optimized bulk data transfer. This is recommended for large datasets. **Single-threaded export:** ``` .\FastBCP.exe ` --connectiontype "hanaexport" ` --server "hanaserver:30015" ` --user "SYSTEM" ` --password "password" ` --query "SELECT * FROM ORDERS WHERE ORDER_DATE >= '2024-01-01'" ` --directory "C:\temp" ` --fileoutput "hana_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` **Parallel export with Random method:** ``` .\FastBCP.exe ` --connectiontype "hanaexport" ` --server "hanaserver:30015" ` --user "SYSTEM" ` --password "password" ` --sourceschema "SYSTEM" ` --sourcetable "ORDERS" ` --directory "C:\temp" ` --fileoutput "hana_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "ORDER_ID" ` --paralleldegree 8 ` --merge "False" ``` ## Netezza[​](#netezza "Direct link to Netezza") Export data from Netezza database using OLEDB provider. **Single-threaded export:** ``` .\FastBCP.exe ` --connectiontype "oledb" ` --provider "NZOLEDB" ` --server "netezza_server" ` --database "SYSTEM" ` --user "admin" ` --password "password" ` --query "SELECT * FROM orders" ` --directory "C:\temp" ` --fileoutput "netezza_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` **Parallel export with Random method:** ``` .\FastBCP.exe ` --connectiontype "oledb" ` --provider "NZOLEDB" ` --server "netezza_server" ` --database "SYSTEM" ` --user "admin" ` --password "password" ` --query "SELECT * FROM orders" ` --directory "C:\temp" ` --fileoutput "netezza_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "order_id" ` --paralleldegree 6 ` --merge "False" ``` **Parallel export with DataDriven method:** ``` .\FastBCP.exe ` --connectiontype "oledb" ` --provider "NZOLEDB" ` --server "netezza_server" ` --database "SYSTEM" ` --user "admin" ` --password "password" ` --query "SELECT * FROM orders" ` --directory "C:\temp" ` --fileoutput "netezza_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "DataDriven" ` --distributekeycolumn "region" ` --paralleldegree 6 ` --merge "False" ``` tip Build your command with the [Wizard](/latest/wizard.md) --- # Output Formats Examples demonstrating different output formats supported by FastBCP. ## CSV Format[​](#csv-format "Direct link to CSV Format") Standard comma/delimiter-separated values format. ### Basic CSV Export[​](#basic-csv-export "Direct link to Basic CSV Export") ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Sales" ` --directory "C:\temp" ` --fileoutput "sales.csv" ` --decimalseparator "." ` --delimiter "," ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` ### CSV with Custom Delimiter[​](#csv-with-custom-delimiter "Direct link to CSV with Custom Delimiter") Using pipe delimiter for better data separation: ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Sales" ` --directory "C:\temp" ` --fileoutput "sales.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "sale_id" ` --paralleldegree 8 ` --merge "False" ``` ### CSV with European Format[​](#csv-with-european-format "Direct link to CSV with European Format") Using comma as decimal separator (common in European countries): ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Sales" ` --directory "C:\temp" ` --fileoutput "sales_european.csv" ` --decimalseparator "," ` --delimiter ";" ` --dateformat "dd/MM/yyyy HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "sale_id" ` --paralleldegree 8 ` --merge "False" ``` ## Parquet Format[​](#parquet-format "Direct link to Parquet Format") Columnar storage format optimized for analytical queries. ### Basic Parquet Export[​](#basic-parquet-export "Direct link to Basic Parquet Export") ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Sales" ` --directory "C:\temp" ` --fileoutput "sales.parquet" ` --parallelmethod "None" ``` ### Parallel Parquet Export[​](#parallel-parquet-export "Direct link to Parallel Parquet Export") Maximize performance with parallel execution: ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Sales" ` --directory "C:\temp" ` --fileoutput "sales.parquet" ` --parallelmethod "RangeId" ` --distributekeycolumn "sale_id" ` --paralleldegree 12 ` --merge "False" ``` ### Parquet with PostgreSQL[​](#parquet-with-postgresql "Direct link to Parquet with PostgreSQL") ``` .\FastBCP.exe ` --connectiontype "pgcopy" ` --server "localhost" ` --port "5432" ` --database "salesdb" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "sales" ` --directory "C:\temp" ` --fileoutput "pg_sales.parquet" ` --parallelmethod "Ctid" ` --paralleldegree 10 ` --merge "False" ``` ### Parquet with Oracle[​](#parquet-with-oracle "Direct link to Parquet with Oracle") ``` .\FastBCP.exe ` --connectiontype "oraodp" ` --server "localhost:1521/ORCLPDB1" ` --user "system" ` --password "password" ` --sourceschema "SYSTEM" ` --sourcetable "SALES" ` --directory "C:\temp" ` --fileoutput "oracle_sales.parquet" ` --parallelmethod "Rowid" ` --paralleldegree 8 ` --merge "False" ``` ## Excel Format[​](#excel-format "Direct link to Excel Format") Export data to Microsoft Excel format (.xlsx). Excel Format Excel exports automatically format data for spreadsheet applications. Large datasets may be split across multiple sheets if they exceed Excel's row limits. ### Basic Excel Export[​](#basic-excel-export "Direct link to Basic Excel Export") ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Sales" ` --directory "C:\temp" ` --fileoutput "sales.xlsx" ` --parallelmethod "None" ``` ### Parallel Excel Export[​](#parallel-excel-export "Direct link to Parallel Excel Export") ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Sales" ` --directory "C:\temp" ` --fileoutput "sales.xlsx" ` --parallelmethod "RangeId" ` --distributekeycolumn "sale_id" ` --paralleldegree 6 ` --merge "False" ``` ### Excel with Custom Query[​](#excel-with-custom-query "Direct link to Excel with Custom Query") Export filtered data to Excel: ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --query "SELECT * FROM dbo.Sales WHERE sale_date >= '2024-01-01' AND sale_date < '2025-01-01'" ` --directory "C:\temp" ` --fileoutput "sales_2024.xlsx" ` --parallelmethod "Ntile" ` --distributekeycolumn "sale_id" ` --paralleldegree 4 ` --merge "False" ``` tip Build your command with the [Wizard](/latest/wizard.md) --- # PostgreSQL Examples Comprehensive examples for exporting data from PostgreSQL using native connectors (pgsql, pgcopy). ## Connection Types[​](#connection-types "Direct link to Connection Types") PostgreSQL exports support two connection types: * **pgsql**: Standard PostgreSQL protocol * **pgcopy**: PostgreSQL COPY protocol (fastest for bulk exports) ## Single-threaded Export[​](#single-threaded-export "Direct link to Single-threaded Export") Simple export without parallelization. * Standard Protocol * COPY Protocol ``` .\FastBCP.exe ` --connectiontype "pgsql" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --query "SELECT * FROM lineitem LIMIT 1000" ` --directory "C:\temp" ` --fileoutput "pg_lineitem.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` ``` .\FastBCP.exe ` --connectiontype "pgcopy" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --query "SELECT * FROM lineitem LIMIT 1000" ` --directory "C:\temp" ` --fileoutput "pg_lineitem.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` ## Parallel Export - Random Method[​](#parallel-export---random-method "Direct link to Parallel Export - Random Method") Export using Random distribution with modulo operation. * Standard Protocol * COPY Protocol ``` .\FastBCP.exe ` --connectiontype "pgsql" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --query "SELECT * FROM lineitem" ` --directory "C:\temp" ` --fileoutput "pg_lineitem_random.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "l_linenumber" ` --paralleldegree 8 ` --merge "False" ` --runid "pgsql_to_csv_parallel8_random" ``` ``` .\FastBCP.exe ` --connectiontype "pgcopy" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --query "SELECT * FROM lineitem" ` --directory "C:\temp" ` --fileoutput "pg_lineitem_random.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "l_linenumber" ` --paralleldegree 8 ` --merge "False" ` --runid "pgcopy_to_csv_parallel8_random" ``` ## Parallel Export - DataDriven Method[​](#parallel-export---datadriven-method "Direct link to Parallel Export - DataDriven Method") Export using DataDriven distribution based on distinct column values. * Standard Protocol * COPY Protocol ``` .\FastBCP.exe ` --connectiontype "pgsql" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "lineitem" ` --directory "C:\temp" ` --fileoutput "pg_lineitem_dd.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "DataDriven" ` --distributekeycolumn "l_shipmode" ` --paralleldegree 10 ` --merge "False" ` --runid "pgsql_to_csv_parallel10_datadriven" ``` ``` .\FastBCP.exe ` --connectiontype "pgcopy" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "lineitem" ` --directory "C:\temp" ` --fileoutput "pg_lineitem_dd.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "DataDriven" ` --distributekeycolumn "l_shipmode" ` --paralleldegree 10 ` --merge "False" ` --runid "pgcopy_to_csv_parallel10_datadriven" ``` ## Parallel Export - Ntile Method[​](#parallel-export---ntile-method "Direct link to Parallel Export - Ntile Method") Export using Ntile for evenly distributed chunks. * Standard Protocol * COPY Protocol **Full table:** ``` .\FastBCP.exe ` --connectiontype "pgsql" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "lineitem" ` --directory "C:\temp" ` --fileoutput "pg_lineitem_ntile.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Ntile" ` --distributekeycolumn "l_orderkey" ` --paralleldegree 12 ` --merge "False" ` --runid "pgsql_to_csv_parallel12_ntile" ``` **With query filter:** ``` .\FastBCP.exe ` --connectiontype "pgsql" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --query "SELECT * FROM lineitem WHERE l_shipdate BETWEEN '1995-01-01' AND '1995-12-31'" ` --directory "C:\temp" ` --fileoutput "pg_lineitem_ntile.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Ntile" ` --distributekeycolumn "l_orderkey" ` --paralleldegree 12 ` --merge "False" ` --runid "pgsql_to_csv_parallel12_ntile_filtered" ``` **Full table:** ``` .\FastBCP.exe ` --connectiontype "pgcopy" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "lineitem" ` --directory "C:\temp" ` --fileoutput "pg_lineitem_ntile.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Ntile" ` --distributekeycolumn "l_orderkey" ` --paralleldegree 12 ` --merge "False" ` --runid "pgcopy_to_csv_parallel12_ntile" ``` **With query filter:** ``` .\FastBCP.exe ` --connectiontype "pgcopy" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --query "SELECT * FROM lineitem WHERE l_shipdate BETWEEN '1995-01-01' AND '1995-12-31'" ` --directory "C:\temp" ` --fileoutput "pg_lineitem_ntile.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Ntile" ` --distributekeycolumn "l_orderkey" ` --paralleldegree 12 ` --merge "False" ` --runid "pgcopy_to_csv_parallel12_ntile_filtered" ``` ## Parallel Export - Ctid Method[​](#parallel-export---ctid-method "Direct link to Parallel Export - Ctid Method") PostgreSQL-specific parallel export using physical row identifier (ctid). PostgreSQL-Specific The Ctid method is unique to PostgreSQL and uses the physical row identifier for parallel data distribution. This is very efficient for full table exports. * Standard Protocol * COPY Protocol ``` .\FastBCP.exe ` --connectiontype "pgsql" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "lineitem" ` --directory "C:\temp" ` --fileoutput "pg_lineitem_ctid.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Ctid" ` --paralleldegree 8 ` --merge "False" ` --runid "pgsql_to_csv_parallel8_ctid" ``` ``` .\FastBCP.exe ` --connectiontype "pgcopy" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "lineitem" ` --directory "C:\temp" ` --fileoutput "pg_lineitem_ctid.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Ctid" ` --paralleldegree 8 ` --merge "False" ` --runid "pgcopy_to_csv_parallel8_ctid" ``` ## Export to Parquet[​](#export-to-parquet "Direct link to Export to Parquet") Export PostgreSQL data to Parquet format. * Standard Protocol * COPY Protocol **Single-threaded:** ``` .\FastBCP.exe ` --connectiontype "pgsql" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "lineitem" ` --directory "C:\temp" ` --fileoutput "pg_lineitem.parquet" ` --parallelmethod "None" ``` **Parallel with Ctid:** ``` .\FastBCP.exe ` --connectiontype "pgsql" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "lineitem" ` --directory "C:\temp" ` --fileoutput "pg_lineitem.parquet" ` --parallelmethod "Ctid" ` --paralleldegree 10 ` --merge "False" ``` **Single-threaded:** ``` .\FastBCP.exe ` --connectiontype "pgcopy" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "lineitem" ` --directory "C:\temp" ` --fileoutput "pg_lineitem.parquet" ` --parallelmethod "None" ``` **Parallel with Ctid:** ``` .\FastBCP.exe ` --connectiontype "pgcopy" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "lineitem" ` --directory "C:\temp" ` --fileoutput "pg_lineitem.parquet" ` --parallelmethod "Ctid" ` --paralleldegree 10 ` --merge "False" ``` ## ODBC Connection[​](#odbc-connection "Direct link to ODBC Connection") Using ODBC DSN for PostgreSQL connection. **Single-threaded:** ``` .\FastBCP.exe ` --connectiontype "odbc" ` --dsn "PostgreSQL_DSN" ` --directory "C:\temp" ` --fileoutput "pg_test.csv" ` --query "SELECT * FROM public.test_table" ` --parallelmethod "None" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ``` **Parallel Random:** ``` .\FastBCP.exe ` --connectiontype "odbc" ` --dsn "PostgreSQL_DSN" ` --directory "C:\temp" ` --fileoutput "pg_test.csv" ` --query "SELECT * FROM public.test_table" ` --parallelmethod "Random" ` --distributekeycolumn "id" ` --paralleldegree 6 ` --merge "False" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ``` **Parallel DataDriven:** ``` .\FastBCP.exe ` --connectiontype "odbc" ` --dsn "PostgreSQL_DSN" ` --directory "C:\temp" ` --fileoutput "pg_test.csv" ` --query "SELECT * FROM public.test_table" ` --parallelmethod "DataDriven" ` --distributekeycolumn "category" ` --paralleldegree 6 ` --merge "False" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ``` tip Build your command with the [Wizard](/latest/wizard.md) --- # SQL Server Examples Comprehensive examples for exporting data from SQL Server (MSSQL, OLEDB, ODBC). ## Single-threaded Export[​](#single-threaded-export "Direct link to Single-threaded Export") Simple export without parallelization for smaller datasets. ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "FASTExportData" ` --trusted ` --query "SELECT top 1000 * FROM dbo.TEST_71_1M_12m" ` --directory "C:\temp" ` --fileoutput "TEST1000.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` ## Parallel Export - Random Method[​](#parallel-export---random-method "Direct link to Parallel Export - Random Method") Export using Random distribution based on modulo operation. * Windows Authentication * SQL Authentication ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "FASTExportData" ` --trusted ` --query "SELECT * FROM dbo.TEST_71_1M_12m" ` --directory "C:\temp" ` --fileoutput "TEST_71c_1Mr.csv" ` --decimalseparator "," ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "ID_ARTICLE" ` --paralleldegree 8 ` --merge "False" ` --runid "mssql_to_csv_parallel8_random" ``` ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "FASTExportData" ` --user "FastUser" ` --password "FastPassword" ` --query "SELECT * FROM dbo.TEST_71_1M_12m" ` --directory "C:\temp" ` --fileoutput "TEST_71c_1Mr.csv" ` --decimalseparator "," ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "ID_ARTICLE" ` --paralleldegree 8 ` --merge "False" ` --runid "mssql_to_csv_parallel8_random" ``` ## Parallel Export - RangeId Method[​](#parallel-export---rangeid-method "Direct link to Parallel Export - RangeId Method") Export using RangeId distribution for evenly distributed integer keys. **Using table name:** ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "tpch10_collation_bin2" ` --trusted ` --sourceschema "dbo" ` --sourcetable "orders" ` --directory "D:\temp" ` --fileoutput "mssql_orders.csv" ` --decimalseparator "," ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "RangeId" ` --distributekeycolumn "o_orderkey" ` --paralleldegree -2 ` --merge "False" ` --runid "mssql_to_csv_parallel-2_rangeid" ``` **Using query with filter:** ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "tpch10_collation_bin2" ` --trusted ` --query "select * from orders WHERE o_orderdate between '19950101' and '19951231'" ` --directory "D:\temp" ` --fileoutput "mssql_orders.csv" ` --decimalseparator "," ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "RangeId" ` --distributekeycolumn "o_orderkey" ` --paralleldegree -2 ` --merge "False" ` --runid "mssql_to_csv_parallel-2_rangeid_using_query" ``` ## Parallel Export - Ntile Method[​](#parallel-export---ntile-method "Direct link to Parallel Export - Ntile Method") Export using Ntile distribution for evenly distributed chunks. **Full table export:** ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "tpch10_collation_bin2" ` --trusted ` --sourceschema "dbo" ` --sourcetable "orders" ` --directory "D:\temp" ` --fileoutput "mssql_orders.csv" ` --decimalseparator "," ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Ntile" ` --distributekeycolumn "o_orderkey" ` --paralleldegree 12 ` --merge "False" ` --runid "mssql_to_csv_parallel12_Ntile" ``` **Filtered export with date column:** ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "tpch10_collation_bin2" ` --trusted ` --query "select * from orders WHERE o_orderdate between '19950101' and '19951231'" ` --directory "D:\temp" ` --fileoutput "mssql_orders.csv" ` --decimalseparator "," ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Ntile" ` --distributekeycolumn "o_orderdate" ` --paralleldegree 12 ` --merge "False" ` --runid "mssql_to_csv_parallel12_Ntile_using_query" ``` ## Parallel Export - DataDriven Method[​](#parallel-export---datadriven-method "Direct link to Parallel Export - DataDriven Method") Export using DataDriven distribution based on distinct values of a column. **Using partition function:** ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "tpch10_collation_bin2" ` --directory "D:\temp" ` --fileoutput "mssql_orders.csv" ` --trusted ` --sourceschema "dbo" ` --sourcetable "orders_part" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "DataDriven" ` --distributekeycolumn "`$partition.PF_DATE(o_orderdate)" ` --merge "False" ` --paralleldegree 10 ``` ## Export to Parquet[​](#export-to-parquet "Direct link to Export to Parquet") Export SQL Server data to Parquet format. **Single-threaded:** ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "faker" ` --trusted ` --sourceschema "dbo" ` --sourcetable "faker_s1000" ` --directory "D:\temp" ` --fileoutput "mssql_faker_s1000.parquet" ` --parallelmethod "None" ` --runid "mssql_to_parquet_NoParallel" ``` **Parallel with RangeId:** ``` .\FastBCP.exe ` --connectiontype "mssql" ` --trusted ` --server "localhost" ` --database "tpch10_collation_bin2" ` --directory "D:\temp" ` --fileoutput "mssql_orders.parquet" ` --parallelmethod "RangeId" ` --distributekeycolumn "o_orderkey" ` --paralleldegree 7 ` --sourceschema "dbo" ` --sourcetable "orders" ` --merge "False" ``` **Parallel with Ntile and query:** ``` .\FastBCP.exe ` --connectiontype "mssql" ` --trusted ` --server "localhost" ` --database "tpch10_collation_bin2" ` --directory "D:\temp" ` --fileoutput "mssql_orders_1995.parquet" ` --parallelmethod "Ntile" ` --distributekeycolumn "o_orderkey" ` --paralleldegree 7 ` --query "select * from dbo.orders where o_orderdate between '1995-01-01' and '1995-12-31'" ` --merge "False" ``` ## OLEDB Connection[​](#oledb-connection "Direct link to OLEDB Connection") Alternative connection method using OLEDB provider. **Single-threaded:** ``` $query="SELECT top 10000 * FROM FASTExportData.dbo.TEST_71_1M_12m" $target="localhost" .\FastBCP.exe ` --connectiontype "oledb" ` --provider "MSOLEDBSQL" ` --server $target ` --directory "C:\temp" ` --fileoutput "TEST.CSV" ` --paralleldegree 1 ` --trusted ` --query $query ` --parallelmethod "None" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ``` **Parallel Random with Windows Auth:** ``` .\FastBCP.exe ` --connectiontype "oledb" ` --provider "MSOLEDBSQL" ` --server $target ` --directory "C:\temp" ` --fileoutput "TEST.CSV" ` --paralleldegree 6 ` --trusted ` --query $query ` --parallelmethod "Random" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --distributekeycolumn "ID_ARTICLE" ` --merge "False" ``` **Parallel Random with SQL Auth:** ``` .\FastBCP.exe ` --connectiontype "oledb" ` --provider "MSOLEDBSQL" ` --server $target ` --directory "C:\temp" ` --fileoutput "TEST.CSV" ` --paralleldegree 6 ` --user "FastUser" ` --password "FastPassword" ` --query $query ` --parallelmethod "Random" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --distributekeycolumn "ID_ARTICLE" ` --merge "False" ``` **Parallel DataDriven:** ``` .\FastBCP.exe ` --connectiontype "oledb" ` --provider "MSOLEDBSQL" ` --server $target ` --directory "C:\temp" ` --fileoutput "TEST.CSV" ` --paralleldegree 6 ` --trusted ` --query $query ` --parallelmethod "DataDriven" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --distributekeycolumn "ID_DECOUPE_GEO" ` --merge "False" ``` ## ODBC Connection[​](#odbc-connection "Direct link to ODBC Connection") Using ODBC DSN for connection. **Single-threaded:** ``` .\FastBCP.exe ` --connectiontype "odbc" ` --dsn "DSN4FastBCP" ` --directory "C:\temp" ` --fileoutput "TEST.CSV" ` --paralleldegree 1 ` --trusted ` --query "SELECT * FROM [TEST_71_1M_12m]" ` --parallelmethod "None" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ``` **Parallel Random with Windows Auth:** ``` .\FastBCP.exe ` --connectiontype "odbc" ` --dsn "DSN4FastBCP" ` --directory "C:\temp" ` --fileoutput "TEST.CSV" ` --paralleldegree 6 ` --trusted ` --query "SELECT * FROM [TEST_71_1M_12m]" ` --parallelmethod "Random" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --distributekeycolumn "ID_ARTICLE" ` --merge "False" ``` **Parallel Random with SQL Auth:** ``` .\FastBCP.exe ` --connectiontype "odbc" ` --dsn "DSN4FastBCP" ` --directory "C:\temp" ` --fileoutput "TEST.CSV" ` --paralleldegree 6 ` --user "FastUser" ` --password "FastPassword" ` --query "SELECT * FROM [TEST_71_1M_12m]" ` --parallelmethod "Random" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --distributekeycolumn "ID_ARTICLE" ` --merge "False" ``` **Parallel DataDriven:** ``` .\FastBCP.exe ` --connectiontype "odbc" ` --dsn "DSN4FastBCP" ` --directory "C:\temp" ` --fileoutput "TEST.CSV" ` --paralleldegree 6 ` --trusted ` --query "SELECT * FROM [TEST_71_1M_12m]" ` --parallelmethod "DataDriven" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --distributekeycolumn "ID_GEO" ` --merge "False" ``` tip Build your command with the [Wizard](/latest/wizard.md) --- # Configuration Examples Here are sample configuration files for different logging scenarios: ## FastBCP\_Settings.json : Sinks on Console + Files (Windows path style) + MSSQL[​](#fastbcp_settingsjson---sinks-on-console--files-windows-path-style--mssql "Direct link to FastBCP_Settings.json : Sinks on Console + Files (Windows path style) + MSSQL") For logs with Console + Files stored on Windows machine + MSSQL sinks: ``` { "ConnectionStrings": { "MS_FastBCPLogs": "Server=localhost;Database=FastBCPLogs;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\\FastBCP_.json", "retainedFileCountLimit": 10, "rollingInterval": "Day", "rollOnFileSizeLimit": true } }, { "Name": "MSSqlServer", "Args": { "connectionString": "MS_FastBCPLogs", "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": "FastBCP" } } } ``` ## FastBCP\_Settings\_Linux\_Console\_Files.json[​](#fastbcp_settings_linux_console_filesjson "Direct link to FastBCP_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/FastBCP_.json", "retainedFileCountLimit": 10, "rollingInterval": "Day", "rollOnFileSizeLimit": true } } ], "Enrich": [ "FromLogContext", "WithMachineName", "WithProcessId", "WithThreadId" ], "Properties": { "Application": "FastBCP" } } } ``` ## FastBCP\_Settings\_Map\_for\_Windows.json[​](#fastbcp_settings_map_for_windowsjson "Direct link to FastBCP_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}\\FastBCP-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": "FastBCP" } } } ``` ## FastBCP\_Settings\_Map\_for\_Linux\_and\_Container.json[​](#fastbcp_settings_map_for_linux_and_containerjson "Direct link to FastBCP_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}/FastBCP-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": "FastBCP" } } } ``` ## FastBCP\_Settings\_Log\_to\_PGSQL.json : Console + PostgreSQL log database[​](#fastbcp_settings_log_to_pgsqljson--console--postgresql-log-database "Direct link to FastBCP_Settings_Log_to_PGSQL.json : Console + PostgreSQL log database") ``` { "ConnectionStrings": { "PG_FastBCPLogs": "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_FastBCPLogs", "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": "FastBCP" } } } ``` ## FastBCP\_Settings\_OpenTelemetry.json[​](#fastbcp_settings_opentelemetryjson "Direct link to FastBCP_Settings_OpenTelemetry.json") For Console with trace correlation and OpenTelemetry log export (e.g., to [Jaeger](https://www.jaegertracing.io/)): ``` { "Serilog": { "MinimumLevel": { "Default": "Debug", "Override": { "Microsoft": "Warning", "System": "Warning" } }, "Properties": { "LogDirectory": "logs" }, "Enrich": [ "FromLogContext", "WithEnvironmentUserName", "WithProcessId", "WithThreadId", "WithMachineName", "fulltargetname" ], "WriteTo": [ { "Name": "Console", "Args": { "restrictedToMinimumLevel": "Information", "outputTemplate": "{Timestamp:yyyy-MM-ddTHH:mm:ss.fff zzz} -|- {Application} -|- {Level:u12} -|- {fulltargetname} -|- TraceId={TraceId} SpanId={SpanId} -|- {Message}{NewLine}{Exception}", "theme": "Serilog.Sinks.SystemConsole.Themes.SystemConsoleTheme::Literate, Serilog.Sinks.Console" } }, { "Name": "OpenTelemetry", "Args": { "Endpoint": "http://localhost:4317", "Protocol": "Grpc", "ResourceAttributes": { "service.name": "FastBCP", "deployment.environment": "local-test" } } } ] } } ``` Usage with the `--traceparent` parameter to correlate with an upstream caller: ``` ./FastBCP \ --connectiontype mssql \ --server localhost \ --database "tpch10" \ --trusted \ --query "SELECT * FROM dbo.orders" \ --directory "/data/temp" \ --fileoutput "orders.csv" \ --traceparent "00-abcdef1234567890abcdef1234567890-1234567890abcdef-01" \ --settingsfile "/config/FastBCP_Settings_OpenTelemetry.json" ``` **Result in Jaeger UI:** ![FastBCP OpenTelemetry result in Jaeger UI](/assets/images/FastBCP_OpenTelemetry_result_sample-729a1de4f4ccde92a0856f3f4e8b9468.jpg) --- # Log Database FastBCP 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 `FastBCP_settings.json` * You can specify a custom settings file using the `--settingsfile` parameter Information **Log table is created automatically if not exists but it is not indexed.** Up to you to choose you indexed column(s) you prefer to index. We Advice you to index event\_timestamp column and run\_id Information No internal purge of the log table, it is up to you to decide when and how filter the log table Complete configuration examples for both MSSQL and PostgreSQL are available in the [Configuration Examples](/1.0/documentation/logging/examples.md#fastbcp_settingsjson-for-windows) page. Information **In case the database is not reachable, FastBCP will fail and will refuse to continue.** If you want to continue without logging in the database, you can rename the `FastBCP_settings.json` file to something else (like `FastBCP_settings.json.save`) and FastBCP 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 ***FastBCP\_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}/FastBCP-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**: [FastBCP\_Settings\_Map\_for\_Windows.json](/1.0/documentation/logging/examples.md#fastbcp_settings_map_for_windowsjson) * **Linux/Container**: [FastBCP\_Settings\_Map\_for\_Linux\_and\_Container.json](/1.0/documentation/logging/examples.md#fastbcp_settings_map_for_linux_and_containerjson) --- # Log Levels FastBCP 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 | | **Critical** | Severe errors causing termination | Fatal application errors | ## Configuration[​](#configuration "Direct link to Configuration") You can also configure the log level in the `FastBCP_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\\FastBCP_.json", "rollingInterval": "Day" } } ] } } ``` --- # OpenTelemetry FastBCP supports [OpenTelemetry](https://opentelemetry.io/) for distributed tracing and log correlation. This allows you to correlate FastBCP operations with upstream callers (orchestrators, APIs, pipelines) and export structured logs to any OpenTelemetry-compatible backend such as [Jaeger](https://www.jaegertracing.io/), [Zipkin](https://zipkin.io/), or [Grafana Tempo](https://grafana.com/oss/tempo/). ## The `--traceparent` Parameter[​](#the---traceparent-parameter "Direct link to the---traceparent-parameter") The `--traceparent` parameter accepts a [W3C Trace Context](https://www.w3.org/TR/trace-context/) traceparent identifier. When provided, FastBCP uses this trace context to link its internal spans and logs to the calling system's trace, enabling end-to-end distributed tracing. **Syntax:** * Long form only: `--traceparent ""` **Format:** The traceparent value follows the W3C Trace Context specification: ``` {version}-{trace-id}-{parent-id}-{trace-flags} ``` | Field | Format | Description | | --------------- | ------------- | --------------------------------------------- | | **version** | 2 hex digits | Version of the trace context (currently `00`) | | **trace-id** | 32 hex digits | Globally unique trace identifier | | **parent-id** | 16 hex digits | Identifier of the calling span | | **trace-flags** | 2 hex digits | Trace flags (e.g., `01` for sampled) | **Example:** * Windows * Linux ``` .\FastBCP.exe ` ... --traceparent "00-abcdef1234567890abcdef1234567890-1234567890abcdef-01" ` ... ``` ``` ./FastBCP \ ... --traceparent "00-abcdef1234567890abcdef1234567890-1234567890abcdef-01" \ ... ``` Tips Pass the traceparent from your orchestrator (Airflow, Kestra, CI/CD pipeline, or any OpenTelemetry-instrumented caller) so that FastBCP operations appear as child spans in your distributed traces. ## Configuring the OpenTelemetry Endpoint[​](#configuring-the-opentelemetry-endpoint "Direct link to Configuring the OpenTelemetry Endpoint") FastBCP uses the Serilog OpenTelemetry sink to export logs. You can configure the endpoint using either **environment variables** or a **`FastBCP_Settings.json`** file. ### Using Environment Variables[​](#using-environment-variables "Direct link to Using Environment Variables") Set the `OTEL_EXPORTER_OTLP_ENDPOINT` environment variable to point to your OpenTelemetry collector: * Windows * Linux ``` $env:OTEL_EXPORTER_OTLP_ENDPOINT = "http://localhost:4317" ``` ``` export OTEL_EXPORTER_OTLP_ENDPOINT="http://localhost:4317" ``` ### Using `FastBCP_Settings.json`[​](#using-fastbcp_settingsjson "Direct link to using-fastbcp_settingsjson") Add the OpenTelemetry sink to the `WriteTo` section of your `FastBCP_Settings.json` file. This gives you full control over the protocol, endpoint, and resource attributes. ``` { "Serilog": { "MinimumLevel": { "Default": "Debug", "Override": { "Microsoft": "Warning", "System": "Warning" } }, "Properties": { "LogDirectory": "logs" }, "Enrich": [ "FromLogContext", "WithEnvironmentUserName", "WithProcessId", "WithThreadId", "WithMachineName", "fulltargetname" ], "WriteTo": [ { "Name": "Console", "Args": { "restrictedToMinimumLevel": "Information", "outputTemplate": "{Timestamp:yyyy-MM-ddTHH:mm:ss.fff zzz} -|- {Application} -|- {Level:u12} -|- {fulltargetname} -|- TraceId={TraceId} SpanId={SpanId} -|- {Message}{NewLine}{Exception}", "theme": "Serilog.Sinks.SystemConsole.Themes.SystemConsoleTheme::Literate, Serilog.Sinks.Console" } }, { "Name": "OpenTelemetry", "Args": { "Endpoint": "http://localhost:4317", "Protocol": "Grpc", "ResourceAttributes": { "service.name": "FastBCP", "deployment.environment": "local-test" } } } ] } } ``` **Key settings in the OpenTelemetry sink:** | Setting | Description | | ---------------------- | ----------------------------------------------------------------------------- | | **Endpoint** | URL of your OpenTelemetry collector (default: `http://localhost:4317`) | | **Protocol** | Transport protocol: `Grpc` (default) or `HttpProtobuf` | | **ResourceAttributes** | Key-value pairs attached to every log entry (e.g., service name, environment) | Information The `TraceId` and `SpanId` fields in the console output template allow you to see trace correlation directly in the console logs, even without an OpenTelemetry backend. note When both an environment variable and a `FastBCP_Settings.json` configuration are present, the settings file takes precedence for the OpenTelemetry sink configuration. --- # Logging Overview ## Parameter Logs targets using FastBCP\_settings.json[​](#parameter-logs-targets-using-fastbcp_settingsjson "Direct link to Parameter Logs targets using FastBCP_settings.json") In FastBCP can log informations in 3 modes : * **[Console](/1.0/documentation/logging/logs-level.md)** * **[Database (MSSQL and PostgreSQL Only)](/1.0/documentation/logging/log-database.md)** * **[File (or Map)](/1.0/documentation/logging/log-files-names-mapping-using-variables.md)** FastBCP also supports **[OpenTelemetry](/1.0/documentation/logging/OpenTelemetry.md)** for distributed tracing and log export to any OpenTelemetry-compatible backend. Tips You can use several targets (sinks) at the same time. You can adapt what and where you want to log using the `FastBCP_settings.json` file. By default if no custom path is provided, FastBCP looks for the settings file in : * the current directory (the working directory) * the same directory where the FastBCP executable is located (the executable directory). If this file is not present, FastBCP will use the console log only. You can specify a custom path to the settings file using the `-f` or `--settingsfile` parameter. * Windows * Linux ``` .\FastBCP.exe ` --connectiontype mssql ` --server localhost ` --database "tpch10_collation_bin2" ` --trusted ` --query "SELECT * FROM dbo.orders" ` --directory "D:\temp" ` --fileoutput "mssql_orders.csv" ` --parallelmethod Ntile ` --distributekeycolumn "o_orderkey" ` --paralleldegree 7 ` --settingsfile "D:\logs\config\FastBCP_settings.json" ``` ``` ./FastBCP \ --connectiontype mssql \ --server localhost \ --database "tpch10_collation_bin2" \ --trusted \ --query "SELECT * FROM dbo.orders" \ --directory "/data/temp" \ --fileoutput "mssql_orders.csv" \ --parallelmethod Ntile \ --distributekeycolumn "o_orderkey" \ --paralleldegree 7 \ --settingsfile "/etc/fastbcp/FastBCP_settings.json" ``` Some settings files samples can be found in the [Configuration Examples](/1.0/documentation/logging/examples.md) page. --- # Installation ## Instructions[​](#instructions "Direct link to Instructions") * Windows * Linux * Docker/MacOS To start using FastBCP, first **[request a trial](https://arpe.io/get-trial?product=FastBCP)** to download the latest version. Once downloaded, unzip FastBCP to a directory of your choice. ``` Expand-Archive -Path .\FastBCP.zip -DestinationPath .\FastBCP ``` You can verify the installation by checking the version: ``` .\FastBCP.exe --version ``` To start using FastBCP, first **[request a trial](https://arpe.io/get-trial?product=FastBCP)** to download the latest version. Once downloaded, unzip FastBCP to a directory of your choice. ``` unzip FastBCP.zip -d FastBCP ``` On **Linux**, you need to give execution rights to the FastBCP binary: ``` chmod +x FastBCP ```
You can verify the installation by checking the version: ``` ./FastBCP --version ``` FastBCP is available as a Docker image on **[Docker Hub](https://hub.docker.com/repository/docker/arpeio/fastbcp/general)**. Pull the latest version: ``` docker pull arpeio/fastbcp ``` Or pull a specific version: ``` docker pull arpeio/fastbcp:v0.0.0 ``` You can verify the installation by checking the version: ``` docker run --rm arpeio/fastbcp:latest --version ```
**You are now ready to run FastBCP.** License Information After the trial period you will need a valid license. By default, FastBCP will try to find a `FastBCP.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 FastBCP : | 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 in order to use it with ODBC or OLEDB connection type. --- # Apache Airflow [Apache Airflow](https://airflow.apache.org/) is a powerful open-source platform for developing, scheduling, and monitoring batch-oriented workflows. FastBCP 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") FastBCP provides an official Docker image available on Docker Hub: **Image:** `arpeio/fastbcp:latest`
**Repository:** ## Prerequisites[​](#prerequisites "Direct link to Prerequisites") ### Install Docker Provider[​](#install-docker-provider "Direct link to Install Docker Provider") To use FastBCP 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. FastBCP integration requires connections for your source database and cloud storage. ### 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:** `host.docker.internal` (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) AWS Connection (for S3 Export)[​](#b-aws-connection-for-s3-export "Direct link to B) AWS Connection (for S3 Export)") Create an AWS connection to pass cloud credentials to the container: 1. Navigate to **Admin** → **Connections** in the Airflow UI 2. Click **+** to create a new connection 3. In the **Connection Type** dropdown, select **Amazon Web Services** 4. Configure the connection: **Connection Settings:** * **Connection Id:** `aws_fastbcp` (or your preferred name) * **Connection Type:** `Amazon Web Services` (select this from the dropdown) * **AWS Access Key ID:** Your AWS access key (in the Login field) * **AWS Secret Access Key:** Your AWS secret key (in the Password field) * **Extra:** `{"region_name":"eu-west-1"}` (or your preferred region) tip Airflow AWS providers commonly use `region_name` in Extra JSON. Alternatively, you can use `{"region":"eu-west-1"}` or `{"aws_default_region":"eu-west-1"}`. ## 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 FastBCP 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., `fastbcp_orders_mssql_to_s3.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 _mssql_parts(conn_id: str): """ Extract MSSQL connection details from Airflow connection. Expected Airflow connection (using ODBC): - Conn Id: mssql_tpch10 (conn_type: odbc) - Host: host.docker.internal - Port: 11433 - Login/Password: FastLogin / FastPassword - Extra JSON: {"database":"tpch10"} """ c = BaseHook.get_connection(conn_id) host = c.host port = c.port user = c.login pwd = c.password # For ODBC MSSQL, the database is typically stored in Extra JSON # (because the UI may not expose a dedicated "Database" field). db = c.extra_dejson.get("database") or c.schema if not db: raise ValueError( f"Connection '{conn_id}': missing database. Put it in Extra JSON " f'{{"database":"tpch10"}} (recommended for ODBC).' ) return host, port, user, pwd, db def _aws_env(conn_id: str): """ Extract AWS credentials from Airflow connection and map to container env vars. Expected Airflow AWS connection: - Conn Id: aws_fastbcp - Conn Type: Amazon Web Services - Login -> AWS_ACCESS_KEY_ID - Password -> AWS_SECRET_ACCESS_KEY - Extra -> {"region_name":"eu-west-1"} (or your region) Returns a dictionary with: - AWS_ACCESS_KEY_ID - AWS_SECRET_ACCESS_KEY - AWS_DEFAULT_REGION """ c = BaseHook.get_connection(conn_id) # Keys can be in login/password or in Extra JSON access_key = c.login or c.extra_dejson.get("aws_access_key_id") secret_key = c.password or c.extra_dejson.get("aws_secret_access_key") # Airflow AWS providers commonly use "region_name" in Extra JSON region = ( c.extra_dejson.get("region_name") or c.extra_dejson.get("region") or c.extra_dejson.get("aws_default_region") ) missing = [ k for k, v in { "AWS_ACCESS_KEY_ID": access_key, "AWS_SECRET_ACCESS_KEY": secret_key, "AWS_DEFAULT_REGION": region, }.items() if not v ] if missing: raise ValueError( f"Connection '{conn_id}': missing AWS fields: {missing}. " f"Set login/password and add Extra.region_name (or region)." ) return { "AWS_ACCESS_KEY_ID": access_key, "AWS_SECRET_ACCESS_KEY": secret_key, "AWS_DEFAULT_REGION": region, } with DAG( dag_id="fastbcp_export_orders_parquet_to_s3", start_date=datetime(2025, 1, 1), schedule=None, catchup=False, tags=["fastbcp", "mssql", "s3", "docker"], ) as dag: mssql_host, mssql_port, mssql_user, mssql_pwd, mssql_db = _mssql_parts("mssql_tpch10") aws_env = _aws_env("aws_fastbcp") DockerOperator( task_id="export_orders_parquet_to_s3", image="arpeio/fastbcp: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, environment=aws_env, command=[ "--connectiontype", "mssql", "--server", f"{mssql_host},{mssql_port}", "--user", mssql_user, "--password", mssql_pwd, "--database", mssql_db, "--sourceschema", "dbo", "--sourcetable", "orders", "--fileoutput", "orders.parquet", "--directory", "s3://fastbcp-export/orders/parquet", "--parallelmethod", "Ntile", "--paralleldegree", "12", "--distributekeycolumn", "o_orderkey", "--merge", "false", "--nobanner", ], network_mode="bridge", ) ``` **Key Parameters:** * `image`: Specifies the FastBCP Docker image * `docker_url`: Docker daemon endpoint * `environment`: Dictionary of environment variables (AWS credentials in this case) * `command`: List of FastBCP CLI arguments * `auto_remove`: Automatically remove the container after successful execution ### Helper Functions Explained[​](#helper-functions-explained "Direct link to Helper Functions Explained") The DAG includes two utility functions: #### `_mssql_parts(conn_id)`[​](#_mssql_partsconn_id "Direct link to _mssql_partsconn_id") Extracts connection details from an Airflow ODBC connection. This function: * Retrieves host, port, username, and password * Extracts the database name from the Extra JSON field * Returns all components needed to build the FastBCP connection string #### `_aws_env(conn_id)`[​](#_aws_envconn_id "Direct link to _aws_envconn_id") Extracts AWS credentials from an Airflow AWS connection and maps them to the environment variables expected by FastBCP: * `AWS_ACCESS_KEY_ID` * `AWS_SECRET_ACCESS_KEY` * `AWS_DEFAULT_REGION` This function supports multiple Extra JSON formats for flexibility. ## Logging[​](#logging "Direct link to Logging") All FastBCP 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., `fastbcp_export_orders_parquet_to_s3`) 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: * FastBCP 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 16:15:37] INFO - Settings file not found in the working directory nor in the executable directory [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.882 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- The "FastBCP_Settings.json" file does not exist. Using default settings. Console Only with loglevel=Information [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.892 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- FastBCP Trial – will expires on "2026‑03‑27" (24 day(s) left). [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.892 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Starting [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- FastBCP Version : "0.29.2.0" Architecture : "X64" - Framework : ".NET 8.0.24" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Internal Trace ID : "5ccea857-1538-4a28-8b1c-cfe5c51fbd43" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Internal Run ID : "5ccea857-1538-4a28-8b1c-cfe5c51fbd43" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- OS : "Debian GNU/Linux 13 (trixie)" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Connection Type : "mssql" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Source SqlInstance : "sql22,1433" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Source Database : "tpch" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Source Schema : "tpch10" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Source Table : "orders" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Trusted Connection : False [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- User : "migadmin" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Output File : "orders.parquet" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Output Directory : /data/parquet [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Degree : 12 [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Distribute Method : "Ntile" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Distribute Column : "o_orderkey" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Decimal Separator : "," [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Delimiter : "|" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Use quotes : False [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Date format: "yyyy-MM-dd" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Encoding : "UTF-8" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- No Header : False [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Timestamped : False [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Boolean Format : "automatic" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Cloud Profile : "" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Application Intent : "ReadOnly" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.906 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- file extension is ".parquet" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.909 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Encoding used : Unicode (UTF-8) - 65001 - utf-8 [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.965 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- 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=FastBCP;Application Intent=ReadOnly" [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.086 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- 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 16:15:38] INFO - 2026-03-02T15:15:38.110 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Get DataTypes with header end : Elapsed=6 ms [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Data Segments Computation Completed in 260 ms [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Distribute Column Type : "Int32" [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 0 : 1 : 1 - 5000001 or "o_orderkey" is null [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 1 : 2 : 5000002 - 10000002 [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 2 : 3 : 10000003 - 15000003 [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 3 : 4 : 15000004 - 20000004 [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 4 : 5 : 20000005 - 25000005 [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 5 : 6 : 25000006 - 30000006 [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 6 : 7 : 30000007 - 35000007 [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 7 : 8 : 35000032 - 40000032 [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 8 : 9 : 40000033 - 45000033 [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 9 : 10 : 45000034 - 50000034 [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 10 : 11 : 50000035 - 55000035 [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 11 : 12 : 55000036 - 60000000 [2026-03-02 16:15:46] INFO - 2026-03-02T15:15:46.611 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 002 for o_orderkey between 10000003 and 15000003 into /data/parquet/orders_chunk_002.parquet : 1250001 rows x 9 columns in 8234ms [2026-03-02 16:15:46] INFO - 2026-03-02T15:15:46.611 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 011 for o_orderkey between 55000036 and 60000000 into /data/parquet/orders_chunk_011.parquet : 1249989 rows x 9 columns in 8234ms [2026-03-02 16:15:46] INFO - 2026-03-02T15:15:46.790 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 003 for o_orderkey between 15000004 and 20000004 into /data/parquet/orders_chunk_003.parquet : 1250001 rows x 9 columns in 8413ms [2026-03-02 16:15:46] INFO - 2026-03-02T15:15:46.797 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 005 for o_orderkey between 25000006 and 30000006 into /data/parquet/orders_chunk_005.parquet : 1250001 rows x 9 columns in 8420ms [2026-03-02 16:15:46] INFO - 2026-03-02T15:15:46.936 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 008 for o_orderkey between 40000033 and 45000033 into /data/parquet/orders_chunk_008.parquet : 1250001 rows x 9 columns in 8559ms [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.139 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 010 for o_orderkey between 50000035 and 55000035 into /data/parquet/orders_chunk_010.parquet : 1250001 rows x 9 columns in 8763ms [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.154 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 000 for o_orderkey between 1 and 5000001 into /data/parquet/orders_chunk_000.parquet : 1250001 rows x 9 columns in 8777ms [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.247 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 009 for o_orderkey between 45000034 and 50000034 into /data/parquet/orders_chunk_009.parquet : 1250001 rows x 9 columns in 8870ms [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.308 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 006 for o_orderkey between 30000007 and 35000007 into /data/parquet/orders_chunk_006.parquet : 1250001 rows x 9 columns in 8931ms [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.309 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 001 for o_orderkey between 5000002 and 10000002 into /data/parquet/orders_chunk_001.parquet : 1250001 rows x 9 columns in 8932ms [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.363 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 007 for o_orderkey between 35000032 and 40000032 into /data/parquet/orders_chunk_007.parquet : 1250001 rows x 9 columns in 8986ms [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.366 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 004 for o_orderkey between 20000005 and 25000005 into /data/parquet/orders_chunk_004.parquet : 1250001 rows x 9 columns in 8989ms [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- files generation end : Elapsed=9257 ms - maxdop=12 [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total data rows : 15000000 [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total data columns : 9 [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total cells : 135000000 [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Throughput rows : 1568531 rows/s [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Throughput cells : 14116787 cells/s [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total time : Elapsed=9563 ms [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total data rows : 15000000 [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total data columns : 9 [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total cells : 135000000 [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Final Throughput rows : 1568482 rows/s [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Final Throughput cells : 14116346 cells/s [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Completed Load [2026-03-02 16:15:47] INFO - Task instance in success state [2026-03-02 16:15:47] INFO - Previous state of the Task instance: TaskInstanceState.RUNNING [2026-03-02 16:15:47] INFO - Task operator: ``` --- # Docker Minimal, production-ready container image to run FastBCP, a high-performance bulk copy 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/FastBCP` * **Repository**: [FastBCP-Image on GitHub](https://github.com/arpe-io/FastBCP-Image) * **DockerHub**: [arpeio/fastbcp](https://hub.docker.com/repository/docker/arpeio/fastbcp/general) * Published automatically via GitHub Actions for each new release and weekly security updates ## Prerequisites[​](#prerequisites "Direct link to Prerequisites") * Docker 24+ (or Podman) * FastBCP Linux x64 ≥ 0.28.0 binary (for build only) * Optional: `FastBCP_Settings.json` to mount/copy into `/config` for custom logging settings ## Using the Prebuilt Image from DockerHub[​](#using-the-prebuilt-image-from-dockerhub "Direct link to Using the Prebuilt Image from DockerHub") You can use a prebuilt image from DockerHub that already includes the FastBCP binary. You must provide your own license at runtime. ### Available Tags[​](#available-tags "Direct link to Available Tags") * **Version-specific tags** are aligned with FastBCP releases (e.g., `v0.28.3`) * **`latest` tag** always points to the most recent FastBCP version ### Automatic Updates[​](#automatic-updates "Direct link to Automatic Updates") * **New releases**: Images are automatically built when new FastBCP versions are released * **Security updates**: The latest version of each minor branch (e.g., latest v0.27.x, v0.28.x, v0.29.x) is automatically rebuilt weekly (every Monday) with the latest base image and security patches * This ensures that all actively used versions remain secure without breaking compatibility * Example: If you use `v0.28.8` (latest of 0.28.x branch), it gets security updates even after `v0.29.0` is released ### Pull the Image[​](#pull-the-image "Direct link to Pull the Image") ``` # Latest version docker pull arpeio/fastbcp:latest # Specific version docker pull arpeio/fastbcp:v0.28.3 ``` ### Basic Commands[​](#basic-commands "Direct link to Basic Commands") ``` # Get command line help docker run --rm arpeio/fastbcp:latest # Check version docker run --rm arpeio/fastbcp:latest --version ``` ### License Requirement[​](#license-requirement "Direct link to License Requirement") Since version 0.28.0, pass the license content directly via `--license "…"`. ``` export licenseContent=$(cat ./FastBCP.lic) # Use $licenseContent in your docker run commands docker run --rm arpeio/fastbcp: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. ## Usage Examples[​](#usage-examples "Direct link to Usage Examples") The Docker image uses the FastBCP binary as its entrypoint, so you can run it directly with parameters as defined in the [FastBCP documentation](/latest/.md). ### Example 1: SQL Server → Parquet on S3[​](#example-1-sql-server--parquet-on-s3 "Direct link to Example 1: SQL Server → Parquet on S3") ``` export licenseContent=$(cat ./FastBCP.lic) docker run --rm \ -e AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID} \ -e AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY} \ -e AWS_REGION=${AWS_REGION} \ arpeio/fastbcp:latest \ --connectiontype "mssql" \ --server "host.docker.internal,1433" \ --user "FastUser" \ --password "FastPassword" \ --database "tpch_test" \ --query "SELECT * FROM dbo.orders WHERE year(o_orderdate)=1998" \ --fileoutput "orders.parquet" \ --directory "s3://arpeioftoutput/dockertest/" \ --paralleldegree 12 \ --parallelmethod "Ntile" \ --distributekeycolumn "o_orderkey" \ --merge false \ --license "$licenseContent" ``` ### Example 2: SQL Server → CSV with Custom Logging[​](#example-2-sql-server--csv-with-custom-logging "Direct link to Example 2: SQL Server → CSV with Custom Logging") ``` export licenseContent=$(cat ./FastBCP.lic) docker run --rm \ -v fastbcp-config:/config \ -v fastbcp-data:/data \ -v fastbcp-logs:/logs \ arpeio/fastbcp:latest \ --settingsfile "/config/FastBCP_Settings_Logs_To_Files.json" \ --connectiontype "mssql" \ --server "host.docker.internal,1433" \ --user "FastUser" \ --password "FastPassword" \ --database "tpch_test" \ --query "SELECT * FROM dbo.orders WHERE year(o_orderdate)=1998" \ --fileoutput "orders.csv" \ --directory "/data/orders/csv" \ --delimiter "|" \ --decimalseparator "." \ --dateformat "yyyy-MM-dd HH:mm:ss" \ --paralleldegree 12 \ --parallelmethod "Ntile" \ --distributekeycolumn "o_orderkey" \ --merge false \ --license "$licenseContent" ``` ### Example 3: PostgreSQL → Parquet on Azure Data Lake Storage (ADLS)[​](#example-3-postgresql--parquet-on-azure-data-lake-storage-adls "Direct link to Example 3: PostgreSQL → Parquet on Azure Data Lake Storage (ADLS)") ``` export licenseContent=$(cat ./FastBCP.lic) export adlscontainer="arpeioadlseu" docker run --rm \ -e AZURE_CLIENT_ID=${AZURE_CLIENT_ID} \ -e AZURE_TENANT_ID=${AZURE_TENANT_ID} \ -e AZURE_CLIENT_SECRET=${AZURE_CLIENT_SECRET} \ arpeio/fastbcp:latest \ --connectiontype "pgcopy" \ --server "host.docker.internal:15432" \ --user "FastUser" \ --password "FastPassword" \ --database "tpch" \ --sourceschema "tpch_10" \ --sourcetable "orders" \ --query "SELECT * FROM tpch_10.orders WHERE o_orderdate >= '1998-01-01' AND o_orderdate < '1999-01-01'" \ --fileoutput "orders.parquet" \ --directory "abfss://${adlscontainer}.dfs.core.windows.net/fastbcpoutput/testdfs/orders" \ --paralleldegree -2 \ --parallelmethod "Ctid" \ --license "$licenseContent" ``` ### Example 4: Oracle → Parquet on Google Cloud Storage (GCS)[​](#example-4-oracle--parquet-on-google-cloud-storage-gcs "Direct link to Example 4: Oracle → Parquet on Google Cloud Storage (GCS)") ``` export licenseContent=$(cat ./FastBCP.lic) export gcsbucket="arpeio-gcs-bucket" export GOOGLE_APPLICATION_CREDENTIALS_JSON=$(cat ./gcp-credentials.json) docker run --rm \ -e GOOGLE_APPLICATION_CREDENTIALS="${GOOGLE_APPLICATION_CREDENTIALS_JSON}" \ arpeio/fastbcp:latest \ --connectiontype "oraodp" \ --server "host.docker.internal:1521/FREEPDB1" \ --user "TPCH_IN" \ --password "TPCH_IN" \ --database "FREEPDB1" \ --sourceschema "TPCH_IN" \ --sourcetable "ORDERS" \ --fileoutput "orders.parquet" \ --directory "gs://${gcsbucket}/fastbcpoutput/testgs/orders" \ --parallelmethod "Rowid" \ --paralleldegree -2 \ --license "$licenseContent" ``` ## Volumes[​](#volumes "Direct link to Volumes") The Docker image declares several volumes to organize data and configuration: ``` VOLUME ["/config", "/data", "/work", "/logs"] ``` ### Volume Configuration and Access Modes[​](#volume-configuration-and-access-modes "Direct link to Volume Configuration and Access Modes") | **Volume** | **Purpose** | **Access Mode** | **Notes** | | ---------- | ------------------------------------------------------------------- | --------------------- | ----------------------------------------------- | | `/config` | Contains user-provided configuration files (e.g., Serilog settings) | Read-only / Read-many | Shared across multiple containers; not modified | | `/data` | Input/output data directory | 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 FastBCP Logging[​](#configuring-fastbcp-logging "Direct link to Configuring FastBCP Logging") info Available starting from version v0.28.3 FastBCP supports custom logging configuration through an external Serilog settings file in JSON format. This allows you to control how and where logs are written — to the console, to files, or dynamically per run. You can download an example logging settings file directly from GitHub: [FastBCP\_Settings\_Logs\_To\_Files.json](https://raw.githubusercontent.com/aetperf/FastBCP-Image/main/FastBCP_Settings_Logs_To_Files.json) Custom settings files must be mounted into the container under the `/config` directory. ### 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") The following configuration is recommended for most production or Airflow environments. It writes: * Logs to the console for real-time visibility * Run summary logs to `/airflow/xcom/return.json` for Airflow integration * Per-run logs under `/logs`, automatically named with `{LogTimestamp}` and `{TraceId}` ``` { "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": "FastBCP" } } } ``` Important Notes * If a target directory (such as `/logs` or `/airflow/xcom`) does not exist, FastBCP 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") You can use the following placeholders to dynamically generate log file names or directories: | **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") Your Serilog configuration file (for example, `FastBCP_Settings_Logs_To_Files.json`) must be placed in `/config`, either by mounting a local directory or by using a Docker named volume. Example with named volumes: ``` # First, copy your config file to a volume location cp ~/FastBCP_Settings_Logs_To_Files.json /volumes/fastbcp-config/ # Then run FastBCP with mounted volumes docker run --rm \ -v fastbcp-config:/config \ -v fastbcp-data:/data \ -v fastbcp-logs:/logs \ arpeio/fastbcp:latest \ --settingsfile "/config/FastBCP_Settings_Logs_To_Files.json" \ --connectiontype "mssql" \ --server "host.docker.internal,1433" \ --user "FastUser" \ --password "FastPassword" \ --database "tpch_test" \ --query "SELECT * FROM dbo.orders" \ --fileoutput "orders.csv" \ --directory "/data" \ --paralleldegree 12 \ --parallelmethod "Ntile" \ --distributekeycolumn "o_orderkey" \ --merge false \ --license "$licenseContent" ``` If the `--settingsfile` argument is not provided, FastBCP will use its built-in default logging configuration. --- # Kestra [Kestra](https://kestra.io/) is a powerful open-source orchestration platform that can be used to automate and schedule FastBCP data export workflows. FastBCP can be seamlessly integrated into Kestra flows using its Docker image. ## Docker Image[​](#docker-image "Direct link to Docker Image") FastBCP provides an official Docker image available on Docker Hub: **Image:** `arpeio/fastbcp:latest`
**Repository:** ## Integration with Docker Run Plugin[​](#integration-with-docker-run-plugin "Direct link to Integration with Docker Run Plugin") The [`io.kestra.plugin.docker.Run`](https://kestra.io/plugins/plugin-docker/io.kestra.plugin.docker.run) plugin provides a direct way to execute FastBCP commands in a Docker container. This is the recommended method for integrating FastBCP with Kestra. ### Basic Example[​](#basic-example "Direct link to Basic Example") ``` id: fastbcp_export_orders namespace: arpe.io tasks: - id: export_orders_parquet type: io.kestra.plugin.docker.Run containerImage: arpeio/fastbcp:latest host: "tcp://host.docker.internal:2375" commands: - --connectiontype - mssql - --server - "host.docker.internal,11433" - --user - FastLogin - --password - FastPassword - --database - tpch10 - --sourceschema - dbo - --sourcetable - orders - --fileoutput - orders.parquet - --directory - /data/export - --parallelmethod - Ntile - --paralleldegree - "12" - --distributekeycolumn - o_orderkey - --nobanner ``` **Key Parameters:** * `containerImage`: Specifies the FastBCP Docker image * `host`: Docker daemon endpoint (required for Docker Run plugin) * `commands`: Array of FastBCP CLI arguments ## Environment Variables for Cloud Storage[​](#environment-variables-for-cloud-storage "Direct link to Environment Variables for Cloud Storage") When exporting data to cloud storage (AWS S3, Azure Blob, Google Cloud Storage), you can pass cloud credentials using environment variables (see [Cloud Connectivity](/1.0/documentation/cloud-connectivity/overview.md) for more details). ### Example with AWS S3[​](#example-with-aws-s3 "Direct link to Example with AWS S3") ``` id: fastbcp_export_to_s3 namespace: arpe.io tasks: - id: export_orders_to_s3 type: io.kestra.plugin.docker.Run containerImage: arpeio/fastbcp:latest host: "tcp://host.docker.internal:2375" env: AWS_ACCESS_KEY_ID: "AKIAIOSFODNN7EXAMPLE" AWS_SECRET_ACCESS_KEY: "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY" AWS_DEFAULT_REGION: "us-east-1" commands: - --connectiontype - mssql - --server - "host.docker.internal,11433" - --user - FastLogin - --password - FastPassword - --database - tpch10 - --sourceschema - dbo - --sourcetable - orders - --fileoutput - orders.parquet - --directory - s3://my-bucket/exports/orders - --parallelmethod - Ntile - --paralleldegree - "12" - --distributekeycolumn - o_orderkey - --merge - "false" - --nobanner ``` ## 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, connection strings, and cloud credentials, 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: * `FASTBCP_MSSQL_USER` * `FASTBCP_MSSQL_PASSWORD` * `FASTBCP_AWS_ACCESS_KEY_ID` * `FASTBCP_AWS_SECRET_ACCESS_KEY` * `FASTBCP_AWS_DEFAULT_REGION` ### Example with Secrets[​](#example-with-secrets "Direct link to Example with Secrets") ``` id: fastbcp_export_orders_s3_secret namespace: arpe.io tasks: - id: export_orders_parquet_to_s3 type: io.kestra.plugin.docker.Run containerImage: arpeio/fastbcp:latest host: "tcp://host.docker.internal:2375" env: AWS_ACCESS_KEY_ID: "{{ secret('FASTBCP_AWS_ACCESS_KEY_ID') }}" AWS_SECRET_ACCESS_KEY: "{{ secret('FASTBCP_AWS_SECRET_ACCESS_KEY') }}" AWS_DEFAULT_REGION: "{{ secret('FASTBCP_AWS_DEFAULT_REGION') }}" commands: - --connectiontype - mssql - --server - "host.docker.internal,11433" - --user - "{{ secret('FASTBCP_MSSQL_USER') }}" - --password - "{{ secret('FASTBCP_MSSQL_PASSWORD') }}" - --database - tpch10 - --sourceschema - dbo - --sourcetable - orders - --fileoutput - orders.parquet - --directory - s3://fastbcp-export/orders/parquet - --parallelmethod - Ntile - --paralleldegree - "12" - --distributekeycolumn - o_orderkey - --merge - "false" - --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 FastBCP 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 export process, including configuration parameters, connection details, data export progress, and performance metrics. ### Example Log Output[​](#example-log-output "Direct link to Example Log Output") ``` 2026-03-02T15:15:37.882 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- The "FastBCP_Settings.json" file does not exist. Using default settings. Console Only with loglevel=Information 2026-03-02 16:15:37.8922026-03-02T15:15:37.892 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- FastBCP Trial – will expires on "2026‑03‑27" (24 day(s) left). 2026-03-02 16:15:37.8922026-03-02T15:15:37.892 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Starting 2026-03-02 16:15:37.8932026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- FastBCP Version : "0.29.2.0" Architecture : "X64" - Framework : ".NET 8.0.24" 2026-03-02 16:15:37.8932026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Internal Trace ID : "5ccea857-1538-4a28-8b1c-cfe5c51fbd43" 2026-03-02 16:15:37.8932026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Internal Run ID : "5ccea857-1538-4a28-8b1c-cfe5c51fbd43" 2026-03-02 16:15:37.8932026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- OS : "Debian GNU/Linux 13 (trixie)" 2026-03-02 16:15:37.8932026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Connection Type : "mssql" 2026-03-02 16:15:37.8932026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Source SqlInstance : "sql22,1433" 2026-03-02 16:15:37.8932026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Source Database : "tpch" 2026-03-02 16:15:37.8932026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Source Schema : "tpch10" 2026-03-02 16:15:37.8932026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Source Table : "orders" 2026-03-02 16:15:37.8932026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Trusted Connection : False 2026-03-02 16:15:37.8932026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- User : "migadmin" 2026-03-02 16:15:37.8932026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Output File : "orders.parquet" 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Output Directory : /data/parquet 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Degree : 12 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Distribute Method : "Ntile" 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Distribute Column : "o_orderkey" 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Decimal Separator : "," 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Delimiter : "|" 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Use quotes : False 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Date format: "yyyy-MM-dd" 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Encoding : "UTF-8" 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- No Header : False 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Timestamped : False 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Boolean Format : "automatic" 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Cloud Profile : "" 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Application Intent : "ReadOnly" 2026-03-02 16:15:37.9062026-03-02T15:15:37.906 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- file extension is ".parquet" 2026-03-02 16:15:37.9092026-03-02T15:15:37.909 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Encoding used : Unicode (UTF-8) - 65001 - utf-8 2026-03-02 16:15:37.9652026-03-02T15:15:37.965 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- 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=FastBCP;Application Intent=ReadOnly" 2026-03-02 16:15:38.0862026-03-02T15:15:38.086 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- 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 16:15:38.1102026-03-02T15:15:38.110 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Get DataTypes with header end : Elapsed=6 ms 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Data Segments Computation Completed in 260 ms 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Distribute Column Type : "Int32" 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 0 : 1 : 1 - 5000001 or "o_orderkey" is null 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 1 : 2 : 5000002 - 10000002 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 2 : 3 : 10000003 - 15000003 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 3 : 4 : 15000004 - 20000004 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 4 : 5 : 20000005 - 25000005 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 5 : 6 : 25000006 - 30000006 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 6 : 7 : 30000007 - 35000007 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 7 : 8 : 35000032 - 40000032 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 8 : 9 : 40000033 - 45000033 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 9 : 10 : 45000034 - 50000034 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 10 : 11 : 50000035 - 55000035 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 11 : 12 : 55000036 - 60000000 2026-03-02 16:15:46.6112026-03-02T15:15:46.611 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 002 for o_orderkey between 10000003 and 15000003 into /data/parquet/orders_chunk_002.parquet : 1250001 rows x 9 columns in 8234ms 2026-03-02 16:15:46.6112026-03-02T15:15:46.611 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 011 for o_orderkey between 55000036 and 60000000 into /data/parquet/orders_chunk_011.parquet : 1249989 rows x 9 columns in 8234ms 2026-03-02 16:15:46.7902026-03-02T15:15:46.790 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 003 for o_orderkey between 15000004 and 20000004 into /data/parquet/orders_chunk_003.parquet : 1250001 rows x 9 columns in 8413ms 2026-03-02 16:15:46.7972026-03-02T15:15:46.797 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 005 for o_orderkey between 25000006 and 30000006 into /data/parquet/orders_chunk_005.parquet : 1250001 rows x 9 columns in 8420ms 2026-03-02 16:15:46.9362026-03-02T15:15:46.936 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 008 for o_orderkey between 40000033 and 45000033 into /data/parquet/orders_chunk_008.parquet : 1250001 rows x 9 columns in 8559ms 2026-03-02 16:15:47.1392026-03-02T15:15:47.139 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 010 for o_orderkey between 50000035 and 55000035 into /data/parquet/orders_chunk_010.parquet : 1250001 rows x 9 columns in 8763ms 2026-03-02 16:15:47.1542026-03-02T15:15:47.154 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 000 for o_orderkey between 1 and 5000001 into /data/parquet/orders_chunk_000.parquet : 1250001 rows x 9 columns in 8777ms 2026-03-02 16:15:47.2472026-03-02T15:15:47.247 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 009 for o_orderkey between 45000034 and 50000034 into /data/parquet/orders_chunk_009.parquet : 1250001 rows x 9 columns in 8870ms 2026-03-02 16:15:47.3082026-03-02T15:15:47.308 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 006 for o_orderkey between 30000007 and 35000007 into /data/parquet/orders_chunk_006.parquet : 1250001 rows x 9 columns in 8931ms 2026-03-02 16:15:47.3092026-03-02T15:15:47.309 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 001 for o_orderkey between 5000002 and 10000002 into /data/parquet/orders_chunk_001.parquet : 1250001 rows x 9 columns in 8932ms 2026-03-02 16:15:47.3632026-03-02T15:15:47.363 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 007 for o_orderkey between 35000032 and 40000032 into /data/parquet/orders_chunk_007.parquet : 1250001 rows x 9 columns in 8986ms 2026-03-02 16:15:47.3662026-03-02T15:15:47.366 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 004 for o_orderkey between 20000005 and 25000005 into /data/parquet/orders_chunk_004.parquet : 1250001 rows x 9 columns in 8989ms 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- files generation end : Elapsed=9257 ms - maxdop=12 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total data rows : 15000000 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total data columns : 9 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total cells : 135000000 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Throughput rows : 1568531 rows/s 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Throughput cells : 14116787 cells/s 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total time : Elapsed=9563 ms 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total data rows : 15000000 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total data columns : 9 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total cells : 135000000 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Final Throughput rows : 1568482 rows/s 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Final Throughput cells : 14116346 cells/s 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Completed Load ``` --- # PostgreSQL The **pg\_fastbcp** extension allows you to run the FastBCP tool directly from an SQL function, enabling fast data export from databases to various formats (CSV, Parquet) and cloud storage directly from PostgreSQL. ## Extension Overview[​](#extension-overview "Direct link to Extension Overview") * **Repository**: [arpe-io/pg\_fastbcp](https://github.com/arpe-io/pg_fastbcp) * **License**: MIT * **Latest version**: v0.30.0 * **Platforms**: Linux (Debian/Ubuntu) and Windows ![pg\_fastbcp Demo](/assets/images/pg_fastbcp-e5e0b5519f8de77a14a8f8cba33d251c.gif) ## Features[​](#features "Direct link to Features") * **Native PostgreSQL Integration**: Execute FastBCP commands directly from SQL * **Secure Password Management**: Built-in encryption for sensitive credentials * **Detailed Result Return**: Get export statistics and performance metrics as SQL results * **Cross-Platform**: Available for both Linux and Windows environments * **Flexible Configuration**: Support for all FastBCP parameters * **Multiple Output Formats**: Export to CSV, Parquet, or directly to cloud storage (AWS S3, Azure Blob, Google Cloud Storage, OneLake) ## Prerequisites[​](#prerequisites "Direct link to Prerequisites") * PostgreSQL 15, 16, 17, or 18 * Sudo/Administrator privileges to install the extension * Valid FastBCP license (request a [trial license](https://arpe.io/get-trial?product=FastBCP)) * FastBCP 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 `FastBCP` 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\_fastbcp releases page](https://github.com/arpe-io/pg_fastbcp/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_fastbcp.so` * `pg_fastbcp.control` * `pg_fastbcp--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_fastbcp.so /usr/lib/postgresql//lib/ sudo cp pg_fastbcp.control pg_fastbcp--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 FastBCP binary sudo chmod +x /path/to/FastBCP sudo chown postgres:postgres /path/to/FastBCP sudo chmod 750 /path/to/FastBCP # 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_fastbcp.dll` * `pg_fastbcp.control` * `pg_fastbcp--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_fastbcp.dll` file into the `lib` folder 4. Copy the `pg_fastbcp.control` and `pg_fastbcp--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 `FastBCP.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_fastbcp CASCADE; ``` ### Create the extension[​](#create-the-extension "Direct link to Create the extension") ``` CREATE EXTENSION pg_fastbcp CASCADE; ``` ## Functions[​](#functions "Direct link to Functions") ### pg\_fastbcp\_encrypt[​](#pg_fastbcp_encrypt "Direct link to pg_fastbcp_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_RunFastBcp_secure` function will automatically decrypt any values passed to its `password` argument. **Syntax:** ``` pg_fastbcp_encrypt(text_to_encrypt text) RETURNS text ``` **Example:** ``` SELECT pg_fastbcp_encrypt('MySecurePassword'); -- Returns: A base64-encoded encrypted string, e.g., "PgP...base64encodedstring==" ``` ### xp\_RunFastBcp\_secure[​](#xp_runfastbcp_secure "Direct link to xp_RunFastBcp_secure") This is the main function to execute the FastBCP tool. It takes various parameters to configure the data export operation. Password arguments (`password`) will be automatically decrypted. **Syntax:** ``` xp_RunFastBcp_secure( connectiontype text DEFAULT NULL, sourceconnectstring text DEFAULT NULL, dsn text DEFAULT NULL, provider text DEFAULT NULL, server text DEFAULT NULL, user_ text DEFAULT NULL, password text DEFAULT NULL, trusted boolean DEFAULT NULL, database_name text DEFAULT NULL, applicationintent text DEFAULT NULL, fileinput text DEFAULT NULL, query text DEFAULT NULL, sourceschema text DEFAULT NULL, sourcetable text DEFAULT NULL, fileoutput text DEFAULT NULL, directory text DEFAULT NULL, timestamped boolean DEFAULT NULL, encoding text DEFAULT NULL, delimiter text DEFAULT NULL, usequotes boolean DEFAULT NULL, dateformat text DEFAULT NULL, decimalseparator text DEFAULT NULL, boolformat text DEFAULT NULL, noheader boolean DEFAULT NULL, parquetcompression text DEFAULT NULL, cloudprofile text DEFAULT NULL, parallelmethod text DEFAULT NULL, paralleldegree integer DEFAULT NULL, distributekeycolumn text DEFAULT NULL, datadrivenquery text DEFAULT NULL, merge boolean DEFAULT NULL, loglevel text DEFAULT NULL, runid text DEFAULT NULL, settingsfile text DEFAULT NULL, config text DEFAULT NULL, nobanner boolean DEFAULT NULL, license text DEFAULT NULL, fastbcp_path text DEFAULT NULL ) RETURNS TABLE ( exit_code integer, output text, total_rows bigint, total_columns integer, total_time bigint ) ``` ## Usage Examples[​](#usage-examples "Direct link to Usage Examples") ### Linux Example - PostgreSQL to CSV[​](#linux-example---postgresql-to-csv "Direct link to Linux Example - PostgreSQL to CSV") Export data from PostgreSQL to CSV files: ``` SELECT * FROM xp_RunFastBcp_secure( connectiontype := 'pgsql', server := 'localhost:5432', user_ := 'postgres', password := pg_fastbcp_encrypt('MyActualPassword'), database_name := 'tpch', sourceschema := 'tpch_1', sourcetable := 'orders', fileoutput := 'orders.csv', directory := '/tmp/export', paralleldegree := 4, parallelmethod := 'Ntile', distributekeycolumn := 'o_orderkey', noheader := false, delimiter := ',', license := '/tmp/FastBCP_linux-x64_v0.30.0/FastBCP.lic', loglevel := 'information', nobanner := false, fastbcp_path := '/tmp/FastBCP_linux-x64_v0.30.0' ); ``` ## 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 FastBCP process. | | `output` | text | The full log output from the FastBCP tool. | | `total_rows` | bigint | The total number of rows transferred. | | `total_columns` | integer | The total number of columns transferred. | | `total_time` | bigint | The total execution time in milliseconds. | ## Output[​](#output "Direct link to Output") You can view the full FastBCP output using the `output` column returned by the function. ## Resources[​](#resources "Direct link to Resources") * [pg\_fastbcp GitHub Repository](https://github.com/arpe-io/pg_fastbcp) * [FastBCP Documentation](https://fastbcp-docs.arpe.io/latest/integration/postgresql-integration) * [Get a Trial License](https://arpe.io/get-trial?product=FastBCP) * [Report Issues](https://github.com/arpe-io/pg_fastbcp/issues) --- # Release Notes 0.32 ## New Features[​](#new-features "Direct link to New Features") ### OpenTelemetry Support[​](#opentelemetry-support "Direct link to OpenTelemetry Support") FastBCP now supports [OpenTelemetry](https://opentelemetry.io/) for distributed tracing and log correlation. **New parameter:** * `--traceparent`: Accept a [W3C Trace Context](https://www.w3.org/TR/trace-context/) traceparent identifier from an external caller, enabling end-to-end trace correlation across distributed systems. **OpenTelemetry log export:** * Logs can be exported to any OpenTelemetry-compatible collector (e.g., Jaeger, Zipkin, Grafana Tempo) via the Serilog OpenTelemetry sink. * Configuration through environment variables or the `FastBCP_Settings.json` file. See the [OpenTelemetry logging documentation](/1.0/documentation/logging/OpenTelemetry.md) for setup details and examples. ### Gzip Compression[​](#gzip-compression "Direct link to Gzip Compression") **Streamed gzip compression** is now possible by adding `.gz` to file extension. For csv, tsv and json only. * use `--fileoutput file.csv.gz` ### BREAKING CHANGE[​](#breaking-change "Direct link to BREAKING CHANGE") * `--merge` default is Switched from `true` to `false` ### Others[​](#others "Direct link to Others") * Better datatypes coverage for csv and json --- # Release Notes 1.0 ## What's Changed[​](#whats-changed "Direct link to What's Changed") ### ADBC Parquet Export - 2x Faster Performance[​](#adbc-parquet-export---2x-faster-performance "Direct link to ADBC Parquet Export - 2x Faster Performance") FastBCP now supports ADBC (Arrow Database Connectivity) for Parquet exports via the `--connectiontype adbc_mssql` connector, powered by ArrowTDS. **Performance improvements:** * 2x faster Parquet generation compared to traditional methods * Native columnar data format (Arrow) eliminates conversion overhead * Optimized for SQL Server data types **Usage:** ``` fastbcp --server myserver.database.windows.net \ --database MyDatabase \ --query "SELECT * FROM Sales.Orders" \ --connectiontype adbc_mssql \ --fileoutput "orders.parquet" ``` See [Connection Parameters documentation](/latest/documentation/cli/connection_parameters.md#connection-type) for more details. ### Buffered Cloud Uploads[​](#buffered-cloud-uploads "Direct link to Buffered Cloud Uploads") New environment variables enable buffered cloud uploads for significantly improved Azure Data Lake Storage and OneLake performance. **New environment variables:** * `FASTBCP_CLOUD_ISBUFFERED`: When `True`, ADLS/OneLake writes are buffered to a local temp file, then uploaded in parallel. When `False`, data is streamed directly to the cloud. * `FASTBCP_TMPPATH`: Base directory for temporary files created during buffered cloud uploads. Default: System temp (`%TEMP%` / `$TMPDIR`). * `FASTBCP_CLOUD_MAXUPLOADTHREAD_PER_STREAM`: Maximum number of parallel upload threads per cloud stream. Default: `8` if `parallelmethod=None`, `2` otherwise. * `FASTBCP_UID_STRING_CASING`: Controls UID-to-string casing. Values: `lower` or `upper`. Default: `lower` (RFC 4122). **Example — Buffered cloud uploads:** ``` # Enable buffered uploads for Azure $env:FASTBCP_CLOUD_ISBUFFERED = "True" $env:FASTBCP_TMPPATH = "D:\temp\fastbcp" fastbcp --server myserver --database MyDB --sourceschema Sales --sourcetable Orders ` --fileoutput "abfss://container@storage.dfs.core.windows.net/orders.parquet" ``` **Example — UID string casing (PowerShell):** ``` # Output UIDs in uppercase $env:FASTBCP_UID_STRING_CASING = "upper" fastbcp --server myserver --database MyDB --sourcetable MyTable --fileoutput "output.parquet" ``` **Example — UID string casing (Linux):** ``` # Output UIDs in uppercase export FASTBCP_UID_STRING_CASING=upper fastbcp --server myserver --database MyDB --sourcetable MyTable --fileoutput "output.parquet" ``` See the [Environment Variables](/1.0/documentation/environment-variables/overview.md) documentation for detailed configuration. ### Move to .NET 10[​](#move-to-net-10 "Direct link to Move to .NET 10") FastBCP now runs on .NET 10: * Performance improvements in runtime and GC * Enhanced security and stability * Continued long-term support * Compatibility: Windows, Linux, macOS (x64, ARM64) ### Improved SBOM Generation[​](#improved-sbom-generation "Direct link to Improved SBOM Generation") Enhanced Software Bill of Materials (SBOM) generation for better supply chain security and compliance. ### SLSA Build Provenance[​](#slsa-build-provenance "Direct link to SLSA Build Provenance") Added SLSA (Supply-chain Levels for Software Artifacts) build provenance in CI for enhanced supply chain security and compliance. ### Early Cleanup of Temp Files[​](#early-cleanup-of-temp-files "Direct link to Early Cleanup of Temp Files") When uploading to cloud storage, temporary files are now cleaned up earlier in the process to reduce disk space requirements. ## ArrowTDS ARPE.IO Driver[​](#arrowtds-arpeio-driver "Direct link to ArrowTDS ARPE.IO Driver") FastBCP 1.0 includes the ArrowTDS ARPE.IO driver for high-performance ADBC connectivity. **Key features:** * TDS 7.4 protocol compatibility * Native Arrow columnar format support * Optimized for SQL Server 2012 and later --- # Sitemap ## [Installation](/1.0/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](/1.0/.md) * CLI Reference * [Authentication](/1.0/documentation/cli/authentication.md) * [Connection Parameters](/1.0/documentation/cli/connection_parameters.md) * [Source Info](/1.0/documentation/cli/source_info.md) * [Output Info](/1.0/documentation/cli/output_info.md) * [CSV Formatting](/1.0/documentation/cli/csv_formatting.md) * [Parquet Formatting](/1.0/documentation/cli/parquet_formatting.md) * [Cloud Options](/1.0/documentation/cli/cloud_options.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) * [FASTBCP\_CLOUD\_ISBUFFERED](/1.0/documentation/environment-variables/fastbcp-cloud-isbuffered.md) * [FASTBCP\_TMPPATH](/1.0/documentation/environment-variables/fastbcp-tmppath.md) * [FASTBCP\_CLOUD\_MAXUPLOADTHREAD\_PER\_STREAM](/1.0/documentation/environment-variables/fastbcp-cloud-maxuploadthread-per-stream.md) * [FASTBCP\_RGSIZE](/1.0/documentation/environment-variables/fastbcp-rgsize.md) * [FASTBCP\_UID\_STRING\_CASING](/1.0/documentation/environment-variables/fastbcp-uid-string-casing.md) * [FASTBCP\_DATEFORMAT](/1.0/documentation/environment-variables/fastbcp-dateformat.md) * Cloud Connectivity * [Overview](/1.0/documentation/cloud-connectivity/overview.md) * [AWS S3](/1.0/documentation/cloud-connectivity/aws-s3.md) * [Azure](/1.0/documentation/cloud-connectivity/azure.md) * [Google Cloud Storage](/1.0/documentation/cloud-connectivity/google-cloud.md) * [OneLake](/1.0/documentation/cloud-connectivity/onelake.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) * [OpenTelemetry](/1.0/documentation/logging/OpenTelemetry.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) * [Output Formats](/1.0/documentation/examples/output-formats.md) * [Cloud Storage](/1.0/documentation/examples/cloud-storage.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) ## Datatypes Conversion[​](#datatypes-conversion "Direct link to Datatypes Conversion") * [Overview](/1.0/datatypes-conversion/overview.md) * SQL Server * [mssql](/1.0/datatypes-conversion/mssql/parquet.md) * [adbc\_mssql](/1.0/datatypes-conversion/mssql/adbc-parquet.md) * MySQL * [mysql](/1.0/datatypes-conversion/mysql/parquet.md) * Oracle * [oraodp](/1.0/datatypes-conversion/oracle/parquet.md) * PostgreSQL * [pgsql](/1.0/datatypes-conversion/postgresql/parquet.md) * [pgcopy](/1.0/datatypes-conversion/postgresql-copy/parquet.md) * SAP HANA * [hana](/1.0/datatypes-conversion/saphana/parquet.md) * Teradata * [teradata](/1.0/datatypes-conversion/teradata/parquet.md) ## Integration[​](#integration "Direct link to Integration") * [Docker](/1.0/integration/docker-integration.md) * [Kestra](/1.0/integration/kestra-integration.md) * [Airflow](/1.0/integration/airflow-integration.md) * [PostgreSQL](/1.0/integration/postgresql-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.32](/1.0/release-notes/release-notes-0.32.md) ## [Sitemap](/1.0/sitemap.md)[​](#sitemap-1 "Direct link to sitemap-1") --- # FastBCP Command Wizard Expand All\[ ] ### PlatformWindows Windows ![Linux](/img/tux.svg)Linux ### Connection ParametersMS SQL Server Connection Type? : ADBC (High Performance) MS SQL Server (ADBC) Standard Drivers ClickHouse MS SQL Server MySQL Netezza ODBC OLEDB Oracle (ODP) PostgreSQL (pgcopy) PostgreSQL (pgsql) SAP HANA Teradata | Provider? : | SQLOLEDB | | ------------------------ | ----------------------------- | | Server? : | mss-server,1433 | | Source Connect String? : | Server=myserver;Database=mydb | | DSN? : | MyDSN | | Trusted? : | \[ ] | | User? : | username | | Password? : | password | | Database? : | mydb | | Application Intent? : | ReadOnlyReadWrite | ### Source Query / Table ### Output Options ### Format Options ### Parquet Options ### Cloud Options ### Parallel Parameters ### Advanced Parameters ### License ### Generated Command Multi-line\[x] generate config sharecopy ``` ``` --- # Getting Started with FastBCP If you haven't installed FastBCP yet, please check the [Installation](/1.1/installation.md) section first. You can also build your first FastBCP command using our interactive [Command Builder Wizard](/latest/wizard.md). [FastBCP Tutorial](https://www.youtube.com/embed/7YaXaue7CdA) --- # SQL Server (ADBC) → Parquet Datatypes conversion mapping when exporting from **SQL Server** using the ADBC connector (`--connectiontype adbc_mssql`) to **Parquet** format. Platform availability The ADBC FastDriver connectors (`adbc_mssql`, `adbc_pgsql`) are available on **Windows x64** and **Linux x64** only. They are **not** supported on **Linux ARM64**. info The ADBC connector does not map every type the way the standard [`mssql`](/1.1/datatypes-conversion/mssql/parquet.md) driver does. Compare both pages before switching. | | | | --------------- | ------------------------ | | **Source** | SQL Server (adbc\_mssql) | | **Format** | Parquet | | **FastBCP** | 1.1.4.0 | | **Test Status** | PARTIAL (30/31 Nullable) | Failed Types The following datatype is **not supported** with this connector: * `SQL_VARIANT` — export fails ## Parquet Schema: testdatatypes\_nullable[​](#parquet-schema-testdatatypes_nullable "Direct link to Parquet Schema: testdatatypes_nullable") | name | physical\_type | converted\_type | logical\_type | | --------------------- | ----------------------- | ----------------- | --------------------------------------------- | | col\_bigint | INT64 | — | — | | col\_int | INT32 | — | — | | col\_smallint | INT32 | INT\_16 | IntType(bitWidth=16, isSigned=1) | | col\_tinyint | INT32 | UINT\_8 | IntType(bitWidth=8, isSigned=0) | | col\_bit | BOOLEAN | — | — | | col\_decimal | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=2, precision=18) | | col\_numeric | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=2, precision=18) | | col\_money | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=4, precision=19) | | col\_smallmoney | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=4, precision=10) | | col\_float | DOUBLE | — | — | | col\_real | FLOAT | — | — | | col\_date | INT32 | DATE | DateType() | | col\_time | INT64 | — | TimeType(isAdjustedToUTC=0, unit=NANOS) | | col\_datetime | INT64 | TIMESTAMP\_MILLIS | TimestampType(isAdjustedToUTC=0, unit=MILLIS) | | col\_datetime2 | INT64 | — | TimestampType(isAdjustedToUTC=0, unit=NANOS) | | col\_datetimeoffset | INT64 | — | TimestampType(isAdjustedToUTC=1, unit=NANOS) | | col\_smalldatetime | INT64 | TIMESTAMP\_MILLIS | TimestampType(isAdjustedToUTC=0, unit=MILLIS) | | col\_char | BYTE\_ARRAY | UTF8 | StringType() | | col\_varchar | BYTE\_ARRAY | UTF8 | StringType() | | col\_nchar | BYTE\_ARRAY | UTF8 | StringType() | | col\_nvarchar | BYTE\_ARRAY | UTF8 | StringType() | | col\_text | BYTE\_ARRAY | UTF8 | StringType() | | col\_ntext | BYTE\_ARRAY | UTF8 | StringType() | | col\_binary | BYTE\_ARRAY | — | — | | col\_varbinary | BYTE\_ARRAY | — | — | | col\_image | BYTE\_ARRAY | — | — | | col\_uniqueidentifier | BYTE\_ARRAY | UTF8 | StringType() | | col\_xml | BYTE\_ARRAY | UTF8 | StringType() | | col\_geography | BYTE\_ARRAY | — | — | | col\_geometry | BYTE\_ARRAY | — | — | --- # SQL Server → Parquet Datatypes conversion mapping when exporting from **SQL Server** (`--connectiontype mssql`) to **Parquet** format. | | | | --------------- | ------------------ | | **Source** | SQL Server (mssql) | | **Format** | Parquet | | **FastBCP** | 1.1.4.0 | | **Test Status** | PASS (Nullable) | ## Parquet Schema: testdatatypes\_nullable[​](#parquet-schema-testdatatypes_nullable "Direct link to Parquet Schema: testdatatypes_nullable") | name | physical\_type | converted\_type | logical\_type | | --------------------- | ----------------------- | ----------------- | ---------------------------------------- | | col\_bigint | INT64 | INT\_64 | IntType(bitWidth=64, isSigned=1) | | col\_int | INT32 | INT\_32 | IntType(bitWidth=32, isSigned=1) | | col\_smallint | INT32 | INT\_16 | IntType(bitWidth=16, isSigned=1) | | col\_tinyint | INT32 | UINT\_8 | IntType(bitWidth=8, isSigned=0) | | col\_bit | BOOLEAN | — | — | | col\_decimal | INT64 | DECIMAL | DecimalType(scale=2, precision=18) | | col\_numeric | INT64 | DECIMAL | DecimalType(scale=2, precision=18) | | col\_money | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=4, precision=19) | | col\_smallmoney | INT64 | DECIMAL | DecimalType(scale=4, precision=10) | | col\_float | DOUBLE | — | — | | col\_real | FLOAT | — | — | | col\_date | INT32 | DATE | — | | col\_time | INT64 | — | TimeType(isAdjustedToUTC=0, unit=MICROS) | | col\_datetime | INT64 | TIMESTAMP\_MILLIS | — | | col\_datetime2 | INT64 | TIMESTAMP\_MILLIS | — | | col\_datetimeoffset | BYTE\_ARRAY | UTF8 | StringType() | | col\_smalldatetime | INT64 | TIMESTAMP\_MILLIS | — | | col\_char | BYTE\_ARRAY | UTF8 | StringType() | | col\_varchar | BYTE\_ARRAY | UTF8 | StringType() | | col\_nchar | BYTE\_ARRAY | UTF8 | StringType() | | col\_nvarchar | BYTE\_ARRAY | UTF8 | StringType() | | col\_text | BYTE\_ARRAY | UTF8 | StringType() | | col\_ntext | BYTE\_ARRAY | UTF8 | StringType() | | col\_binary | BYTE\_ARRAY | — | — | | col\_varbinary | BYTE\_ARRAY | — | — | | col\_image | BYTE\_ARRAY | — | — | | col\_uniqueidentifier | BYTE\_ARRAY | UTF8 | StringType() | | col\_xml | BYTE\_ARRAY | UTF8 | StringType() | | col\_sql\_variant | BYTE\_ARRAY | UTF8 | StringType() | | col\_geography | BYTE\_ARRAY | UTF8 | StringType() | | col\_geometry | BYTE\_ARRAY | UTF8 | StringType() | --- # MySQL → Parquet Datatypes conversion mapping when exporting from **MySQL** (`--connectiontype mysql`) to **Parquet** format. | | | | --------------- | --------------- | | **Source** | MySQL (mysql) | | **Format** | Parquet | | **FastBCP** | 1.1.4.0 | | **Test Status** | PASS (Nullable) | ## Parquet Schema: testdatatypes\_nullable[​](#parquet-schema-testdatatypes_nullable "Direct link to Parquet Schema: testdatatypes_nullable") | name | physical\_type | converted\_type | logical\_type | | --------------- | -------------- | ----------------- | ---------------------------------- | | col\_bigint | INT64 | INT\_64 | IntType(bitWidth=64, isSigned=1) | | col\_int | INT32 | INT\_32 | IntType(bitWidth=32, isSigned=1) | | col\_mediumint | INT32 | INT\_32 | IntType(bitWidth=32, isSigned=1) | | col\_smallint | INT32 | INT\_16 | IntType(bitWidth=16, isSigned=1) | | col\_tinyint | BYTE\_ARRAY | UTF8 | StringType() | | col\_bit | BYTE\_ARRAY | UTF8 | StringType() | | col\_decimal | INT64 | DECIMAL | DecimalType(scale=2, precision=18) | | col\_float | FLOAT | — | — | | col\_double | DOUBLE | — | — | | col\_date | INT64 | TIMESTAMP\_MILLIS | — | | col\_time | BYTE\_ARRAY | UTF8 | StringType() | | col\_datetime | INT64 | TIMESTAMP\_MILLIS | — | | col\_timestamp | INT64 | TIMESTAMP\_MILLIS | — | | col\_year | INT32 | INT\_32 | IntType(bitWidth=32, isSigned=1) | | col\_char | BYTE\_ARRAY | UTF8 | StringType() | | col\_varchar | BYTE\_ARRAY | UTF8 | StringType() | | col\_tinytext | BYTE\_ARRAY | UTF8 | StringType() | | col\_text | BYTE\_ARRAY | UTF8 | StringType() | | col\_mediumtext | BYTE\_ARRAY | UTF8 | StringType() | | col\_longtext | BYTE\_ARRAY | UTF8 | StringType() | | col\_binary | BYTE\_ARRAY | — | — | | col\_varbinary | BYTE\_ARRAY | — | — | | col\_tinyblob | BYTE\_ARRAY | — | — | | col\_blob | BYTE\_ARRAY | — | — | | col\_mediumblob | BYTE\_ARRAY | — | — | | col\_longblob | BYTE\_ARRAY | — | — | | col\_enum | BYTE\_ARRAY | UTF8 | StringType() | | col\_set | BYTE\_ARRAY | UTF8 | StringType() | | col\_json | BYTE\_ARRAY | UTF8 | StringType() | | col\_geometry | BYTE\_ARRAY | — | — | | col\_point | BYTE\_ARRAY | — | — | | col\_linestring | BYTE\_ARRAY | — | — | | col\_polygon | BYTE\_ARRAY | — | — | --- # Oracle → Parquet Datatypes conversion mapping when exporting from **Oracle** (`--connectiontype oraodp`) to **Parquet** format. | | | | --------------- | --------------- | | **Source** | Oracle (oraodp) | | **Format** | Parquet | | **FastBCP** | 1.1.4.0 | | **Test Status** | PASS (Nullable) | ## Parquet Schema: testdatatypes\_nullable[​](#parquet-schema-testdatatypes_nullable "Direct link to Parquet Schema: testdatatypes_nullable") | name | physical\_type | converted\_type | logical\_type | | ------------------- | ----------------------- | ----------------- | ----------------------------------- | | COL\_NUMBER | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=18, precision=38) | | COL\_NUMBER10 | INT64 | INT\_64 | IntType(bitWidth=64, isSigned=1) | | COL\_NUMBER18\_2 | INT64 | DECIMAL | DecimalType(scale=2, precision=18) | | COL\_FLOAT | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=18, precision=38) | | COL\_BINARY\_FLOAT | FLOAT | — | — | | COL\_BINARY\_DOUBLE | DOUBLE | — | — | | COL\_CHAR | BYTE\_ARRAY | UTF8 | StringType() | | COL\_VARCHAR2 | BYTE\_ARRAY | UTF8 | StringType() | | COL\_NCHAR | BYTE\_ARRAY | UTF8 | StringType() | | COL\_NVARCHAR2 | BYTE\_ARRAY | UTF8 | StringType() | | COL\_CLOB | BYTE\_ARRAY | UTF8 | StringType() | | COL\_NCLOB | BYTE\_ARRAY | UTF8 | StringType() | | COL\_BLOB | BYTE\_ARRAY | — | — | | COL\_RAW | BYTE\_ARRAY | — | — | | COL\_LONG\_RAW | BYTE\_ARRAY | — | — | | COL\_DATE | INT64 | TIMESTAMP\_MILLIS | — | | COL\_TIMESTAMP | INT64 | TIMESTAMP\_MILLIS | — | | COL\_TIMESTAMP\_TZ | BYTE\_ARRAY | UTF8 | StringType() | | COL\_TIMESTAMP\_LTZ | INT64 | TIMESTAMP\_MILLIS | — | | COL\_INTERVAL\_YM | INT64 | INT\_64 | IntType(bitWidth=64, isSigned=1) | | COL\_INTERVAL\_DS | BYTE\_ARRAY | UTF8 | StringType() | | COL\_ROWID | BYTE\_ARRAY | UTF8 | StringType() | | COL\_UROWID | BYTE\_ARRAY | UTF8 | StringType() | | COL\_XMLTYPE | BYTE\_ARRAY | UTF8 | StringType() | | COL\_BFILE | BYTE\_ARRAY | — | — | --- # Datatypes Conversion When FastBCP exports a table, every native source column type is mapped to a type in the target output format. This section documents the **exact mappings** FastBCP produces. These pages are not a specification: each one is the Parquet schema read back from a real export of a test table covering all of the source's native datatypes. ## Supported Sources[​](#supported-sources "Direct link to Supported Sources") Sources are grouped by database system. A system can be read through several connection types (`--connectiontype`), and each one has its own page because the mappings it produces can differ — `pgcopy` produces exactly the same mappings as `pgsql`, while the ADBC connectors differ from their standard counterparts on several types. | Database | Connection Types | | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | SQL Server | [`mssql`](/1.1/datatypes-conversion/mssql/parquet.md) · [`adbc_mssql`](/1.1/datatypes-conversion/mssql/adbc-parquet.md) | | MySQL | [`mysql`](/1.1/datatypes-conversion/mysql/parquet.md) | | Oracle | [`oraodp`](/1.1/datatypes-conversion/oracle/parquet.md) | | PostgreSQL | [`pgsql`](/1.1/datatypes-conversion/postgresql/parquet.md) · [`pgcopy`](/1.1/datatypes-conversion/postgresql-copy/parquet.md) · [`adbc_pgsql`](/1.1/datatypes-conversion/postgresql/adbc-parquet.md) | | SAP HANA | [`hana`](/1.1/datatypes-conversion/saphana/parquet.md) | | Teradata | [`teradata`](/1.1/datatypes-conversion/teradata/parquet.md) | Parquet is the only output format documented here. ## How to Read a Page[​](#how-to-read-a-page "Direct link to How to Read a Page") Each page opens with a summary of the export it documents — source, output format, the FastBCP build used and the test status — followed by the Parquet schema produced from the **`testdatatypes_nullable`** table, in which every column accepts `NULL`. | Column | Description | | ------------------- | ------------------------------------------------------------------------------------------------------------------------- | | **name** | The column name in the source table | | **physical\_type** | The Parquet physical storage type: `BOOLEAN`, `INT32`, `INT64`, `FLOAT`, `DOUBLE`, `BYTE_ARRAY` or `FIXED_LEN_BYTE_ARRAY` | | **converted\_type** | The legacy Parquet annotation on top of it (`UTF8`, `DECIMAL`, `DATE`, `TIMESTAMP_MILLIS`, …) | | **logical\_type** | The modern Parquet annotation (`StringType()`, `DecimalType(scale=2, precision=18)`, `IntType(…)`, …) | A `—` means the column carries no annotation of that kind, so the physical type alone describes it. NOT NULL columns Declaring the source columns `NOT NULL` does not change the mapping. The only difference is the Parquet repetition level (REQUIRED instead of OPTIONAL), which these tables do not show. --- # PostgreSQL COPY → Parquet Datatypes conversion mapping when exporting from **PostgreSQL** using the COPY protocol (`--connectiontype pgcopy`) to **Parquet** format. info The COPY protocol variant produces the same type mappings as the standard PostgreSQL driver. See also [PostgreSQL (pgsql)](/1.1/datatypes-conversion/postgresql/parquet.md). | | | | --------------- | ------------------------ | | **Source** | PostgreSQL COPY (pgcopy) | | **Format** | Parquet | | **FastBCP** | 1.1.4.0 | | **Test Status** | PASS (Nullable) | ## Parquet Schema: testdatatypes\_nullable[​](#parquet-schema-testdatatypes_nullable "Direct link to Parquet Schema: testdatatypes_nullable") | name | physical\_type | converted\_type | logical\_type | | ---------------------- | ----------------------- | ----------------- | ---------------------------------------- | | col\_bigint | INT64 | INT\_64 | IntType(bitWidth=64, isSigned=1) | | col\_integer | INT32 | INT\_32 | IntType(bitWidth=32, isSigned=1) | | col\_smallint | INT32 | INT\_16 | IntType(bitWidth=16, isSigned=1) | | col\_boolean | BOOLEAN | — | — | | col\_numeric | INT64 | DECIMAL | DecimalType(scale=2, precision=18) | | col\_real | FLOAT | — | — | | col\_double\_precision | DOUBLE | — | — | | col\_money | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=4, precision=19) | | col\_date | INT32 | DATE | — | | col\_time | INT32 | TIME\_MILLIS | TimeType(isAdjustedToUTC=0, unit=MILLIS) | | col\_timestamp | INT64 | TIMESTAMP\_MILLIS | — | | col\_timestamptz | BYTE\_ARRAY | UTF8 | StringType() | | col\_interval | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | col\_char | BYTE\_ARRAY | UTF8 | StringType() | | col\_varchar | BYTE\_ARRAY | UTF8 | StringType() | | col\_text | BYTE\_ARRAY | UTF8 | StringType() | | col\_bytea | BYTE\_ARRAY | — | — | | col\_uuid | BYTE\_ARRAY | UTF8 | StringType() | | col\_json | BYTE\_ARRAY | UTF8 | StringType() | | col\_jsonb | BYTE\_ARRAY | — | — | | col\_xml | BYTE\_ARRAY | UTF8 | StringType() | | col\_inet | BYTE\_ARRAY | UTF8 | StringType() | | col\_cidr | BYTE\_ARRAY | UTF8 | StringType() | | col\_macaddr | BYTE\_ARRAY | UTF8 | StringType() | | col\_point | BYTE\_ARRAY | UTF8 | StringType() | | col\_line | BYTE\_ARRAY | UTF8 | StringType() | | col\_lseg | BYTE\_ARRAY | UTF8 | StringType() | | col\_box | BYTE\_ARRAY | UTF8 | StringType() | | col\_path | BYTE\_ARRAY | UTF8 | StringType() | | col\_polygon | BYTE\_ARRAY | UTF8 | StringType() | | col\_circle | BYTE\_ARRAY | UTF8 | StringType() | | col\_int4range | BYTE\_ARRAY | UTF8 | StringType() | | col\_int8range | BYTE\_ARRAY | UTF8 | StringType() | | col\_numrange | BYTE\_ARRAY | UTF8 | StringType() | | col\_tsrange | BYTE\_ARRAY | UTF8 | StringType() | | col\_tstzrange | BYTE\_ARRAY | UTF8 | StringType() | | col\_daterange | BYTE\_ARRAY | UTF8 | StringType() | | col\_bit | BYTE\_ARRAY | UTF8 | StringType() | | col\_bit\_varying | BYTE\_ARRAY | UTF8 | StringType() | | col\_oid | BYTE\_ARRAY | UTF8 | StringType() | | col\_int\_array | BYTE\_ARRAY | UTF8 | StringType() | --- # PostgreSQL (ADBC) → Parquet Datatypes conversion mapping when exporting from **PostgreSQL** using the ADBC connector (`--connectiontype adbc_pgsql`) to **Parquet** format. Platform availability The ADBC FastDriver connectors (`adbc_mssql`, `adbc_pgsql`) are available on **Windows x64** and **Linux x64** only. They are **not** supported on **Linux ARM64**. info The ADBC connector does not map every type the way the standard [`pgsql`](/1.1/datatypes-conversion/postgresql/parquet.md) driver does. Compare both pages before switching. | | | | --------------- | ------------------------ | | **Source** | PostgreSQL (adbc\_pgsql) | | **Format** | Parquet | | **FastBCP** | 1.1.4.0 | | **Test Status** | PARTIAL (40/41 Nullable) | Failed Types The following datatype is **not supported** with this connector: * `INTERVAL` — export fails ## Parquet Schema: testdatatypes\_nullable[​](#parquet-schema-testdatatypes_nullable "Direct link to Parquet Schema: testdatatypes_nullable") | name | physical\_type | converted\_type | logical\_type | | ---------------------- | ----------------------- | ----------------- | --------------------------------------------- | | col\_bigint | INT64 | — | — | | col\_integer | INT32 | — | — | | col\_smallint | INT32 | INT\_16 | IntType(bitWidth=16, isSigned=1) | | col\_boolean | BOOLEAN | — | — | | col\_numeric | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=2, precision=18) | | col\_real | FLOAT | — | — | | col\_double\_precision | DOUBLE | — | — | | col\_money | BYTE\_ARRAY | — | — | | col\_date | INT32 | DATE | DateType() | | col\_time | INT64 | — | TimeType(isAdjustedToUTC=0, unit=MICROS) | | col\_timestamp | INT64 | TIMESTAMP\_MICROS | TimestampType(isAdjustedToUTC=0, unit=MICROS) | | col\_timestamptz | INT64 | TIMESTAMP\_MICROS | TimestampType(isAdjustedToUTC=1, unit=MICROS) | | col\_char | BYTE\_ARRAY | UTF8 | StringType() | | col\_varchar | BYTE\_ARRAY | UTF8 | StringType() | | col\_text | BYTE\_ARRAY | UTF8 | StringType() | | col\_bytea | BYTE\_ARRAY | — | — | | col\_uuid | BYTE\_ARRAY | UTF8 | StringType() | | col\_json | BYTE\_ARRAY | UTF8 | StringType() | | col\_jsonb | BYTE\_ARRAY | UTF8 | StringType() | | col\_xml | BYTE\_ARRAY | UTF8 | StringType() | | col\_inet | BYTE\_ARRAY | UTF8 | StringType() | | col\_cidr | BYTE\_ARRAY | UTF8 | StringType() | | col\_macaddr | BYTE\_ARRAY | UTF8 | StringType() | | col\_point | BYTE\_ARRAY | — | — | | col\_line | BYTE\_ARRAY | — | — | | col\_lseg | BYTE\_ARRAY | — | — | | col\_box | BYTE\_ARRAY | — | — | | col\_path | BYTE\_ARRAY | — | — | | col\_polygon | BYTE\_ARRAY | — | — | | col\_circle | BYTE\_ARRAY | — | — | | col\_int4range | BYTE\_ARRAY | — | — | | col\_int8range | BYTE\_ARRAY | — | — | | col\_numrange | BYTE\_ARRAY | — | — | | col\_tsrange | BYTE\_ARRAY | — | — | | col\_tstzrange | BYTE\_ARRAY | — | — | | col\_daterange | BYTE\_ARRAY | — | — | | col\_bit | BYTE\_ARRAY | UTF8 | StringType() | | col\_bit\_varying | BYTE\_ARRAY | UTF8 | StringType() | | col\_oid | INT32 | — | — | | col\_int\_array | BYTE\_ARRAY | — | — | --- # PostgreSQL → Parquet Datatypes conversion mapping when exporting from **PostgreSQL** (`--connectiontype pgsql`) to **Parquet** format. info [PostgreSQL COPY](/1.1/datatypes-conversion/postgresql-copy/parquet.md) (`--connectiontype pgcopy`) produces identical type mappings. The [ADBC connector](/1.1/datatypes-conversion/postgresql/adbc-parquet.md) (`--connectiontype adbc_pgsql`) does not. | | | | --------------- | ------------------ | | **Source** | PostgreSQL (pgsql) | | **Format** | Parquet | | **FastBCP** | 1.1.4.0 | | **Test Status** | PASS (Nullable) | ## Parquet Schema: testdatatypes\_nullable[​](#parquet-schema-testdatatypes_nullable "Direct link to Parquet Schema: testdatatypes_nullable") | name | physical\_type | converted\_type | logical\_type | | ---------------------- | ----------------------- | ----------------- | ---------------------------------------- | | col\_bigint | INT64 | INT\_64 | IntType(bitWidth=64, isSigned=1) | | col\_integer | INT32 | INT\_32 | IntType(bitWidth=32, isSigned=1) | | col\_smallint | INT32 | INT\_16 | IntType(bitWidth=16, isSigned=1) | | col\_boolean | BOOLEAN | — | — | | col\_numeric | INT64 | DECIMAL | DecimalType(scale=2, precision=18) | | col\_real | FLOAT | — | — | | col\_double\_precision | DOUBLE | — | — | | col\_money | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=4, precision=19) | | col\_date | INT32 | DATE | — | | col\_time | INT32 | TIME\_MILLIS | TimeType(isAdjustedToUTC=0, unit=MILLIS) | | col\_timestamp | INT64 | TIMESTAMP\_MILLIS | — | | col\_timestamptz | BYTE\_ARRAY | UTF8 | StringType() | | col\_interval | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | col\_char | BYTE\_ARRAY | UTF8 | StringType() | | col\_varchar | BYTE\_ARRAY | UTF8 | StringType() | | col\_text | BYTE\_ARRAY | UTF8 | StringType() | | col\_bytea | BYTE\_ARRAY | — | — | | col\_uuid | BYTE\_ARRAY | UTF8 | StringType() | | col\_json | BYTE\_ARRAY | UTF8 | StringType() | | col\_jsonb | BYTE\_ARRAY | — | — | | col\_xml | BYTE\_ARRAY | UTF8 | StringType() | | col\_inet | BYTE\_ARRAY | UTF8 | StringType() | | col\_cidr | BYTE\_ARRAY | UTF8 | StringType() | | col\_macaddr | BYTE\_ARRAY | UTF8 | StringType() | | col\_point | BYTE\_ARRAY | UTF8 | StringType() | | col\_line | BYTE\_ARRAY | UTF8 | StringType() | | col\_lseg | BYTE\_ARRAY | UTF8 | StringType() | | col\_box | BYTE\_ARRAY | UTF8 | StringType() | | col\_path | BYTE\_ARRAY | UTF8 | StringType() | | col\_polygon | BYTE\_ARRAY | UTF8 | StringType() | | col\_circle | BYTE\_ARRAY | UTF8 | StringType() | | col\_int4range | BYTE\_ARRAY | UTF8 | StringType() | | col\_int8range | BYTE\_ARRAY | UTF8 | StringType() | | col\_numrange | BYTE\_ARRAY | UTF8 | StringType() | | col\_tsrange | BYTE\_ARRAY | UTF8 | StringType() | | col\_tstzrange | BYTE\_ARRAY | UTF8 | StringType() | | col\_daterange | BYTE\_ARRAY | UTF8 | StringType() | | col\_bit | BYTE\_ARRAY | UTF8 | StringType() | | col\_bit\_varying | BYTE\_ARRAY | UTF8 | StringType() | | col\_oid | BYTE\_ARRAY | UTF8 | StringType() | | col\_int\_array | BYTE\_ARRAY | UTF8 | StringType() | --- # SAP HANA → Parquet Datatypes conversion mapping when exporting from **SAP HANA** (`--connectiontype hana`) to **Parquet** format. | | | | --------------- | --------------- | | **Source** | SAP HANA (hana) | | **Format** | Parquet | | **FastBCP** | 1.1.4.0 | | **Test Status** | PASS (Nullable) | ## Parquet Schema: testdatatypes\_nullable[​](#parquet-schema-testdatatypes_nullable "Direct link to Parquet Schema: testdatatypes_nullable") | name | physical\_type | converted\_type | logical\_type | | ----------------- | -------------- | ----------------- | ---------------------------------- | | COL\_TINYINT | INT32 | UINT\_8 | IntType(bitWidth=8, isSigned=0) | | COL\_SMALLINT | INT32 | INT\_16 | IntType(bitWidth=16, isSigned=1) | | COL\_INTEGER | INT32 | INT\_32 | IntType(bitWidth=32, isSigned=1) | | COL\_BIGINT | INT64 | INT\_64 | IntType(bitWidth=64, isSigned=1) | | COL\_DECIMAL | INT64 | DECIMAL | DecimalType(scale=2, precision=18) | | COL\_SMALLDECIMAL | INT64 | DECIMAL | DecimalType(scale=0, precision=16) | | COL\_REAL | FLOAT | — | — | | COL\_DOUBLE | DOUBLE | — | — | | COL\_FLOAT | DOUBLE | — | — | | COL\_BOOLEAN | BOOLEAN | — | — | | COL\_DATE | INT64 | TIMESTAMP\_MILLIS | — | | COL\_TIME | BYTE\_ARRAY | UTF8 | StringType() | | COL\_TIMESTAMP | INT64 | TIMESTAMP\_MILLIS | — | | COL\_SECONDDATE | INT64 | TIMESTAMP\_MILLIS | — | | COL\_CHAR | BYTE\_ARRAY | UTF8 | StringType() | | COL\_VARCHAR | BYTE\_ARRAY | UTF8 | StringType() | | COL\_NCHAR | BYTE\_ARRAY | UTF8 | StringType() | | COL\_NVARCHAR | BYTE\_ARRAY | UTF8 | StringType() | | COL\_ALPHANUM | BYTE\_ARRAY | UTF8 | StringType() | | COL\_CLOB | BYTE\_ARRAY | UTF8 | StringType() | | COL\_NCLOB | BYTE\_ARRAY | UTF8 | StringType() | | COL\_BLOB | BYTE\_ARRAY | — | — | | COL\_BINARY | BYTE\_ARRAY | — | — | | COL\_VARBINARY | BYTE\_ARRAY | — | — | | COL\_ST\_GEOMETRY | BYTE\_ARRAY | — | — | | COL\_ST\_POINT | BYTE\_ARRAY | — | — | | COL\_SHORTTEXT | BYTE\_ARRAY | UTF8 | StringType() | --- # Teradata → Parquet Datatypes conversion mapping when exporting from **Teradata** (`--connectiontype teradata`) to **Parquet** format. | | | | --------------- | ------------------- | | **Source** | Teradata (teradata) | | **Format** | Parquet | | **FastBCP** | 1.1.4.0 | | **Test Status** | PASS (Nullable) | ## Parquet Schema: testdatatypes\_nullable[​](#parquet-schema-testdatatypes_nullable "Direct link to Parquet Schema: testdatatypes_nullable") | name | physical\_type | converted\_type | logical\_type | | ------------------------ | ----------------------- | ----------------- | ---------------------------------------- | | col\_byteint | INT32 | INT\_16 | IntType(bitWidth=16, isSigned=1) | | col\_smallint | INT32 | INT\_16 | IntType(bitWidth=16, isSigned=1) | | col\_integer | INT32 | INT\_32 | IntType(bitWidth=32, isSigned=1) | | col\_bigint | INT64 | INT\_64 | IntType(bitWidth=64, isSigned=1) | | col\_decimal18\_2 | INT64 | DECIMAL | DecimalType(scale=2, precision=18) | | col\_float | DOUBLE | — | — | | col\_number | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=18, precision=38) | | col\_number18\_2 | INT64 | DECIMAL | DecimalType(scale=2, precision=18) | | col\_date | INT32 | DATE | — | | col\_time | INT64 | — | TimeType(isAdjustedToUTC=0, unit=MICROS) | | col\_timestamp | INT64 | TIMESTAMP\_MILLIS | — | | col\_timestamp\_tz | BYTE\_ARRAY | UTF8 | StringType() | | tdintervalyear | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | tdintervalyeartomonth | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | tdintervalmonth | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | tdintervalday | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | tdintervaldaytohour | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | tdintervaldaytominute | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | tdintervaldaytosecond | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | tdintervalhour | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | tdintervalhourtominute | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | tdintervalhourtosecond | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | tdintervalminute | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | tdintervalminutetosecond | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | tdintervalsecond | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | col\_real | DOUBLE | — | — | | col\_double\_precision | DOUBLE | — | — | | col\_char | BYTE\_ARRAY | UTF8 | StringType() | | col\_varchar | BYTE\_ARRAY | UTF8 | StringType() | | col\_clob | BYTE\_ARRAY | UTF8 | StringType() | | col\_byte | BYTE\_ARRAY | — | — | | col\_varbyte | BYTE\_ARRAY | — | — | | col\_blob | BYTE\_ARRAY | — | — | | col\_period\_date | BYTE\_ARRAY | UTF8 | StringType() | | col\_period\_timestamp | BYTE\_ARRAY | UTF8 | StringType() | | col\_json | BYTE\_ARRAY | UTF8 | StringType() | | col\_xml | BYTE\_ARRAY | UTF8 | StringType() | | col\_st\_geometry | BYTE\_ARRAY | UTF8 | StringType() | --- # Advanced Parameters This section covers advanced configuration options for FastBCP. ## Run ID[​](#run-id "Direct link to Run ID") The Run ID parameter `--runid` is a unique identifier for the current export operation. It can be used for tracking, logging, and monitoring purposes. Information If not specified, FastBCP will generate a unique Run ID automatically. Tips If possible, inject the RunId provided by the caller (e.g., SSIS, Airflow, or any scheduler that supports a run identifier). This will greatly facilitate log correlation and troubleshooting. ``` ./FastBCP \ ... --runid "export-2024-01-09-001" \ ... ``` **Syntax:** * Long form only: `--runid ""` ## Log Level[​](#log-level "Direct link to Log Level") The Log Level parameter `--loglevel` controls the verbosity of logging output during export operations. **Available values:** * `Information` (default): Standard logging with key operation details * `Debug`: Verbose logging with detailed diagnostic information ``` ./FastBCP \ ... --loglevel "Debug" \ ... ``` **Syntax:** * Long form only: `--loglevel ""` note If a settings file is specified with `--settingsfile`, the log level defined in the settings file takes precedence unless overridden by the command-line parameter. Information See [Logging Overview](/1.1/documentation/logging/Overview.md) for detailed information about logging configuration and output. ## Settings File[​](#settings-file "Direct link to Settings File") The Settings File parameter `--settingsfile` allows you to store all FastBCP parameters in a configuration file, making it easier to manage complex exports and reuse configurations. ``` ./FastBCP \ ... --settingsfile "/path/to/config/export-config.json" \ ... ``` **Syntax:** * Long form only: `--settingsfile ""` Information See [Logging Overview](/1.1/documentation/logging/Overview.md) for examples of settings file configuration. ## Config File[​](#config-file "Direct link to Config File") The Config File parameter `--config` allows you to define all FastBCP parameters in a YAML configuration file. This provides a more structured and readable way to manage export configurations compared to JSON settings files. * Windows * Linux ``` .\FastBCP.exe --config samples\sample_mssql_to_csv.yaml ``` ``` ./FastBCP --config samples/sample_mssql_to_csv.yaml ``` **Syntax:** * Long form only: `--config ""` ### YAML Configuration Example[​](#yaml-configuration-example "Direct link to YAML Configuration Example") Here's a complete example of a YAML configuration file: ``` # FastBCP – MSSQL to CSV using RangeId parallel method # # Usage: # .\FastBCP.exe --config samples\sample_mssql_to_csv.yaml connection: type: mssql server: localhost database: tpch10_collation_bin2 trusted: true source: schema: dbo table: orders output: file: "mssql_orders_{startdate}.csv" directory: 'D:\temp\{database}\{schema}\{table}\full\' delimiter: "|" decimal_separator: "." date_format: "yyyy-MM-dd HH:mm:ss" encoding: UTF-8 performance: method: RangeId degree: -2 distribute_key_column: o_orderkey merge: false logging: run_id: mssql_to_csv_parallel-2_rangeid ``` Benefits of YAML Configuration * **Structured and readable**: YAML format is more human-friendly than JSON * **Comments support**: Add documentation directly in your configuration files * **Reusable configurations**: Version control your export settings * **Simplified command-line**: Reduce complex exports to a single `--config` parameter ## Traceparent[​](#traceparent "Direct link to Traceparent") The `--traceparent` parameter accepts a [W3C Trace Context](https://www.w3.org/TR/trace-context/) traceparent identifier from an external caller. This enables distributed trace correlation between FastBCP and upstream systems such as orchestrators, APIs, or CI/CD pipelines. Information See [OpenTelemetry](/1.1/documentation/logging/OpenTelemetry.md) for detailed information about configuring OpenTelemetry tracing and log export. ``` ./FastBCP \ ... --traceparent "00-abcdef1234567890abcdef1234567890-1234567890abcdef-01" \ ... ``` **Syntax:** * Long form only: `--traceparent ""` ## No Banner[​](#no-banner "Direct link to No Banner") Disable the FastBCP banner display in the command line output. This is useful for scripting or when you want cleaner output in automated processes. **Example:** ``` ./FastBCP \ ... --nobanner \ ... ``` **Syntax:** * Long form: `--nobanner` Clean Output Using `--nobanner` is recommended when running FastBCP 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 ``` .\FastBCP.exe ` --connectiontype "oraodp" ` --server "localhost:1521/OraService" ` --database "tpch" ` --user "FastUser" ` --password "FastPassword" ` --sourceschema "TPCH" ` --sourcetable "ORDERS" ` --directory "D:\temp" ` --fileoutput "orders.xlsx" ` --encoding "UTF-8" ` --parallelmethod RowId ` --paralleldegree 7 ` --merge false ` --loglevel "Debug" ` --runid "oracle_to_excel_parallel_rowid" ` --settingsfile "C:\config\oracle-export.json" ` --nobanner ``` ``` ./FastBCP \ --connectiontype "oraodp" \ --server "localhost:1521/OraService" \ --database "tpch" \ --user "FastUser" \ --password "FastPassword" \ --sourceschema "TPCH" \ --sourcetable "ORDERS" \ --directory "/temp" \ --fileoutput "orders.xlsx" \ --encoding "UTF-8" \ --parallelmethod RowId \ --paralleldegree 7 \ --merge false \ --loglevel "Debug" \ --runid "oracle_to_excel_parallel_rowid" \ --settingsfile "/config/oracle-export.json" \ --nobanner ``` This example: * Connects to an Oracle database using the RowId parallel method * Exports ORDERS table to Excel format with UTF-8 encoding * Uses 7 parallel threads with separate files (merge=false) * Enables Debug logging for detailed diagnostics * Uses a custom Run ID for tracking * Loads additional configuration from a settings file * Disables the banner for cleaner output --- # Authentication FastBCP supports two types of authentication methods depending on your database platform. ## Authentication Methods[​](#authentication-methods "Direct link to Authentication Methods") ### 1. Trusted Connection[​](#1-trusted-connection "Direct link to 1. Trusted Connection") Uses the current Windows user's credentials or the operating system authentication if allowed by the RDBMS. ``` .\FastBCP.exe ` ... --trusted ` ... ``` **Syntax:** * Short form: `-A` * Long form: `--trusted` Warning This method is only available if your RDBMS supports trusted/integrated authentication (e.g., SQL Server with Windows Authentication). ### 2. SQL Login with Username and Password[​](#2-sql-login-with-username-and-password "Direct link to 2. SQL Login with Username and Password") Standard database authentication with explicit credentials. ``` ./FastBCP ` ... --user "myuser" ` --password "mypassword" ` ... ``` **Syntax:** * Username: `-U "username"` or `--user "username"` * Password: `-X "password"` or `--password "password"` ### Alternative: Connection String Parameter[​](#alternative-connection-string-parameter "Direct link to Alternative: Connection String Parameter") You can also use the `--sourceconnectstring` parameter where you pass the user and password directly in the connection string. This parameter will be covered in detail in the [Connection Parameters](/1.1/documentation/cli/connection_parameters.md#source-connection-string) section. Password Security in Logs All passwords passed either through the `--password` parameter or within the `--sourceconnectstring` parameter 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 FASTBCP\_USER and FASTBCP\_PASSWORD for exemple or store the password in an encrypted file. Up to you to decrypt the file and it’s content before using it in a shell variable that will be used with FastBCP. --- # Cloud Options FastBCP supports direct exports to cloud storage platforms: AWS S3, Azure Blob Storage, Azure Data Lake Gen2, and Google Cloud Storage. For detailed cloud authentication setup and configuration, see the [Cloud Connectivity](/1.1/documentation/cloud-connectivity/overview.md) documentation. note FastBCP will use multi-part uploads for all cloud provider Warning Since FastBCP 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**. ## Supported Cloud Platforms[​](#supported-cloud-platforms "Direct link to Supported Cloud Platforms") To export data to a cloud storage service, use the URI scheme specific to your target destination with the `--directory` value | Platform | URI Scheme | Example | | ------------------------ | ------------ | ----------------------------------------------------------- | | **AWS S3** | `s3://` | `s3://my-bucket/data/` | | **Azure Blob** | `abs://` | `abs://myaccount.blob.core.windows.net/mycontainer/mydir/` | | **Azure Data Lake Gen2** | `abfss://` | `abfss://myaccount.dfs.core.windows.net/mycontainer/mydir/` | | **Google Cloud Storage** | `gs://` | `gs://my-bucket/data/` | | **S3-Compatible** | `s3://` | `s3://mybucket/export/` (MinIO, OVH, etc.) | | **OneLake** | `onelake://` | `onelake://MyWorSpace/MyLakeHouse/MyDir/` | ## Cloud Profile[​](#cloud-profile "Direct link to Cloud Profile") You can use the `--cloudprofile` parameter to specify which cloud credentials profile to use. ``` ./FastBCP \ ... --directory "s3://my-bucket/exports" \ --fileoutput "orders.parquet" \ --cloudprofile "production" \ ... ``` **Syntax:** * Long form: `--cloudprofile ` --- # Connection Parameters FastBCP requires connection information to access your database. This page covers all connection-related parameters. ## Connection Type[​](#connection-type "Direct link to Connection Type") Specify the type of database connection driver to use. This parameter determines how FastBCP connects to your database. ``` ./FastBCP \ ... --connectiontype mssql \ ... ``` **Syntax:** * Short form: `-C "connection_type"` * Long form: `--connectiontype "connection_type"` **Available Connection Types:** | Connection Type | Description | | --------------- | --------------------------------------------------------------------------------------- | | `adbc_mssql` | Microsoft SQL Server via ADBC (Arpe.io ADBC FastDriver) - 2x faster for Parquet exports | | `adbc_pgsql` | PostgreSQL via ADBC (Arpe.io ADBC FastDriver) - ultra-fast Parquet exports | | `clickhouse` | ClickHouse database | | `hana` | SAP HANA database | | `mssql` | Microsoft SQL Server (default) | | `mysql` | MySQL/MariaDB database | | `nzsql` | IBM Netezza | | `odbc` | Generic ODBC connection | | `oledb` | Generic OLE DB connection | | `oraodp` | Oracle Data Provider | | `pgcopy` | PostgreSQL with COPY protocol | | `pgsql` | PostgreSQL standard connection | | `teradata` | Teradata database | Platform availability The ADBC FastDriver connectors (`adbc_mssql`, `adbc_pgsql`) are available on **Windows x64** and **Linux x64** only. They are **not** supported on **Linux ARM64**. Parquet-only output ADBC connectors (`adbc_mssql`, `adbc_pgsql`) only support exporting to **Parquet** format. No other output format is supported with these connection types. ## DSN (Data Source Name)[​](#dsn-data-source-name "Direct link to DSN (Data Source Name)") If you have chosen an ODBC connection type, you must define the DSN with the `-N` or `--dsn` parameter, or alternatively define a connection string using `-g` or `--sourceconnectstring`. ``` ./FastBCP \ ... --connectiontype odbc \ --dsn "MyODBCDataSource" \ ... ``` **Syntax:** * Short form: `-N "DSN_name"` * Long form: `--dsn "DSN_name"` ## Provider[​](#provider "Direct link to Provider") If you have chosen an OLEDB connection type, you must define the OLEDB provider with the `-P` or `--provider` parameter. ``` ./FastBCP \ ... --connectiontype oledb \ --provider MSOLEDBSQL \ ... ``` ``` ./FastBCP \ ... --connectiontype oledb \ --provider NZOLEDB \ ... ``` **Syntax:** * Short form: `-P "provider_name"` * Long form: `--provider "provider_name"` ## Server[​](#server "Direct link to Server") Except if you have defined a connection string (`-g` or `--sourceconnectstring`), you must define a server (or could also be a TNS entry for Oracle). **Syntax:** * Short form: `-S "server"` * Long form: `--server "server"` ### Server Format Examples[​](#server-format-examples "Direct link to Server Format Examples") The server parameter accepts different formats depending on your database: **IP address or DNS name:** ``` ./FastBCP \ ... --server "myserver.mydomain.com" \ ... ``` **IP address or DNS name with port number:** ``` ./FastBCP \ ... --server "myserver.mydomain.com:2433" \ ... ``` or ``` ./FastBCP \ ... --server "myserver.mydomain.com,2433" \ ... ``` **IP address or DNS name with named instance:** ``` ./FastBCP \ ... --server "myserver.mydomain.com\myinstance" \ ... ``` **For Oracle - Easy Connect string:** ``` ./FastBCP \ ... --server "myserver.mydomain.com:1521/myinstance" \ ... ``` ## Trusted or User & Password[​](#trusted-or-user--password "Direct link to Trusted or User & Password") ### Trusted[​](#trusted "Direct link to Trusted") You can used a trusted (Windows or Kerberos Authentication) using the `--trusted` switch parameter. ``` ./FastBCP \ ... --server "myserver.mydomain.com\myinstance \ --trusted \ --database MySourceDB" \ ... ``` ### User and Password[​](#user-and-password "Direct link to User and Password") You can also provide a user and password the `--user` and `--password` can be used like this ``` ./FastBCP \ ... --server "myserver.mydomain.com\myinstance \ --user "FastUser" \ --password "FastPassword" \ --database MySourceDB" \ ... ``` ## 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 database. This connection string will override any other connection parameters and can be used if the other authentication mode are not enougth for your case You can use the connection string for any connection type. The connection string must be enclosed in double quotes. **Example:** ``` ./FastBCP \ ... --sourceconnectstring "Server=myserver;Database=mydb;User ID=FastUser;Password=FastPassword;Encrypt=True;TrustServerCertificate=True" ... ``` **Syntax:** * Short form: `-g "connection_string"` * Long form: `--sourceconnectstring "connection_string"` ## Database[​](#database "Direct link to Database") Optionally define a source database. **Example:** ``` ./FastBCP \ ... --database "AdventureWorks" \ ... ``` **Syntax:** * Short form: `-I "database_name"` * Long form: `--database "database_name"` ## Application Intent[​](#application-intent "Direct link to Application Intent") Specifies the application workload type when connecting to SQL Server. This parameter is only applicable for SQL Server (`mssql`) and OLEDB (`oledb`) connection types. **Syntax:** * Long form: `--applicationintent "ReadOnly|ReadWrite"` **Values:** * `ReadOnly` (default) - Declares the read-only workload type when connecting to a read-only replica in an Always On availability group * `ReadWrite` - Declares a read-write workload type (standard connection) **Example (Read-Only):** ``` ./FastBCP \ --connectiontype mssql \ --server "myserver.mydomain.com" \ --applicationintent ReadOnly \ --database "AdventureWorks" \ ... ``` **Example (Read-Write):** ``` ./FastBCP \ --connectiontype mssql \ --server "myserver.mydomain.com" \ --applicationintent ReadWrite \ --database "AdventureWorks" \ ... ``` info When using `ReadOnly`, the connection will be routed to a read-only replica if available in an Always On availability group configuration. This is useful for offloading reporting and export workloads from the primary replica. --- # CSV Formatting When exporting to CSV format (`.csv` extension), FastBCP provides extensive formatting options. ## Delimiter[​](#delimiter "Direct link to Delimiter") Use the `-d` or `--delimiter` parameter to specify the character(s) used to separate fields. ``` ./FastBCP \ ... --fileoutput "data.csv" \ --delimiter "," \ ... ``` **Syntax:** * Short form: `-d "delimiter"` * Long form: `--delimiter "delimiter"` **Default:** `,` (comma) ### Common Delimiters[​](#common-delimiters "Direct link to Common Delimiters") * Comma (CSV) * Tab (TSV) * Pipe * Semicolon ``` --delimiter "," ``` ``` --delimiter "\t" ``` ``` --delimiter "|" ``` ``` --delimiter ";" ``` ## Use Quotes[​](#use-quotes "Direct link to Use Quotes") Use the `-t` or `--quotes` switch to enclose string fields in double quotes. ``` ./FastBCP \ ... --fileoutput "products.csv" \ --quotes \ ... ``` **Syntax:** * Short form: `-t` * Long form: `--quotes` **Default:** Without quotes * Without --quotes * With --quotes ``` ProductID,ProductName,Description,Price 1,Widget A,Small widget,19.99 2,Widget B,Large widget,29.99 ``` ``` "ProductID","ProductName","Description","Price" "1","Widget A","Small widget","19.99" "2","Widget B","Large widget","29.99" ``` Information When `--quotes`, any double quotes (`"`) in the data are escaped with backslash (`\"`). ## Date Format[​](#date-format "Direct link to Date Format") Use the `-f` or `--dateformat` parameter to specify how dates and timestamps are formatted. ``` ./FastBCP \ ... --fileoutput "orders.csv" --dateformat "yyyy-MM-dd HH:mm:ss" \ ... ``` **Syntax:** * Short form: `-f "format"` * Long form: `--dateformat "format"` **Default:** `yyyy-MM-dd HH:mm:sszzz` Auto-adaptive formatting The date format is auto-adaptive based on the column type: * **Date-only** columns will always output as `yyyy-MM-dd` regardless of the format string * **Timestamp/DateTime** columns will output as `yyyy-MM-dd HH:mm:ss` even if a timezone token (`zzz`) is present in the format string * **DateTimeOffset** columns will include the timezone offset as specified ### Format Codes[​](#format-codes "Direct link to Format Codes") | Code | Description | Example | | ------ | ---------------- | -------- | | `yyyy` | 4-digit year | `2026` | | `MM` | Month (01-12) | `01` | | `dd` | Day (01-31) | `07` | | `HH` | Hour 24h (00-23) | `14` | | `mm` | Minute (00-59) | `30` | | `ss` | Second (00-59) | `22` | | `zzz` | UTC offset | `+02:00` | ## Decimal Separator[​](#decimal-separator "Direct link to Decimal Separator") Use the `-n` or `--decimalseparator` parameter to specify the decimal separator for numeric values. ``` ./FastBCP \ ... --fileoutput "products.csv" --decimalseparator "," ... ``` **Syntax:** * Short form: `-n "separator"` * Long form: `--decimalseparator "separator"` **Default:** `.` (period/dot) ## No Header[​](#no-header "Direct link to No Header") Use the `-h` or `--noheader` parameter to exclude column headers from the output. ``` ./FastBCP \ ... --fileoutput "customers.csv" \ --noheader \ ... ``` **Syntax:** * Short form: `-h` * Long form: `--noheader` - Without --noheader (default) - With --noheader ``` CustomerID,CustomerName,Email 1,John Doe,john@example.com 2,Jane Smith,jane@example.com ``` ``` 1,John Doe,john@example.com 2,Jane Smith,jane@example.com ``` ## Boolean Format[​](#boolean-format "Direct link to Boolean Format") Use the `-b` or `--boolformat` parameter to specify how boolean values are represented. ``` ./FastBCP \ ... --fileoutput "products.csv" \ --boolformat "1/0" \ ... ``` **Syntax:** * Short form: `-b "format"` * Long form: `--boolformat "format"` **Default:** `True/False` **Options:** * `true/false` * `True/False` (default) * `t/f` * `1/0` * `yes/no` * `y/n` **With `--boolformat "true/false"` (default):** ``` ProductID,ProductName,InStock,Discontinued 1,Widget A,true,false 2,Widget B,false,true ``` **With `--boolformat "1/0"`:** ``` ProductID,ProductName,InStock,Discontinued 1,Widget A,1,0 2,Widget B,0,1 ``` **With `--boolformat "yes/no"`:** ``` ProductID,ProductName,InStock,Discontinued 1,Widget A,yes,no 2,Widget B,no,yes ``` ## Complete Example[​](#complete-example "Direct link to Complete Example") * Windows * Linux ``` .\FastBCP.exe ` --connectiontype mssql ` --server "localhost" ` --database "AdventureWorks" ` --trusted ` --query "SELECT OrderID, OrderDate, CustomerName, TotalAmount, IsShipped FROM Sales.Orders WHERE OrderDate >= '2024-01-01'" ` --directory "C:\exports\sales" ` --fileoutput "orders_{startdate}.csv" ` --delimiter "," ` --quotes ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --decimalseparator "." ` --boolformat "1/0" ` --encoding "UTF-8" ``` ``` ./FastBCP \ --connectiontype mssql \ --server "localhost" \ --database "AdventureWorks" \ --trusted \ --query "SELECT OrderID, OrderDate, CustomerName, TotalAmount, IsShipped FROM Sales.Orders WHERE OrderDate >= '2024-01-01'" \ --directory "/exports/sales" \ --fileoutput "orders_{startdate}.csv" \ --delimiter "," \ --quotes \ --dateformat "yyyy-MM-dd HH:mm:ss" \ --decimalseparator "." \ --boolformat "1/0" \ --encoding "UTF-8" ``` **Output (orders\_20260107.csv):** ``` "OrderID","OrderDate","CustomerName","TotalAmount","IsShipped" "1001","2026-01-05 10:30:00","John Doe","299.99","1" "1002","2026-01-05 11:15:00","Jane Smith","149.50","0" "1003","2026-01-06 09:20:00","Bob Johnson","599.00","1" ``` tip For Excel compatibility, use `.xlsx` format instead: `--fileoutput "data.xlsx"` --- # License Configure how FastBCP 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 FastBCP license. By default, FastBCP will try to use the license file named `FastBCP.lic` in the same directory as the FastBCP executable. You can specify a custom license file using the `--license` parameter. ### License Sources[​](#license-sources "Direct link to License Sources") FastBCP 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 ``` .\FastBCP.exe ` ... --license "C:\licenses\FastBCP.lic" ` ... ``` ``` ./FastBCP \ ... --license "/path/to/licenses/FastBCP.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 ``` .\FastBCP.exe ` ... --license "https://licenseserve.yourdomain.lan/fastbcp.lic" ` ... ``` ``` ./FastBCP \ ... --license "https://licenseserve.yourdomain.lan/fastbcp.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:FASTBCP_LICENSE = "LICENSE_CONTENT_HERE" .\FastBCP.exe ` ... --license $env:FASTBCP_LICENSE ` ... # Using variable $license = Get-Content "C:\licenses\FastBCP.lic" -Raw .\FastBCP.exe ` ... --license $license ` ... ``` ``` # Using environment variable export FASTBCP_LICENSE="LICENSE_CONTENT_HERE" ./FastBCP \ ... --license "$FASTBCP_LICENSE" \ ... # Using variable license=$(cat /path/to/licenses/FastBCP.lic) ./FastBCP \ ... --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 parallel export: * Windows * Linux ``` .\FastBCP.exe ` --connectiontype pgsql ` --server "localhost:15432" ` --database "tpch10" ` --user "FastUser" ` --password "FastPassword" ` --query "SELECT * FROM dbo.orders" ` --directory "D:\temp" ` --fileoutput "pgsql_orders.parquet" ` --parallelmethod DataDriven ` --distributekeycolumn "YEAR(o_orderdate)" ` --paralleldegree 7 ` --merge false ` --runid "pgsql_to_parquet_parallel_datadriven" ` --license "//SharedUnc/licenses/fastbcp/fastbcp.lic" ``` ``` ./FastBCP \ --connectiontype pgsql \ --server "localhost:15432" \ --database "tpch10" \ --user "FastUser" \ --password "FastPassword" \ --query "SELECT * FROM dbo.orders" \ --directory "/temp" \ --fileoutput "pgsql_orders.parquet" \ --parallelmethod DataDriven \ --distributekeycolumn "YEAR(o_orderdate)" \ --paralleldegree 7 \ --merge false \ --runid "pgsql_to_parquet_parallel_datadriven" \ --license "//SharedUnc/licenses/fastbcp/fastbcp.lic" ``` This example: * Retrieves the license from a remote unc path * Connects to a PostgreSQL database * Exports orders data using DataDriven parallel method with 7 threads * Uses a YEAR expression on the distribute key column * Keeps distributed files separate (merge=false) --- # Output Info Configure where and how FastBCP saves exported data. ## Directory[​](#directory "Direct link to Directory") Use the `-D` or `--directory` parameter to specify where the output file(s) will be saved. ### Local Paths[​](#local-paths "Direct link to Local Paths") * Windows * Linux ``` .\FastBCP.exe \ ... --directory "C:\exports\sales\orders" \ ... ``` ``` ./FastBCP \ ... --directory "/exports/sales/orders" \ ... ``` ### UNC Paths[​](#unc-paths "Direct link to UNC Paths") For Windows network shares, you can use UNC paths: ``` .\FastBCP.exe \ ... --directory "\\server\share\exports\orders" \ ... ``` ### Cloud Paths[​](#cloud-paths "Direct link to Cloud Paths") FastBCP supports direct export to cloud storage: * AWS S3 * Azure Blob * Azure Data Lake Gen2 * Google Cloud Storage * S3-Compatible (MinIO, OVH) * OneLake ``` ./FastBCP \ ... --directory "s3://my-bucket/exports/orders" \ ... ``` ``` ./FastBCP \ ... --directory "abs://mystorageaccount.blob.core.windows.net/container/path" \ ... ``` ``` ./FastBCP \ ... --directory "abfss://mystorageaccount.dfs.core.windows.net/container/path/to/data" \ ... ``` ``` ./FastBCP \ ... --directory "gs://my-bucket/exports/orders" \ ... ``` ``` ./FastBCP \ ... --directory "s3://my-bucket/exports" \ ... ``` ``` ./FastBCP \ ... --directory "onelake://myworkspace.dfs.core.windows.net/lakehouse/path/to/data" \ ... ``` Information See [Cloud Options](/1.1/documentation/cli/cloud_options.md) for authentication and configuration details. **Syntax:** * Short form: `-D "path"` * Long form: `--directory "path"` ## Output File[​](#output-file "Direct link to Output File") Use the `-o` or `--fileoutput` parameter to specify the name of the output file. The file extension determines the output format. ``` ./FastBCP \ ... --fileoutput "orders.parquet" \ ... ``` **Syntax:** * Short form: `-o "filename"` * Long form: `--fileoutput "filename"` ### Supported Formats[​](#supported-formats "Direct link to Supported Formats") | Extension | Format | Description | | ---------- | ------------ | --------------------------------------------------- | | `.parquet` | Parquet | Columnar, compressed (recommended) | | `.csv` | CSV | Delimiter-separated values | | `.tsv` | TSV | Tab-separated values | | `.json` | JSON | JavaScript Object Notation | | `.bson` | BSON | Binary JSON | | `.xlsx` | Excel | Microsoft Excel format | | `.bin` | Binary | PostgreSQL COPY binary format | | `.csv.gz` | CSV Gzipped | Delimiter-separated values and compressed with Gzip | | `.tsv.gz` | TSV Gzipped | Tab delimited values and compressed with Gzip | | `.json.gz` | JSON Gzipped | JavaScript Object Notation with Gzip | ## Tokens[​](#tokens "Direct link to Tokens") Use tokens in `--directory` and `--fileoutput` parameters for dynamic paths and filenames. ``` ./FastBCP \ ... --directory "/exports/{sourcedatabase}/{sourceschema}" \ --fileoutput "{sourcetable}_{startdate}.parquet" \ ... ``` **Syntax:** Tokens are enclosed in curly braces `{token_name}` ### Available Tokens[​](#available-tokens "Direct link to Available Tokens") | Token | Description | Example Value | | ------------------------- | ---------------------------------- | ------------------------------------ | | `{sourcedatabase}` | Value from `--database` | `AdventureWorks` | | `{sourceschema}` | Value from `--sourceschema` | `Sales` | | `{sourcetable}` | Value from `--sourcetable` | `Orders` | | `{starttimestamp}` | Job start (yyyyMMddHHmmss) | `20260107143022` | | `{starttimestamp:FORMAT}` | Custom timestamp format | [See below](#timestamp-format-codes) | | `{startdate}` | Job start date (yyyyMMdd) | `20260107` | | `{starttime}` | Job start time (HHmmss) | `143022` | | `{starthour}` | Job start hour (HH) | `14` | | `{user}` | Username (from `--user` or system) | `dbuser` | | `{filetype}` | Output format extension | `parquet` | | `{datadrivencolumn}` | Data-driven split value | Varies | ### Timestamp Format Codes[​](#timestamp-format-codes "Direct link to Timestamp Format Codes") Use `{starttimestamp:FORMAT}` with custom format: | Format | Description | Example | | ------ | ---------------- | ------- | | `yyyy` | 4-digit year | `2026` | | `yy` | 2-digit year | `26` | | `MM` | Month (01-12) | `01` | | `dd` | Day (01-31) | `07` | | `HH` | Hour 24h (00-23) | `14` | | `mm` | Minute (00-59) | `30` | | `ss` | Second (00-59) | `22` | **Examples:** ``` # yyyyMMdd format ./FastBCP \ ... --fileoutput "orders_{starttimestamp:yyyyMMdd}.parquet" \ ... # yyyy-MM-dd format ./FastBCP \ ... --fileoutput "orders_{starttimestamp:yyyy-MM-dd}.parquet" \ ... # yyyyMMddHH format (hourly) ./FastBCP \ ... --fileoutput "logs_{starttimestamp:yyyyMMddHH}.parquet" \ ... ``` ## Timestamped Output[​](#timestamped-output "Direct link to Timestamped Output") Use the `-x` or `--timestamped` parameter to automatically add a timestamp to the filename. ``` ./FastBCP \ ... --fileoutput "orders.parquet" \ --timestamped \ ... ``` **Syntax:** * Short form: `-x` * Long form: `--timestamped` tip `--timestamped` automatically appends `_yyyyMMddHHmmss` to the filename. For more control over format and placement, use timestamp tokens instead. ## Encoding[​](#encoding "Direct link to Encoding") Use the `-e` or `--encoding` parameter to specify character encoding for text formats (CSV, JSON, TSV). ``` ./FastBCP \ ... --fileoutput "orders.csv" \ --encoding "UTF-8" \ ... ``` **Syntax:** * Short form: `-e "encoding"` * Long form: `--encoding "encoding"` **Default:** `UTF-8` note Encoding is not applicable to Parquet files (they use UTF-8 internally). --- # Parallel Parameters FastBCP 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 ``` .\FastBCP.exe ` ... --parallelmethod Ntile ` ... ``` ``` ./FastBCP \ ... --parallelmethod Ntile \ ... ``` **Syntax:** * Short form: `-m ` * Long form: `--parallelmethod ` ### Methods Comparison[​](#methods-comparison "Direct link to Methods Comparison") | Method | Parallel | Needs Distributed Column | Database Source Type | | --------------- | -------- | ------------------------ | ------------------------- | | `None` | | | Any | | `Random` | | | Any | | `DataDriven` | | | Any | | `RangeId` | | | Any | | `Ntile` | | | Any | | `Ctid` | | | PostgreSQL (pgsql/pgcopy) | | `Physloc` | | | SQL Server (mssql) | | `Rowid` | | | Oracle (oraodp) | | `NZDataSlice` | | | Netezza (nzsql) | | `Timepartition` | | | Any | ### Available Methods[​](#available-methods "Direct link to Available Methods") **None** - No parallel processing. Data is exported sequentially. **DataDriven** - Uses all values of a column (or a given list provided by `--datadrivenquery`) to split the export. If the number of values is greater than the degree of parallelism, throttling will be applied. tip You can use an expression in the distribute key column instead of a column name.
Example: `YEAR(o_orderdate)` **Ntile** - Uses the distributed column field and ntile values to retrieve evenly distributed chunks of data. Each parallel thread exports a portion based on a range built using the distributed column values. The uniqueness of the distributed column is not mandatory. **RangeId** - Uses the distributed column field and its min/max values to retrieve chunks of data. Each parallel thread exports a portion based on a range built using the distributed column values. **Random** - Requires a distribution column that must be an integer/bigint with many values (at least as many as the degree of parallelism). **Ctid** - Uses an internal hidden field to retrieve chunks of data. Each parallel thread exports a portion based on the CTID range. note PostgreSQL databases only (and some compatible PostgreSQL databases). **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. **Rowid** - Uses an internal hidden field to retrieve chunks of data. Each parallel thread exports a portion based on the ROWID range. note `RowId` parallel method is for Oracle databases only. **NZDataSlice** - Uses the native Netezza data slices to retrieve chunks of data. Each parallel thread exports a portion based on the data slice distribution. note `NZDataSlice` parallel method is for Netezza databases only. **Timepartition** - Uses a date/datetime column to partition data into time-based chunks. Each parallel thread exports data for a specific time period (year, month, week, or day). The distributed key column must be specified in a special format: `(datecolumn, year, month)`, `(datecolumn, year, month, day)`, `(datecolumn, year)`, or `(datecolumn, year, week)`. tip This method is ideal for time-series data and allows efficient parallel export based on temporal ranges. ## Distribute Key Column[​](#distribute-key-column "Direct link to Distribute Key Column") Use the `-c` or `--distributekeycolumn` parameter to define the column (or computation) on the data source that will be used to split the data into several parts. FastBCP 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. Timepartition Special Format When using the `Timepartition` method, the distribute key column must be specified in a special format: * `(datecolumn, year, month)` - Partition by year and month * `(datecolumn, year, month, day)` - Partition by year, month, and day * `(datecolumn, year)` - Partition by year only * `(datecolumn, year, week)` - Partition by year and week Example: `--distributekeycolumn "(o_orderdate, year, month)"` * Windows * Linux ``` # Using a column name .\FastBCP.exe ` ... --distributekeycolumn order_date ` ... # Using an expression .\FastBCP.exe ` ... --distributekeycolumn "YEAR(order_date)" ` ... ``` ``` # Using a column name ./FastBCP \ ... --distributekeycolumn order_date \ ... # Using an expression ./FastBCP \ ... --distributekeycolumn "YEAR(order_date)" \ ... ``` **Syntax:** * Short form: `-c ` * Long form: `--distributekeycolumn ` ## Degree of Parallelism[​](#degree-of-parallelism "Direct link to Degree of Parallelism") Use the `-p` or `--paralleldegree` 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 .\FastBCP.exe ` ... --paralleldegree 8 ` ... # Auto-detect based on CPU cores .\FastBCP.exe ` ... --paralleldegree 0 ` ... # Use half of available cores .\FastBCP.exe ` ... --paralleldegree -2 ` ... ``` ``` # Use 8 parallel threads ./FastBCP \ ... --paralleldegree 8 \ ... # Auto-detect based on CPU cores ./FastBCP \ ... --paralleldegree 0 \ ... # Use half of available cores ./FastBCP \ ... --paralleldegree -2 \ ... ``` **Syntax:** * Short form: `-p ` * Long form: `--paralleldegree ` **Default:** `-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. * Windows * Linux ``` .\FastBCP.exe ` ... --datadrivenquery "SELECT tagname FROM tags" ` ... ``` ``` ./FastBCP \ ... --datadrivenquery "SELECT tagname FROM tags" \ ... ``` * Windows * Linux ``` .\FastBCP.exe ` ... --datadrivenquery "SELECT o_orderdate FROM dim_date where ref_date > getdate() - 30" ` ... ``` ``` ./FastBCP \ ... --datadrivenquery "SELECT o_orderdate FROM dim_date where ref_date > getdate() - 30" \ ... ``` **Syntax:** * Long form only: `--datadrivenquery ""` ## Merge (boolean)[​](#merge-boolean "Direct link to Merge (boolean)") Use the `-M` or `--merge` true/false to specify if the temporary files generated for the parallel export should be kept splitted. Default `false` warning Current version allows valid merge for CSV and Parquet formats only. warning Merge is not available for cloud destinations warning Merge is automatic for local files destination * Windows * Linux ``` # Merge files after parallel export (default for local files) .\FastBCP.exe ` ... --merge true ` ... # Keep distributed files .\FastBCP.exe ` ... --merge false ` ... ``` ``` # Merge files after parallel export (default for local files) ./FastBCP \ ... --merge true \ ... # Keep distributed files ./FastBCP \ ... --merge false \ ... ``` **Syntax:** * Short form: `-M` * Long form: `--merge` **Default:** `true` ## Complete Example[​](#complete-example "Direct link to Complete Example") Here's a complete example using parallel parameters with the DataDriven method: * Windows * Linux ``` .\FastBCP.exe ` --connectiontype "pgcopy" ` --server "localhost:15432" ` --database "tpch" ` --user "FastUser" ` --password "FastPassword" ` --query "with T1 AS (select *, to_char(o_orderdate, 'YYYYMM') o_ordermonth from tpch_10.orders) SELECT * FROM T1" ` --directory "D:\temp\tpch\orders\" ` --fileoutput "pgcopy_orders.parquet" ` --method "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" ` --paralleldegree 10 ` --merge "False" ` --runid "pgcopy_to_parquet_parallel12_DataDriven" ``` ``` ./FastBCP \ --connectiontype "pgcopy" \ --server "localhost:15432" \ --database "tpch" \ --user "FastUser" \ --password "FastPassword" \ --query "with T1 AS (select *, to_char(o_orderdate, 'YYYYMM') o_ordermonth from tpch_10.orders) SELECT * FROM T1" \ --directory "/data/export/tpch/orders/" \ --fileoutput "pgcopy_orders.parquet" \ --method "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" \ --paralleldegree 10 \ --merge "False" \ --runid "pgcopy_to_parquet_parallel12_DataDriven" ``` This example: * Connects to a PostgreSQL database on localhost:15432 * Exports data from the dbo.orders table * Uses the DataDriven distribution method * Distributes work based on the month of the order date using an expression * Use a custom query to generate month values to extract from a light query (instead of a `SELECT DISTINCT o_ordermonth` from the source query) * Uses 10 parallel threads (even if there is 12 month to export) * Keeps distributed files without merging (--merge false) * Assigns a custom Run ID for tracking ## Timepartition Example[​](#timepartition-example "Direct link to Timepartition Example") Here's an example using the Timepartition method to partition data based on a date column: * Windows * Linux ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "tpch_copy" ` --user "FastUser" ` --password "FastPassword" ` --sourceschema "tpch_10" ` --sourcetable "orders_date_sorted" ` --directory "D:\temp\TestPartition" ` --fileoutput "orders.csv" ` --decimalseparator "," ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --method "Timepartition" ` --distributekeycolumn "(o_orderdate,year,month)" ` --paralleldegree 16 ` --merge "False" ` --runid "mssql_to_csv_parallel8_timepartition" ``` ``` ./FastBCP \ --connectiontype "mssql" \ --server "localhost" \ --database "tpch_copy" \ --user "FastUser" \ --password "FastPassword" \ --sourceschema "tpch_10" \ --sourcetable "orders_date_sorted" \ --directory "/data/export/TestPartition" \ --fileoutput "orders.csv" \ --decimalseparator "," \ --delimiter "|" \ --dateformat "yyyy-MM-dd HH:mm:ss" \ --encoding "UTF-8" \ --method "Timepartition" \ --distributekeycolumn "(o_orderdate,year,month)" \ --paralleldegree 16 \ --merge "False" \ --runid "mssql_to_csv_parallel8_timepartition" ``` This example: * Connects to a SQL Server database on localhost * Exports data from the tpch\_10.orders\_date\_sorted table * Uses the Timepartition distribution method * Partitions data by year and month based on the o\_orderdate column * Uses 16 parallel threads * Keeps distributed files without merging * Assigns a custom Run ID for tracking --- # Parquet Formatting [Apache Parquet](https://parquet.apache.org/) is a columnar storage format optimized for analytics. FastBCP automatically uses Parquet format when the output file has a `.parquet` extension. ## Parquet Compression[​](#parquet-compression "Direct link to Parquet Compression") Use the `--parquetcompression` parameter to specify the parquet compression codec. ``` ./FastBCP \ ... --fileoutput "orders.parquet" \ --parquetcompression Snappy \ ... ``` **Syntax:** * Long form: `--parquetcompression ` **Default:** `Zstd` (faster and better compression ratio than others) **Available Algorithms:** * `None` - No compression * `Snappy` - Fast, small compression, classic * `Gzip` - Smaller files, slower * `Lzo` - Slower, medium compression (rarely used) * `Lz4` - Slower, moderate compression * `Zstd` - Best compression and Fast (default) tip The **Zstd** (default) is best for most cases. It provides the best compression ratio with moderate speed, ideal for cloud storage to minimize storage costs and transfer time. * So no need to set this parameter to use Zstd. ## Row Group Size Configuration[​](#row-group-size-configuration "Direct link to Row Group Size Configuration") Available since version 0.30.1 This feature is available starting from FastBCP version 0.30.1. You can control the Parquet row group size using the `FASTBCP_RGSIZE` environment variable. Row groups are the unit of parallelization in Parquet files, and their size can impact query performance and memory usage. **Environment Variable:** `FASTBCP_RGSIZE` **Default Value:** `1000000` (1 million rows) **Usage:** * Windows * Linux ``` # Set the row group size to 500,000 rows $env:FASTBCP_RGSIZE = "500000" # Run FastBCP .\FastBCP.exe --connectiontype mssql --server "localhost" ... ``` ``` # Set the row group size to 500,000 rows export FASTBCP_RGSIZE=500000 # Run FastBCP ./FastBCP --connectiontype mssql --server "localhost" ... ``` ## Complete Example[​](#complete-example "Direct link to Complete Example") * Windows * Linux ``` $env:FASTBCP_RGSIZE = "500000" .\FastBCP.exe ` --connectiontype mssql ` --server "localhost" ` --database "sales" ` --trusted ` --query "SELECT * FROM orders WHERE OrderDate >= '2024-01-01'" ` --directory "C:\exports" ` --fileoutput "orders.parquet" ` --parquetcompression Snappy ``` ``` export FASTBCP_RGSIZE=500000 ./FastBCP \ --connectiontype mssql \ --server "localhost" \ --database "sales" \ --trusted \ --query "SELECT * FROM orders WHERE OrderDate >= '2024-01-01'" \ --directory "/exports" \ --fileoutput "orders.parquet" \ --parquetcompression Snappy ``` --- # Source Info FastBCP offers multiple ways to define your data source for extraction. You can use a query, an input file, or specify schema and table names directly. ## Query[​](#query "Direct link to Query") Use the `-q` or `--query` parameter to specify your extraction as a SELECT statement. ``` ./FastBCP \ ... --query "SELECT * FROM Sales.Orders WHERE OrderDate >= '2024-01-01'" \ ... ``` **Syntax:** * Short form: `-q "SELECT_statement"` * Long form: `--query "SELECT_statement"` ## Input File[​](#input-file "Direct link to Input File") Use the `-F` or `--fileinput` parameter to specify an input file that contains only one query. ``` ./FastBCP \ ... --fileinput "/sources/sql/queries/my_extraction.sql" \ ... ``` **Syntax:** * Short form: `-F "file_path"` * Long form: `--fileinput "file_path"` Warning The query in the input file must not end with a semicolon (`;`). ## Source Schema[​](#source-schema "Direct link to Source Schema") If no query or input file is used, you can specify the source schema with the `-s` or `--sourceschema` parameter. Combined with the source table, this will extract data from `sourceschema.sourcetable`. ``` ./FastBCP \ ... --sourceschema "Sales" \ --sourcetable "Orders" \ ... ``` **Syntax:** * Short form: `-s "schema_name"` * Long form: `--sourceschema "schema_name"` Information This field is mandatory if some parallel method is used. See **[Advanced Parameters](/1.1/documentation/cli/advanced_parameters.md)** section for more details. ## Source Table[​](#source-table "Direct link to Source Table") If no query or input file is used, you can specify the source table with the `-T` or `--sourcetable` parameter. Combined with the source schema, this will extract data from `sourceschema.sourcetable`. ``` ./FastBCP \ ... --sourceschema "Sales" \ --sourcetable "Orders" \ ... ``` **Syntax:** * Short form: `-T "table_name"` * Long form: `--sourcetable "table_name"` Information This field is mandatory if some parallel method is used. See **[Advanced Parameters](/1.1/documentation/cli/advanced_parameters.md)** section for more details. Warning if you use the placeholder `{sourceschema}` and `{sourcetable}` in the `--directory` or `--fileoutput` (See **[Output Info](/1.1/documentation/cli/output_info.md)**) then you must set the `--sourceschema `and the `--sourcetable `even you use `--query `or `--inputfile` --- # AWS S3 Configuration Complete guide for configuring AWS S3 connectivity with FastBCP. ## Authentication Methods[​](#authentication-methods "Direct link to Authentication Methods") FastBCP 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 FastBCP:** ``` # Use default profile ./FastBCP \ ... --directory "s3://my-bucket/exports" \ --fileoutput "data.parquet" \ ... # Use production profile ./FastBCP \ ... --directory "s3://prod-bucket/exports" \ --cloudprofile "production" \ --fileoutput "data.parquet" \ ... # Use development profile ./FastBCP \ ... --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 FastBCP .\FastBCP.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 FastBCP ./FastBCP \ ... --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 FastBCP 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 FastBCP:** ``` { "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 ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "orders" ` --directory "s3://my-bucket/exports/{sourcetable}" ` --fileoutput "{sourcetable}.parquet" ``` ``` ./FastBCP \ --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 ``` .\FastBCP.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" ``` ``` ./FastBCP \ --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 ``` .\FastBCP.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 ``` ``` ./FastBCP \ --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") FastBCP 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 FastBCP. ## 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") FastBCP 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 ``` FastBCP will automatically use the Azure CLI's authentication credentials. **Using with FastBCP:** ``` # No additional configuration needed - just run FastBCP ./FastBCP \ ... --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 FastBCP .\FastBCP.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 FastBCP ./FastBCP \ ... --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 FastBCP .\FastBCP.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 FastBCP ./FastBCP \ ... --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 FastBCP 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 ``` .\FastBCP.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" ``` ``` ./FastBCP \ --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 ``` .\FastBCP.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 ``` ``` ./FastBCP \ --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 ``` .\FastBCP.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" ``` ``` ./FastBCP \ --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 ``` .\FastBCP.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 ``` ``` ./FastBCP \ --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 FastBCP. ## Authentication Methods[​](#authentication-methods "Direct link to Authentication Methods") FastBCP 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 ``` FastBCP will automatically use the gcloud CLI's authentication credentials. **Using with FastBCP:** ``` # No additional configuration needed - just run FastBCP ./FastBCP \ ... --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., "fastbcp-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 fastbcp-export \ --display-name="FastBCP Export Service Account" # Grant Storage Object Admin role gcloud projects add-iam-policy-binding my-project-id \ --member="serviceAccount:fastbcp-export@my-project-id.iam.gserviceaccount.com" \ --role="roles/storage.objectAdmin" # Create and download key file gcloud iam service-accounts keys create ~/fastbcp-key.json \ --iam-account=fastbcp-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\fastbcp-key.json" # Run FastBCP .\FastBCP.exe ` ... --directory "gs://my-bucket/exports" ` --fileoutput "data.parquet" ` ... ``` ``` # Set path to service account key file export GOOGLE_APPLICATION_CREDENTIALS="/path/to/fastbcp-key.json" # Run FastBCP ./FastBCP \ ... --directory "gs://my-bucket/exports" \ --fileoutput "data.parquet" \ ... ``` ### 3. Default Application Credentials[​](#3-default-application-credentials "Direct link to 3. Default Application Credentials") When FastBCP 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 ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Orders" ` --directory "gs://my-bucket/exports/orders" ` --fileoutput "orders.parquet" ``` ``` ./FastBCP \ --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 ``` .\FastBCP.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 ``` ``` ./FastBCP \ --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 ``` .\FastBCP.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 ``` ``` ./FastBCP \ --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 ``` .\FastBCP.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 ``` ``` ./FastBCP \ --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:fastbcp-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 FastBCP 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" .\FastBCP.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 "onelake://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" ./FastBCP ` --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 "onelake://myworkspace/mylakehouse/{sourcedatabase}/{sourceschema}/{sourcetable}/year=2024/" \ --fileoutput "orders_2024.parquet" \ --parallelmethod "Ctid" \ --paralleldegree 8 ``` --- # Cloud Connectivity Overview FastBCP 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 FastBCP will use multi-part uploads for all cloud provider Warning Since FastBCP 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") FastBCP 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](/1.1/documentation/cloud-connectivity/aws-s3.md) * [Azure Setup](/1.1/documentation/cloud-connectivity/azure.md) * [Google Cloud Storage Setup](/1.1/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 ./FastBCP / ... --directory "s3://my-bucket/exports" / --fileoutput "data.parquet" / ... ``` ``` # Azure Blob ./FastBCP \ ... --directory "abs://account.blob.core.windows.net/container/exports/" \ --fileoutput "data.parquet" \ ... ``` ``` # Azure Datalake Gen 2 ./FastBCP \ ... --directory "abs://account.dfs.core.windows.net/container/exports/" \ --fileoutput "data.parquet" \ ... ``` ``` # Google Cloud Storage ./FastBCP \ ... --directory "gs://my-bucket/exports" \ --fileoutput "data.parquet" \ ... ``` ``` # OneLake ./FastBCP \ ... --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: ``` ./FastBCP \ ... --directory "s3://prod-bucket/exports" \ --cloudprofile "production" \ ... ./FastBCP \ ... --directory "s3://dev-bucket/exports" \ --cloudprofile "development" ... ``` --- # Operating Systems FastBCP supports Windows and Linux 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 | | ------------------------ | -------------------------- | ------------- | --------- | | Amazon Linux | 2023 (Kernel 6.1) | Arm64, x64 | | | 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 FastBCP supports a wide range of database systems across different platforms. ## Supported Databases & Platforms[​](#supported-databases--platforms "Direct link to Supported Databases & Platforms") | Database | Windows AMD64 | Linux AMD64 | Linux ARM64 | | --------------------- | ------------- | ----------- | ----------- | | **SQL Server** | | | | | **SQL Server (ADBC)** | | | | | **PostgreSQL** | | | | | **PostgreSQL (ADBC)** | | | | | **MySQL** | | | | | **Oracle** | | | | | **ClickHouse** | | | | | **DuckDB** | | | | | **Teradata** | | | | | **Netezza** | | | | | **SAP HANA** | | | | | **ODBC** | | | | | **OLEDB** | | | | --- # FASTBCP\_CLOUD\_ISBUFFERED ## Overview[​](#overview "Direct link to Overview") The `FASTBCP_CLOUD_ISBUFFERED` environment variable controls whether FastBCP uses buffered uploads when writing to cloud storage. ## Syntax[​](#syntax "Direct link to Syntax") * Windows * Linux ``` $env:FASTBCP_CLOUD_ISBUFFERED = "True" # or "False" ``` ``` export FASTBCP_CLOUD_ISBUFFERED=True # or False ``` ## Configuration[​](#configuration "Direct link to Configuration") | Property | Value | | -------------- | --------------------------------------------------------------------- | | **Type** | Boolean (`True` / `False`) | | **Default** | `False` | | **Applies to** | Azure Data Lake Storage (ADLS), OneLake, AWS S3, Google Cloud Storage | | **Since** | FastBCP 1.0 | ## Behavior[​](#behavior "Direct link to Behavior") ### When `False` (Default)[​](#when-false-default "Direct link to when-false-default") FastBCP uses the cloud SDK's `OpenWriteAsync` streaming upload: * Data is written directly to the cloud storage in chunks * Each chunk blocks the writer until acknowledged * **Simpler** but can be **slower** for Azure storage ### When `True` (Recommended for Azure)[​](#when-true-recommended-for-azure "Direct link to when-true-recommended-for-azure") FastBCP uses buffered uploads: * Data is first written to a local temporary file (see [`FASTBCP_TMPPATH`](/1.1/documentation/environment-variables/fastbcp-tmppath.md)) * When the stream is closed, the file is uploaded in parallel blocks (azcopy-like pattern) * **Significantly faster** for Azure Data Lake Storage and OneLake * Requires temporary disk space --- # FASTBCP\_CLOUD\_MAXUPLOADTHREAD\_PER\_STREAM ## Overview[​](#overview "Direct link to Overview") The `FASTBCP_CLOUD_MAXUPLOADTHREAD_PER_STREAM` environment variable controls the maximum number of parallel threads used to upload each file to cloud storage during buffered uploads. ## Syntax[​](#syntax "Direct link to Syntax") * Windows * Linux ``` $env:FASTBCP_CLOUD_MAXUPLOADTHREAD_PER_STREAM = 16 ``` ``` export FASTBCP_CLOUD_MAXUPLOADTHREAD_PER_STREAM=16 ``` ## Configuration[​](#configuration "Direct link to Configuration") | Property | Value | | -------------- | -------------------------------------------------------------------------------------------------------------------------- | | **Type** | Integer (> 0) | | **Default** | `8` when `parallelmethod=None`, `2` otherwise | | **Applies to** | Cloud uploads when [`FASTBCP_CLOUD_ISBUFFERED=True`](/1.1/documentation/environment-variables/fastbcp-cloud-isbuffered.md) | | **Since** | FastBCP 1.0 | ## Behavior[​](#behavior "Direct link to Behavior") ### Default Values[​](#default-values "Direct link to Default Values") FastBCP automatically adjusts the default based on the parallel extraction method: | Parallel Method | Default Threads | Reason | | --------------------------- | --------------- | ---------------------------------------------------------------------------------------------- | | `None` (single stream) | `8` | FastBCP itself is not parallelized, so more bandwidth can be allocated to upload | | `Ntile`, `DataDriven`, etc. | `2` | FastBCP is already extracting in parallel, so limit upload threads to avoid saturating network | ### How It Works[​](#how-it-works "Direct link to How It Works") When [`FASTBCP_CLOUD_ISBUFFERED=True`](/1.1/documentation/environment-variables/fastbcp-cloud-isbuffered.md): 1. Data is written to a local temporary file 2. On stream close, the file is uploaded in parallel blocks 3. `FASTBCP_CLOUD_MAXUPLOADTHREAD_PER_STREAM` controls how many threads upload blocks concurrently 4. Maps to `StorageTransferOptions.MaximumConcurrency` in Azure SDK --- # FASTBCP\_DATEFORMAT ## Overview[​](#overview "Direct link to Overview") The `FASTBCP_DATEFORMAT` environment variable lets you specify a custom format string for converting date values to strings in the output. When not set, FastBCP uses the default `yyyy-MM-dd HH:mm:sszzz`. The format string follows [.NET standard and custom date/time format patterns](https://learn.microsoft.com/en-us/dotnet/standard/base-types/custom-date-and-time-format-strings). ## Syntax[​](#syntax "Direct link to Syntax") * Windows * Linux ``` $env:FASTBCP_DATEFORMAT = "yyyyMMdd" ``` ``` export FASTBCP_DATEFORMAT=yyyyMMdd ``` ## Configuration[​](#configuration "Direct link to Configuration") | Property | Value | | -------------- | --------------------------------------------------------------------------- | | **Type** | Format string | | **Default** | `yyyy-MM-dd HH:mm:sszzz` | | **Applies to** | All output formats that serialize date columns as strings (CSV, JSON, etc.) | | **Since** | FastBCP 1.0 | Auto-adaptive formatting The date format is auto-adaptive based on the column type: * **Date-only** columns will always output as `yyyy-MM-dd` regardless of the format string * **Timestamp/DateTime** columns will output as `yyyy-MM-dd HH:mm:ss` even if a timezone token (`zzz`) is present in the format string * **DateTimeOffset** columns will include the timezone offset as specified ## Format Examples[​](#format-examples "Direct link to Format Examples") | Format string | Example output | | ---------------------------------- | --------------------------- | | `yyyy-MM-dd HH:mm:sszzz` (default) | `2026-06-28 14:30:22+02:00` | | `yyyy-MM-dd` | `2026-06-28` | | `yyyyMMdd` | `20260628` | | `dd/MM/yyyy` | `28/06/2026` | | `MM-dd-yyyy` | `06-28-2026` | | `yyyy/MM/dd` | `2026/06/28` | | `yyyy-MM-dd HH:mm:ss` | `2026-06-28 14:30:22` | ## Examples[​](#examples "Direct link to Examples") ### Compact date format — no separators[​](#compact-date-format--no-separators "Direct link to Compact date format — no separators") * Windows * Linux ``` $env:FASTBCP_DATEFORMAT = "yyyyMMdd" fastbcp -S myserver.database.windows.net ` -d MyDatabase ` -T dbo.MyTable ` --fileoutput "output.csv" ``` ``` export FASTBCP_DATEFORMAT=yyyyMMdd fastbcp -S myserver.database.windows.net \ -d MyDatabase \ -T dbo.MyTable \ --fileoutput "output.csv" ``` Output column value: `20260628` ### Restore default ISO 8601 format[​](#restore-default-iso-8601-format "Direct link to Restore default ISO 8601 format") * Windows * Linux ``` Remove-Item Env:FASTBCP_DATEFORMAT ``` ``` unset FASTBCP_DATEFORMAT ``` --- # FASTBCP\_RGSIZE ## Overview[​](#overview "Direct link to Overview") The `FASTBCP_RGSIZE` environment variable controls the row group size for Parquet file exports. Row groups are the primary unit for organizing data within a Parquet file and significantly impact query performance and compression efficiency. ## Syntax[​](#syntax "Direct link to Syntax") * Windows * Linux ``` $env:FASTBCP_RGSIZE = 500000 ``` ``` export FASTBCP_RGSIZE=500000 ``` ## Configuration[​](#configuration "Direct link to Configuration") | Property | Value | | -------------- | -------------------------- | | **Type** | Integer (> 0) | | **Default** | `1000000` (1 million rows) | | **Applies to** | Parquet file exports | | **Since** | FastBCP 0.30 | ## What is a Row Group?[​](#what-is-a-row-group "Direct link to What is a Row Group?") A **row group** is a horizontal partition of data in a Parquet file: * Parquet files are divided into one or more row groups * Each row group contains a subset of rows * Column data within a row group is compressed together * Query engines can skip entire row groups based on metadata ``` Parquet File Structure: ├── Row Group 1 (1M rows) │ ├── Column A (compressed) │ ├── Column B (compressed) │ └── Column C (compressed) ├── Row Group 2 (1M rows) │ ├── Column A (compressed) │ ├── Column B (compressed) │ └── Column C (compressed) └── Footer (metadata) ``` --- # FASTBCP\_TMPPATH ## Overview[​](#overview "Direct link to Overview") The `FASTBCP_TMPPATH` environment variable specifies the base directory where FastBCP creates temporary files during buffered cloud uploads. ## Syntax[​](#syntax "Direct link to Syntax") * Windows * Linux ``` $env:FASTBCP_TMPPATH = "D:\temp\fastbcp" ``` ``` export FASTBCP_TMPPATH=/tmp/fastbcp ``` ## Configuration[​](#configuration "Direct link to Configuration") | Property | Value | | -------------- | -------------------------------------------------------------------------------------------------------------------------- | | **Type** | Directory path (absolute or relative) | | **Default** | System temp directory (`%TEMP%` on Windows, `$TMPDIR` on Linux/macOS) | | **Applies to** | Cloud uploads when [`FASTBCP_CLOUD_ISBUFFERED=True`](/1.1/documentation/environment-variables/fastbcp-cloud-isbuffered.md) | | **Since** | FastBCP 1.0 | ## Behavior[​](#behavior "Direct link to Behavior") ### Default Behavior (Not Set)[​](#default-behavior-not-set "Direct link to Default Behavior (Not Set)") FastBCP uses the system's default temporary directory: * **Windows**: `%TEMP%` (typically `C:\Users\\AppData\Local\Temp`) * **Linux/macOS**: `$TMPDIR` (typically `/tmp`) ### Custom Path[​](#custom-path "Direct link to Custom Path") When set, FastBCP creates a unique subdirectory per process: ``` /fastbcp_/ ``` **Example:** ``` D:\temp\fastbcp\fastbcp_a1b2c3d4-e5f6-7890-abcd-ef1234567890\ ``` ### Automatic Cleanup[​](#automatic-cleanup "Direct link to Automatic Cleanup") * Subdirectories are created automatically * Temporary files are deleted after successful upload * In case of errors, files may remain and need manual cleanup --- # FASTBCP\_UID\_STRING\_CASING ## Overview[​](#overview "Direct link to Overview") The `FASTBCP_UID_STRING_CASING` environment variable controls whether UID (UUID) values are converted to lowercase or uppercase strings in the output. The default is lowercase, which follows [RFC 4122](https://www.rfc-editor.org/rfc/rfc4122) standard formatting (e.g. `550e8400-e29b-41d4-a716-446655440000`). ## Syntax[​](#syntax "Direct link to Syntax") * Windows * Linux ``` $env:FASTBCP_UID_STRING_CASING = "upper" ``` ``` export FASTBCP_UID_STRING_CASING=upper ``` ## Configuration[​](#configuration "Direct link to Configuration") | Property | Value | | -------------- | -------------------------------------------------------- | | **Type** | `lower` / `upper` | | **Default** | `lower` | | **Applies to** | All output formats that serialize UID columns as strings | | **Since** | FastBCP 1.0 | ## Values[​](#values "Direct link to Values") | Value | Output example | | ----------------- | -------------------------------------- | | `lower` (default) | `550e8400-e29b-41d4-a716-446655440000` | | `upper` | `550E8400-E29B-41D4-A716-446655440000` | ## Examples[​](#examples "Direct link to Examples") ### Export with uppercase UIDs[​](#export-with-uppercase-uids "Direct link to Export with uppercase UIDs") * Windows * Linux ``` $env:FASTBCP_UID_STRING_CASING = "upper" fastbcp -S myserver.database.windows.net ` -d MyDatabase ` -T dbo.MyTable ` --fileoutput "output.csv" ``` ``` export FASTBCP_UID_STRING_CASING=upper fastbcp -S myserver.database.windows.net \ -d MyDatabase \ -T dbo.MyTable \ --fileoutput "output.csv" ``` ### Restore default lowercase (RFC 4122)[​](#restore-default-lowercase-rfc-4122 "Direct link to Restore default lowercase (RFC 4122)") * Windows * Linux ``` $env:FASTBCP_UID_STRING_CASING = "lower" ``` ``` export FASTBCP_UID_STRING_CASING=lower ``` --- # Environment Variables Overview FastBCP supports several environment variables to customize its behavior. This page provides a comprehensive overview of all available environment variables. ## Quick Reference Table[​](#quick-reference-table "Direct link to Quick Reference Table") | Variable | Type | Default | Category | Description | | ---------------------------------------------------------------------------------------------------------------------------------- | ----------------- | ---------------------------- | ------------ | ---------------------------------------------------------- | | [`FASTBCP_CLOUD_ISBUFFERED`](/1.1/documentation/environment-variables/fastbcp-cloud-isbuffered.md) | `True` / `False` | `False` | Cloud Upload | Enables buffered cloud uploads for better performance | | [`FASTBCP_TMPPATH`](/1.1/documentation/environment-variables/fastbcp-tmppath.md) | Directory path | System temp | Cloud Upload | Base directory for temporary files during buffered uploads | | [`FASTBCP_CLOUD_MAXUPLOADTHREAD_PER_STREAM`](/1.1/documentation/environment-variables/fastbcp-cloud-maxuploadthread-per-stream.md) | Integer (> 0) | `8` or `2` | Cloud Upload | Maximum parallel upload threads per cloud stream | | [`FASTBCP_RGSIZE`](/1.1/documentation/environment-variables/fastbcp-rgsize.md) | Integer (> 0) | max(2^18/sqrt(degree),64000) | Parquet | Row group size for Parquet files | | [`FASTBCP_UID_STRING_CASING`](/1.1/documentation/environment-variables/fastbcp-uid-string-casing.md) | `lower` / `upper` | `lower` | Output | Casing for UID-to-string conversion (RFC 4122) | | [`FASTBCP_DATEFORMAT`](/1.1/documentation/environment-variables/fastbcp-dateformat.md) | Format string | `yyyy-MM-dd HH:mm:sszzz` | Output | Custom date format string for date-to-string conversion | --- # Advanced Scenarios Advanced use cases, partition functions, and troubleshooting examples. ## SQL Server Partition Functions[​](#sql-server-partition-functions "Direct link to SQL Server Partition Functions") Use SQL Server partition functions for efficient parallel exports. ### Using Partition Function with DataDriven[​](#using-partition-function-with-datadriven "Direct link to Using Partition Function with DataDriven") Leverage existing partition functions to distribute work: ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "tpch10_collation_bin2" ` --trusted ` --sourceschema "dbo" ` --sourcetable "orders_part" ` --directory "D:\temp" ` --fileoutput "orders_partitioned.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "DataDriven" ` --distributekeycolumn "`$partition.PF_DATE(o_orderdate)" ` --paralleldegree 10 ` --merge "False" ``` Partition Function Syntax Use `` `$partition.FunctionName(ColumnName) `` to reference a partition function. The backtick escapes the dollar sign in PowerShell. ### Date-based Partitioning[​](#date-based-partitioning "Direct link to Date-based Partitioning") #### Partition by date ranges for time-series data using database partitions:[​](#partition-by-date-ranges-for-time-series-data-using-database-partitions "Direct link to Partition by date ranges for time-series data using database partitions:") ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "TimeSeriesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "SensorReadings" ` --directory "C:\temp" ` --fileoutput "sensor_readings.parquet" ` --parallelmethod "DataDriven" ` --distributekeycolumn "`$partition.PF_Monthly(reading_date)" ` --paralleldegree 12 ` --merge "False" ``` #### Partition by date ranges for time-series data using Timepartition FastBCP parallelmethod :[​](#partition-by-date-ranges-for-time-series-data-using-timepartition-fastbcp-parallelmethod-- "Direct link to Partition by date ranges for time-series data using Timepartition FastBCP parallelmethod :") ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "TimeSeriesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "SensorReadings" ` --directory "s3://mycorpexportbucket/raw/TimeSeriesDB/SensorReadings/" ` --fileoutput "sensor_readings.parquet" ` --cloudprofile "mycorps3profile" ` --parallelmethod "Timepartition" ` --distributekeycolumn "(reading_date,year,month,day)" ` --paralleldegree 12 ` --merge "False" ``` This technic will produce one file per day inside a directory structure (local or cloud) as a Hive partitionning directory : /year=2026/month=11/day=11/sensor\_readings.parquet You can after a full export use a query to filter your data and overwrite files that was already generated on the overlaping period. ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "TimeSeriesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "SensorReadings_Part" ` --query "SELECT * FROM dbo.SensorReadings_Part WHERE reading_date >= CAST(GETDATE() - 10 AS DATE)" ` --directory "s3://mycorpexportbucket/raw/TimeSeriesDB/SensorReadings/" ` --fileoutput "sensor_readings.parquet" ` --cloudprofile "mycorps3profile" ` --parallelmethod "Timepartition" ` --distributekeycolumn "(reading_date,year,month,day)" ` --paralleldegree 10 ` --merge "False" ``` ## Complex Queries[​](#complex-queries "Direct link to Complex Queries") ### Multi-table Joins[​](#multi-table-joins "Direct link to Multi-table Joins") Export data with a query with joins: ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --query "SELECT o.order_id, o.order_date, c.customer_name, od.product_id, od.quantity, od.unit_price FROM orders o INNER JOIN customers c ON o.customer_id = c.customer_id INNER JOIN order_details od ON o.order_id = od.order_id WHERE o.order_date >= '2024-01-01'" ` --directory "C:\temp" ` --fileoutput "sales_detail.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Ntile" ` --distributekeycolumn "o.order_id" ` --paralleldegree 8 ` --merge "False" ``` ### Aggregated Data[​](#aggregated-data "Direct link to Aggregated Data") Export pre-aggregated data: ``` .\FastBCP.exe ` --connectiontype "pgsql" ` --server "localhost" ` --port "5432" ` --database "analytics" ` --user "postgres" ` --password "postgres" ` --query "SELECT date_trunc('day', order_date) as order_day, customer_region, COUNT(*) as order_count, SUM(total_amount) as total_sales FROM orders GROUP BY date_trunc('day', order_date), customer_region" ` --directory "C:\temp" ` --fileoutput "daily_sales_by_region.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd" ` --encoding "UTF-8" ` --parallelmethod "None" ``` ## Performance Tuning[​](#performance-tuning "Direct link to Performance Tuning") ### Optimal Parallel Degree[​](#optimal-parallel-degree "Direct link to Optimal Parallel Degree") * Auto-detect * Manual Use negative values to auto-calculate based on CPU cores: ``` # Use all cores minus 2 .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "LargeDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "BigTable" ` --directory "C:\temp" ` --fileoutput "bigtable.parquet" ` --parallelmethod "RangeId" ` --distributekeycolumn "id" ` --paralleldegree -2 ` --merge "False" ``` Specify exact thread count: ``` # Use exactly 16 threads .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "LargeDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "BigTable" ` --directory "C:\temp" ` --fileoutput "bigtable.parquet" ` --parallelmethod "RangeId" ` --distributekeycolumn "id" ` --paralleldegree 16 ` --merge "False" ``` ### Parquet RowGroup Size[​](#parquet-rowgroup-size "Direct link to Parquet RowGroup Size") To reduce memory pressure and, in many cases, improve export performance, you can configure the Parquet row group size by setting the `FASTBCP_RGSIZE` environment variable. A smaller `FASTBCP_RGSIZE` value reduces memory usage during export. However, this comes with a trade-off: smaller row groups may reduce Parquet compression efficiency and can sometimes increase the final file size. Recommended values range from `1000` to `1_000_000`. In practice, values between 32,000 and 64,000 often provide a good balance between memory usage, performance, and compression efficiency. * Windows * Linux ``` $Env:FASTBCP_RGSIZE=32000 .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "LargeDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "BigTable" ` --directory "C:\temp" ` --fileoutput "bigtable.parquet" ` --parallelmethod "RangeId" ` --distributekeycolumn "id" ` --paralleldegree -2 ` --merge "False" ``` Specify exact thread count: ``` export FASTBCP_RGSIZE=32000 .\FastBCP / --connectiontype "mssql" / --server "mssqlhost.domain.lan,1433" / --database "LargeDB" / --user "FastUSer" / --password "FastPassword" / --sourceschema "dbo" / --sourcetable "BigTable" / --directory "/data/export/bigtable/" / --fileoutput "bigtable.parquet" / --parallelmethod "RangeId" / --distributekeycolumn "id" / --paralleldegree 16 / --merge "False" ``` ### Merge vs No-Merge[​](#merge-vs-no-merge "Direct link to Merge vs No-Merge") * With Merge * Without Merge Combine parallel outputs into single file: ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "DataDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Data" ` --directory "C:\temp" ` --fileoutput "data_merged.parquet" ` --parallelmethod "RangeId" ` --distributekeycolumn "id" ` --paralleldegree 8 ` --merge "True" ``` **Result**: Single file `data_merged.parquet`, slower and only OnPremise. Keep separate files for parallel processing: ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "DataDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Data" ` --directory "C:\temp" ` --fileoutput "data_part.parquet" ` --parallelmethod "RangeId" ` --distributekeycolumn "id" ` --paralleldegree 8 ` --merge "False" ``` **Result**: Multiple files `data_part_Chunk000.parquet`, `data_part_Chunk001.parquet`, etc. ### Enable Debug Logging[​](#enable-debug-logging "Direct link to Enable Debug Logging") Get detailed execution information: ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "TestDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "TestTable" ` --directory "C:\temp" ` --fileoutput "debug_export.csv" ` --parallelmethod "Random" ` --distributekeycolumn "id" ` --paralleldegree 4 ` --merge "False" ` --loglevel "Debug" ` --runid "debug_test_run" ``` Debug Mode Use `--loglevel "Debug"` to see detailed execution steps, connection strings (without passwords), and query generation details. tip Build your command with the [Wizard](/latest/wizard.md) --- # Cloud Storage Examples Examples for exporting data directly to cloud storage platforms. ## AWS S3[​](#aws-s3 "Direct link to AWS S3") Export data directly to Amazon S3 buckets using date-based placeholders. ### S3 with Date Placeholders[​](#s3-with-date-placeholders "Direct link to S3 with Date Placeholders") Automatically organize files by date using placeholder tokens: ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "DailySales" ` --directory "s3://my-bucket/data/sales/full/" ` --fileoutput "sales.parquet" ` --parallelmethod "RangeId" ` --distributekeycolumn "sale_id" ` --paralleldegree 8 ` --runid "sales_to_s3_daily" ``` ### S3 with Nested Structure[​](#s3-with-nested-structure "Direct link to S3 with Nested Structure") Create hierarchical folder structures: ``` .\FastBCP.exe ` --connectiontype "pgsql" ` --server "localhost" ` --port "5432" ` --database "ecommerce" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "orders" ` --directory "s3://analytics-bucket/exports/orders/" ` --fileoutput "orders.parquet" ` --parallelmethod "DataDriven" ` --distributekeycolumn "o_orderdate" ` --paralleldegree 10 ` --merge "True" ``` ### S3 with CSV Format[​](#s3-with-csv-format "Direct link to S3 with CSV Format") Export CSV files to S3 with manual date partitioning: ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "LogsDB" ` --trusted ` --query "SELECT * FROM ApplicationLogs WHERE log_date = '2024-05-01'" ` --directory "s3://logs-bucket/app-logs/appdate=2024-05-01/" ` --fileoutput "app_logs.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ``` ## Azure Blob Storage[​](#azure-blob-storage "Direct link to Azure Blob Storage") Export data to Azure Blob Storage containers. ### Azure with Date Partitioning[​](#azure-with-date-partitioning "Direct link to Azure with Date Partitioning") ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "AnalyticsDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Events" ` --directory "abs://mystorageaccount.blob.core.windows.net/datacontainer/events/full/" ` --fileoutput "events.parquet" ` --parallelmethod "Timepartition" ` --distributekeycolumn "event_timestamp(year,month)" ` --paralleldegree 10 ``` ### Azure Data Lake Gen2[​](#azure-data-lake-gen2 "Direct link to Azure Data Lake Gen2") Export to Azure Data Lake Storage Gen2: ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "AnalyticsDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Events" ` --directory "abfss://mystorageaccount.dfs.core.windows.net/datacontainer/events/full/" ` --fileoutput "events.parquet" ` --parallelmethod "Timepartition" ` --distributekeycolumn "event_timestamp(year,month)" ` --paralleldegree 10 ``` ## Hourly Exports[​](#hourly-exports "Direct link to Hourly Exports") Create exports with hourly granularity. ### Hourly Data Partition by Sensor with an incremental time range drived from outside[​](#hourly-data-partition-by-sensor-with-an-incremental-time-range-drived-from-outside "Direct link to Hourly Data Partition by Sensor with an incremental time range drived from outside") ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "StreamingDB" ` --trusted ` --query "SELECT * FROM SensorData WHERE reading_time >= '2024-02-03 14:00:00' and reading_time < '2024-02-03 15:00:00'" ` --directory "s3://iot-bucket/sensor-data/" ` --fileoutput "sensors_20240203140000_20240203150000.parquet" ` --parallelmethod "DataDriven" ` --distributekeycolumn "sensor_id" ` --datadrivenquery "SELECT sensor_id From SensorList" ` --paralleldegree 8 ` --runid "hourly_sensor_export_20240203140000_20240203150000" ``` ## Best for Cloud Exports[​](#best-for-cloud-exports "Direct link to Best for Cloud Exports") ### Performance Tips[​](#performance-tips "Direct link to Performance Tips") Parquet **Use Parquet for cloud storage**: Better compression and query performance, reduce network traffic Parallelism **Enable parallel execution when needed**: * if you need to split data on a business criteria * if you have a lots of data to extract Dynamic Parallel Degree Use negativ value for `--paralleldegree` to automatically set threads to (CPU cores / abs(degree)), leaving resources for other processes. eg `--paralleldegree -2` will use half of the core of the machine from where FastBCP is launched DataDriven Query \*\*Use `--datadrivenquery` to : * speedup the retrieval of the elements list to extract. * as a technic for incremental extraction by using a where in the `--datadrivenquery` instead of the main `--query` warning Keep the degree safe for your source, to avoid a total saturation. ### Example with All Best Practices[​](#example-with-all-best-practices "Direct link to Example with All Best Practices") ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "DataWarehouse" ` --trusted ` --sourceschema "dbo" ` --sourcetable "FactSales" ` --directory "s3://analytics-bucket/warehouse/sales/{sourcetable}" ` --fileoutput "FactSales.parquet" ` --parallelmethod "DataDriven" ` --datadrivenquery "SELECT ref_date from calendar where ref_date > cast(getdate()-30 as date)" ` --distributekeycolumn "sale_date" ` --paralleldegree -2 ` --runid "daily_sales_to_s3" ` --loglevel "Information" ``` tip Build your command with the [Wizard](/latest/wizard.md) --- # DB2 Examples Comprehensive examples for exporting data from IBM DB2 using the generic `odbc` connection type. DB2 ODBC Driver DB2 is not a native connection type, so FastBCP connects to it through ODBC. Install the IBM DB2 ODBC driver, then provide either a DSN (`--dsn`) or a full connection string (`--sourceconnectstring`) as shown below. ## Connection String[​](#connection-string "Direct link to Connection String") **Single-threaded export:** ``` .\FastBCP.exe ` --connectiontype "odbc" ` --sourceconnectstring "Driver={IBM DB2 ODBC DRIVER};Database=SAMPLE;Hostname=db2server.company.corp;Port=25010;Protocol=TCPIP;Uid=db2user;Pwd=password;CurrentSchema=DB2ADMIN" ` --query "SELECT * FROM DB2ADMIN.ORDERS" ` --directory "C:\temp" ` --fileoutput "db2_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` **Parallel export with Ntile method:** ``` .\FastBCP.exe ` --connectiontype "odbc" ` --sourceconnectstring "Driver={IBM DB2 ODBC DRIVER};Database=SAMPLE;Hostname=db2server.company.corp;Port=25010;Protocol=TCPIP;Uid=db2user;Pwd=password;CurrentSchema=DB2ADMIN" ` --query "SELECT * FROM DB2ADMIN.ORDERS" ` --directory "C:\temp" ` --fileoutput "db2_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Ntile" ` --distributekeycolumn "ORDER_ID" ` --paralleldegree -2 ` --merge "False" ``` **Parallel export with Random method:** ``` .\FastBCP.exe ` --connectiontype "odbc" ` --sourceconnectstring "Driver={IBM DB2 ODBC DRIVER};Database=SAMPLE;Hostname=db2server.company.corp;Port=25010;Protocol=TCPIP;Uid=db2user;Pwd=password;CurrentSchema=DB2ADMIN" ` --query "SELECT * FROM DB2ADMIN.ORDERS" ` --directory "C:\temp" ` --fileoutput "db2_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "ORDER_ID" ` --paralleldegree 8 ` --merge "False" ``` ## DSN Connection[​](#dsn-connection "Direct link to DSN Connection") If a DSN is already configured on the machine, you can use `--dsn` instead of `--sourceconnectstring`. ``` .\FastBCP.exe ` --connectiontype "odbc" ` --dsn "DB2_DSN" ` --query "SELECT * FROM DB2ADMIN.ORDERS" ` --directory "C:\temp" ` --fileoutput "db2_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` Quoting special identifiers If your DB2 schema or table name contains special characters (e.g. `HCR_BI."APER@XPSAHISTO"`), keep the double quotes around the identifier inside your `--query` value so DB2 treats it as a delimited identifier. tip Build your command with the [Wizard](/latest/wizard.md) --- # MySQL Examples Examples for exporting data from MySQL databases. ## Single-threaded Export[​](#single-threaded-export "Direct link to Single-threaded Export") Simple export without parallelization. ``` .\FastBCP.exe ` --connectiontype "mysql" ` --server "localhost" ` --port "3306" ` --database "test" ` --user "root" ` --password "password" ` --query "SELECT * FROM test_table LIMIT 1000" ` --directory "C:\temp" ` --fileoutput "mysql_test.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` ## Parallel Export - Random Method[​](#parallel-export---random-method "Direct link to Parallel Export - Random Method") Export using Random distribution. ``` .\FastBCP.exe ` --connectiontype "mysql" ` --server "localhost" ` --port "3306" ` --database "test" ` --user "root" ` --password "password" ` --sourceschema "test" ` --sourcetable "orders" ` --directory "C:\temp" ` --fileoutput "mysql_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "order_id" ` --paralleldegree 8 ` --merge "False" ` --runid "mysql_to_csv_parallel8_random" ``` ## Parallel Export - DataDriven Method[​](#parallel-export---datadriven-method "Direct link to Parallel Export - DataDriven Method") Export using DataDriven distribution based on distinct column values. ``` .\FastBCP.exe ` --connectiontype "mysql" ` --server "localhost" ` --port "3306" ` --database "test" ` --user "root" ` --password "password" ` --sourceschema "test" ` --sourcetable "orders" ` --directory "C:\temp" ` --fileoutput "mysql_orders_dd.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "DataDriven" ` --distributekeycolumn "status" ` --paralleldegree 10 ` --merge "False" ` --runid "mysql_to_csv_parallel10_datadriven" ``` ## Export to Parquet[​](#export-to-parquet "Direct link to Export to Parquet") Export MySQL data to Parquet format. ``` .\FastBCP.exe ` --connectiontype "mysql" ` --server "localhost" ` --port "3306" ` --database "test" ` --user "root" ` --password "password" ` --sourceschema "test" ` --sourcetable "orders" ` --directory "C:\temp" ` --fileoutput "mysql_orders.parquet" ` --parallelmethod "Random" ` --distributekeycolumn "order_id" ` --paralleldegree 6 ` --merge "False" ``` tip Build your command with the [Wizard](/latest/wizard.md) --- # Oracle Examples Comprehensive examples for exporting data from Oracle databases. ## Connection Types[​](#connection-types "Direct link to Connection Types") Oracle exports support multiple connection types: * **oraodp**: Native Oracle Data Provider (recommended) * **oledb**: Using Oracle OLEDB Provider (OraOLEDB) * **odbc**: Using ODBC DSN ## Single-threaded Export[​](#single-threaded-export "Direct link to Single-threaded Export") Simple export without parallelization. * Oracle Data Provider * OLEDB Provider ``` .\FastBCP.exe ` --connectiontype "oraodp" ` --server "localhost:1521/ORCLPDB1" ` --user "system" ` --password "password" ` --query "SELECT * FROM customers WHERE ROWNUM <= 1000" ` --directory "C:\temp" ` --fileoutput "oracle_customers.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` ``` .\FastBCP.exe ` --connectiontype "oledb" ` --provider "OraOLEDB.Oracle" ` --server "localhost:1521/ORCLPDB1" ` --user "system" ` --password "password" ` --query "SELECT * FROM customers WHERE ROWNUM <= 1000" ` --directory "C:\temp" ` --fileoutput "oracle_customers.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` ## Parallel Export - Rowid Method[​](#parallel-export---rowid-method "Direct link to Parallel Export - Rowid Method") Oracle-specific parallel export 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 exports and does not require a specific distribute key column. **Full table export:** ``` .\FastBCP.exe ` --connectiontype "oraodp" ` --server "localhost:1521/ORCLPDB1" ` --user "system" ` --password "password" ` --sourceschema "SYSTEM" ` --sourcetable "ORDERS" ` --directory "C:\temp" ` --fileoutput "oracle_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Rowid" ` --paralleldegree 8 ` --merge "False" ` --runid "oraodp_to_csv_parallel8_rowid" ``` **With query filter:** ``` .\FastBCP.exe ` --connectiontype "oraodp" ` --server "localhost:1521/ORCLPDB1" ` --user "system" ` --password "password" ` --query "SELECT * FROM SYSTEM.ORDERS WHERE order_date >= TO_DATE('2024-01-01', 'YYYY-MM-DD')" ` --directory "C:\temp" ` --fileoutput "oracle_orders_2024.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Rowid" ` --paralleldegree 8 ` --merge "False" ` --runid "oraodp_to_csv_parallel8_rowid_filtered" ``` ## Parallel Export - Random Method[​](#parallel-export---random-method "Direct link to Parallel Export - Random Method") Export using Random distribution with modulo operation. ``` .\FastBCP.exe ` --connectiontype "oraodp" ` --server "localhost:1521/ORCLPDB1" ` --user "system" ` --password "password" ` --sourceschema "SYSTEM" ` --sourcetable "ORDERS" ` --directory "C:\temp" ` --fileoutput "oracle_orders_random.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "order_id" ` --paralleldegree 8 ` --merge "False" ` --runid "oraodp_to_csv_parallel8_random" ``` ## Parallel Export - DataDriven Method[​](#parallel-export---datadriven-method "Direct link to Parallel Export - DataDriven Method") Export using DataDriven distribution based on distinct column values. ``` .\FastBCP.exe ` --connectiontype "oraodp" ` --server "localhost:1521/ORCLPDB1" ` --user "system" ` --password "password" ` --sourceschema "SYSTEM" ` --sourcetable "ORDERS" ` --directory "C:\temp" ` --fileoutput "oracle_orders_dd.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "DataDriven" ` --distributekeycolumn "order_status" ` --paralleldegree 10 ` --merge "False" ` --runid "oraodp_to_csv_parallel10_datadriven" ``` ## Export to Parquet[​](#export-to-parquet "Direct link to Export to Parquet") Export Oracle data to Parquet format. **Single-threaded:** ``` .\FastBCP.exe ` --connectiontype "oraodp" ` --server "localhost:1521/ORCLPDB1" ` --user "system" ` --password "password" ` --sourceschema "SYSTEM" ` --sourcetable "ORDERS" ` --directory "C:\temp" ` --fileoutput "oracle_orders.parquet" ` --parallelmethod "None" ``` **Parallel with Rowid:** ``` .\FastBCP.exe ` --connectiontype "oraodp" ` --server "localhost:1521/ORCLPDB1" ` --user "system" ` --password "password" ` --sourceschema "SYSTEM" ` --sourcetable "ORDERS" ` --directory "C:\temp" ` --fileoutput "oracle_orders.parquet" ` --parallelmethod "Rowid" ` --paralleldegree 10 ` --merge "False" ``` ## OLEDB Connection Examples[​](#oledb-connection-examples "Direct link to OLEDB Connection Examples") Using Oracle OLEDB Provider for connections. **Single-threaded:** ``` .\FastBCP.exe ` --connectiontype "oledb" ` --provider "OraOLEDB.Oracle" ` --server "localhost:1521/ORCLPDB1" ` --user "system" ` --password "password" ` --query "SELECT * FROM SYSTEM.ORDERS WHERE ROWNUM <= 10000" ` --directory "C:\temp" ` --fileoutput "oracle_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` **Parallel Random:** ``` .\FastBCP.exe ` --connectiontype "oledb" ` --provider "OraOLEDB.Oracle" ` --server "localhost:1521/ORCLPDB1" ` --user "system" ` --password "password" ` --query "SELECT * FROM SYSTEM.ORDERS" ` --directory "C:\temp" ` --fileoutput "oracle_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "order_id" ` --paralleldegree 6 ` --merge "False" ``` **Parallel DataDriven:** ``` .\FastBCP.exe ` --connectiontype "oledb" ` --provider "OraOLEDB.Oracle" ` --server "localhost:1521/ORCLPDB1" ` --user "system" ` --password "password" ` --query "SELECT * FROM SYSTEM.ORDERS" ` --directory "C:\temp" ` --fileoutput "oracle_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "DataDriven" ` --distributekeycolumn "order_status" ` --paralleldegree 6 ` --merge "False" ``` tip Build your command with the [Wizard](/latest/wizard.md) --- # Other Databases Examples for exporting data from Clickhouse, SAP HANA, and Netezza databases. ## Clickhouse[​](#clickhouse "Direct link to Clickhouse") Export data from Clickhouse database. **Single-threaded export:** ``` .\FastBCP.exe ` --connectiontype "clickhouse" ` --server "localhost" ` --port "9000" ` --database "default" ` --user "default" ` --password "password" ` --query "SELECT * FROM orders LIMIT 1000" ` --directory "C:\temp" ` --fileoutput "clickhouse_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` **Parallel export with Random method:** ``` .\FastBCP.exe ` --connectiontype "clickhouse" ` --server "localhost" ` --port "9000" ` --database "default" ` --user "default" ` --password "password" ` --sourceschema "default" ` --sourcetable "orders" ` --directory "C:\temp" ` --fileoutput "clickhouse_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "order_id" ` --paralleldegree 8 ` --merge "False" ``` ## SAP HANA[​](#sap-hana "Direct link to SAP HANA") Export data from SAP HANA database using two connection types. ### HANA Connection Type[​](#hana-connection-type "Direct link to HANA Connection Type") Standard HANA connection for general exports. **Single-threaded export:** ``` .\FastBCP.exe ` --connectiontype "hana" ` --server "hanaserver:30015" ` --user "SYSTEM" ` --password "password" ` --query "SELECT * FROM ORDERS WHERE ORDER_DATE >= '2024-01-01'" ` --directory "C:\temp" ` --fileoutput "hana_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` **Parallel export with Random method:** ``` .\FastBCP.exe ` --connectiontype "hana" ` --server "hanaserver:30015" ` --user "SYSTEM" ` --password "password" ` --sourceschema "SYSTEM" ` --sourcetable "ORDERS" ` --directory "C:\temp" ` --fileoutput "hana_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "ORDER_ID" ` --paralleldegree 8 ` --merge "False" ``` ### HANA Export Connection Type[​](#hana-export-connection-type "Direct link to HANA Export Connection Type") Optimized HANA connection using native EXPORT functionality for faster bulk exports. HANA Export The `hanaexport` connection type uses SAP HANA's native EXPORT statement for optimized bulk data transfer. This is recommended for large datasets. **Single-threaded export:** ``` .\FastBCP.exe ` --connectiontype "hanaexport" ` --server "hanaserver:30015" ` --user "SYSTEM" ` --password "password" ` --query "SELECT * FROM ORDERS WHERE ORDER_DATE >= '2024-01-01'" ` --directory "C:\temp" ` --fileoutput "hana_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` **Parallel export with Random method:** ``` .\FastBCP.exe ` --connectiontype "hanaexport" ` --server "hanaserver:30015" ` --user "SYSTEM" ` --password "password" ` --sourceschema "SYSTEM" ` --sourcetable "ORDERS" ` --directory "C:\temp" ` --fileoutput "hana_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "ORDER_ID" ` --paralleldegree 8 ` --merge "False" ``` ## Netezza[​](#netezza "Direct link to Netezza") Export data from Netezza database using OLEDB provider. **Single-threaded export:** ``` .\FastBCP.exe ` --connectiontype "oledb" ` --provider "NZOLEDB" ` --server "netezza_server" ` --database "SYSTEM" ` --user "admin" ` --password "password" ` --query "SELECT * FROM orders" ` --directory "C:\temp" ` --fileoutput "netezza_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` **Parallel export with Random method:** ``` .\FastBCP.exe ` --connectiontype "oledb" ` --provider "NZOLEDB" ` --server "netezza_server" ` --database "SYSTEM" ` --user "admin" ` --password "password" ` --query "SELECT * FROM orders" ` --directory "C:\temp" ` --fileoutput "netezza_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "order_id" ` --paralleldegree 6 ` --merge "False" ``` **Parallel export with DataDriven method:** ``` .\FastBCP.exe ` --connectiontype "oledb" ` --provider "NZOLEDB" ` --server "netezza_server" ` --database "SYSTEM" ` --user "admin" ` --password "password" ` --query "SELECT * FROM orders" ` --directory "C:\temp" ` --fileoutput "netezza_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "DataDriven" ` --distributekeycolumn "region" ` --paralleldegree 6 ` --merge "False" ``` tip Build your command with the [Wizard](/latest/wizard.md) --- # Output Formats Examples demonstrating different output formats supported by FastBCP. ## CSV Format[​](#csv-format "Direct link to CSV Format") Standard comma/delimiter-separated values format. ### Basic CSV Export[​](#basic-csv-export "Direct link to Basic CSV Export") ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Sales" ` --directory "C:\temp" ` --fileoutput "sales.csv" ` --decimalseparator "." ` --delimiter "," ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` ### CSV with Custom Delimiter[​](#csv-with-custom-delimiter "Direct link to CSV with Custom Delimiter") Using pipe delimiter for better data separation: ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Sales" ` --directory "C:\temp" ` --fileoutput "sales.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "sale_id" ` --paralleldegree 8 ` --merge "False" ``` ### CSV with European Format[​](#csv-with-european-format "Direct link to CSV with European Format") Using comma as decimal separator (common in European countries): ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Sales" ` --directory "C:\temp" ` --fileoutput "sales_european.csv" ` --decimalseparator "," ` --delimiter ";" ` --dateformat "dd/MM/yyyy HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "sale_id" ` --paralleldegree 8 ` --merge "False" ``` ## Parquet Format[​](#parquet-format "Direct link to Parquet Format") Columnar storage format optimized for analytical queries. ### Basic Parquet Export[​](#basic-parquet-export "Direct link to Basic Parquet Export") ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Sales" ` --directory "C:\temp" ` --fileoutput "sales.parquet" ` --parallelmethod "None" ``` ### Parallel Parquet Export[​](#parallel-parquet-export "Direct link to Parallel Parquet Export") Maximize performance with parallel execution: ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Sales" ` --directory "C:\temp" ` --fileoutput "sales.parquet" ` --parallelmethod "RangeId" ` --distributekeycolumn "sale_id" ` --paralleldegree 12 ` --merge "False" ``` ### Parquet with PostgreSQL[​](#parquet-with-postgresql "Direct link to Parquet with PostgreSQL") ``` .\FastBCP.exe ` --connectiontype "pgcopy" ` --server "localhost" ` --port "5432" ` --database "salesdb" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "sales" ` --directory "C:\temp" ` --fileoutput "pg_sales.parquet" ` --parallelmethod "Ctid" ` --paralleldegree 10 ` --merge "False" ``` ### Parquet with Oracle[​](#parquet-with-oracle "Direct link to Parquet with Oracle") ``` .\FastBCP.exe ` --connectiontype "oraodp" ` --server "localhost:1521/ORCLPDB1" ` --user "system" ` --password "password" ` --sourceschema "SYSTEM" ` --sourcetable "SALES" ` --directory "C:\temp" ` --fileoutput "oracle_sales.parquet" ` --parallelmethod "Rowid" ` --paralleldegree 8 ` --merge "False" ``` ## Excel Format[​](#excel-format "Direct link to Excel Format") Export data to Microsoft Excel format (.xlsx). Excel Format Excel exports automatically format data for spreadsheet applications. Large datasets may be split across multiple sheets if they exceed Excel's row limits. ### Basic Excel Export[​](#basic-excel-export "Direct link to Basic Excel Export") ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Sales" ` --directory "C:\temp" ` --fileoutput "sales.xlsx" ` --parallelmethod "None" ``` ### Parallel Excel Export[​](#parallel-excel-export "Direct link to Parallel Excel Export") ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Sales" ` --directory "C:\temp" ` --fileoutput "sales.xlsx" ` --parallelmethod "RangeId" ` --distributekeycolumn "sale_id" ` --paralleldegree 6 ` --merge "False" ``` ### Excel with Custom Query[​](#excel-with-custom-query "Direct link to Excel with Custom Query") Export filtered data to Excel: ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --query "SELECT * FROM dbo.Sales WHERE sale_date >= '2024-01-01' AND sale_date < '2025-01-01'" ` --directory "C:\temp" ` --fileoutput "sales_2024.xlsx" ` --parallelmethod "Ntile" ` --distributekeycolumn "sale_id" ` --paralleldegree 4 ` --merge "False" ``` tip Build your command with the [Wizard](/latest/wizard.md) --- # PostgreSQL Examples Comprehensive examples for exporting data from PostgreSQL using native connectors (pgsql, pgcopy). ## Connection Types[​](#connection-types "Direct link to Connection Types") PostgreSQL exports support two connection types: * **pgsql**: Standard PostgreSQL protocol * **pgcopy**: PostgreSQL COPY protocol (fastest for bulk exports) ## Single-threaded Export[​](#single-threaded-export "Direct link to Single-threaded Export") Simple export without parallelization. * Standard Protocol * COPY Protocol ``` .\FastBCP.exe ` --connectiontype "pgsql" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --query "SELECT * FROM lineitem LIMIT 1000" ` --directory "C:\temp" ` --fileoutput "pg_lineitem.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` ``` .\FastBCP.exe ` --connectiontype "pgcopy" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --query "SELECT * FROM lineitem LIMIT 1000" ` --directory "C:\temp" ` --fileoutput "pg_lineitem.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` ## Parallel Export - Random Method[​](#parallel-export---random-method "Direct link to Parallel Export - Random Method") Export using Random distribution with modulo operation. * Standard Protocol * COPY Protocol ``` .\FastBCP.exe ` --connectiontype "pgsql" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --query "SELECT * FROM lineitem" ` --directory "C:\temp" ` --fileoutput "pg_lineitem_random.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "l_linenumber" ` --paralleldegree 8 ` --merge "False" ` --runid "pgsql_to_csv_parallel8_random" ``` ``` .\FastBCP.exe ` --connectiontype "pgcopy" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --query "SELECT * FROM lineitem" ` --directory "C:\temp" ` --fileoutput "pg_lineitem_random.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "l_linenumber" ` --paralleldegree 8 ` --merge "False" ` --runid "pgcopy_to_csv_parallel8_random" ``` ## Parallel Export - DataDriven Method[​](#parallel-export---datadriven-method "Direct link to Parallel Export - DataDriven Method") Export using DataDriven distribution based on distinct column values. * Standard Protocol * COPY Protocol ``` .\FastBCP.exe ` --connectiontype "pgsql" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "lineitem" ` --directory "C:\temp" ` --fileoutput "pg_lineitem_dd.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "DataDriven" ` --distributekeycolumn "l_shipmode" ` --paralleldegree 10 ` --merge "False" ` --runid "pgsql_to_csv_parallel10_datadriven" ``` ``` .\FastBCP.exe ` --connectiontype "pgcopy" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "lineitem" ` --directory "C:\temp" ` --fileoutput "pg_lineitem_dd.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "DataDriven" ` --distributekeycolumn "l_shipmode" ` --paralleldegree 10 ` --merge "False" ` --runid "pgcopy_to_csv_parallel10_datadriven" ``` ## Parallel Export - Ntile Method[​](#parallel-export---ntile-method "Direct link to Parallel Export - Ntile Method") Export using Ntile for evenly distributed chunks. * Standard Protocol * COPY Protocol **Full table:** ``` .\FastBCP.exe ` --connectiontype "pgsql" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "lineitem" ` --directory "C:\temp" ` --fileoutput "pg_lineitem_ntile.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Ntile" ` --distributekeycolumn "l_orderkey" ` --paralleldegree 12 ` --merge "False" ` --runid "pgsql_to_csv_parallel12_ntile" ``` **With query filter:** ``` .\FastBCP.exe ` --connectiontype "pgsql" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --query "SELECT * FROM lineitem WHERE l_shipdate BETWEEN '1995-01-01' AND '1995-12-31'" ` --directory "C:\temp" ` --fileoutput "pg_lineitem_ntile.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Ntile" ` --distributekeycolumn "l_orderkey" ` --paralleldegree 12 ` --merge "False" ` --runid "pgsql_to_csv_parallel12_ntile_filtered" ``` **Full table:** ``` .\FastBCP.exe ` --connectiontype "pgcopy" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "lineitem" ` --directory "C:\temp" ` --fileoutput "pg_lineitem_ntile.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Ntile" ` --distributekeycolumn "l_orderkey" ` --paralleldegree 12 ` --merge "False" ` --runid "pgcopy_to_csv_parallel12_ntile" ``` **With query filter:** ``` .\FastBCP.exe ` --connectiontype "pgcopy" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --query "SELECT * FROM lineitem WHERE l_shipdate BETWEEN '1995-01-01' AND '1995-12-31'" ` --directory "C:\temp" ` --fileoutput "pg_lineitem_ntile.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Ntile" ` --distributekeycolumn "l_orderkey" ` --paralleldegree 12 ` --merge "False" ` --runid "pgcopy_to_csv_parallel12_ntile_filtered" ``` ## Parallel Export - Ctid Method[​](#parallel-export---ctid-method "Direct link to Parallel Export - Ctid Method") PostgreSQL-specific parallel export using physical row identifier (ctid). PostgreSQL-Specific The Ctid method is unique to PostgreSQL and uses the physical row identifier for parallel data distribution. This is very efficient for full table exports. * Standard Protocol * COPY Protocol ``` .\FastBCP.exe ` --connectiontype "pgsql" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "lineitem" ` --directory "C:\temp" ` --fileoutput "pg_lineitem_ctid.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Ctid" ` --paralleldegree 8 ` --merge "False" ` --runid "pgsql_to_csv_parallel8_ctid" ``` ``` .\FastBCP.exe ` --connectiontype "pgcopy" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "lineitem" ` --directory "C:\temp" ` --fileoutput "pg_lineitem_ctid.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Ctid" ` --paralleldegree 8 ` --merge "False" ` --runid "pgcopy_to_csv_parallel8_ctid" ``` ## Export to Parquet[​](#export-to-parquet "Direct link to Export to Parquet") Export PostgreSQL data to Parquet format. * Standard Protocol * COPY Protocol **Single-threaded:** ``` .\FastBCP.exe ` --connectiontype "pgsql" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "lineitem" ` --directory "C:\temp" ` --fileoutput "pg_lineitem.parquet" ` --parallelmethod "None" ``` **Parallel with Ctid:** ``` .\FastBCP.exe ` --connectiontype "pgsql" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "lineitem" ` --directory "C:\temp" ` --fileoutput "pg_lineitem.parquet" ` --parallelmethod "Ctid" ` --paralleldegree 10 ` --merge "False" ``` **Single-threaded:** ``` .\FastBCP.exe ` --connectiontype "pgcopy" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "lineitem" ` --directory "C:\temp" ` --fileoutput "pg_lineitem.parquet" ` --parallelmethod "None" ``` **Parallel with Ctid:** ``` .\FastBCP.exe ` --connectiontype "pgcopy" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "lineitem" ` --directory "C:\temp" ` --fileoutput "pg_lineitem.parquet" ` --parallelmethod "Ctid" ` --paralleldegree 10 ` --merge "False" ``` ## ODBC Connection[​](#odbc-connection "Direct link to ODBC Connection") Using ODBC DSN for PostgreSQL connection. **Single-threaded:** ``` .\FastBCP.exe ` --connectiontype "odbc" ` --dsn "PostgreSQL_DSN" ` --directory "C:\temp" ` --fileoutput "pg_test.csv" ` --query "SELECT * FROM public.test_table" ` --parallelmethod "None" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ``` **Parallel Random:** ``` .\FastBCP.exe ` --connectiontype "odbc" ` --dsn "PostgreSQL_DSN" ` --directory "C:\temp" ` --fileoutput "pg_test.csv" ` --query "SELECT * FROM public.test_table" ` --parallelmethod "Random" ` --distributekeycolumn "id" ` --paralleldegree 6 ` --merge "False" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ``` **Parallel DataDriven:** ``` .\FastBCP.exe ` --connectiontype "odbc" ` --dsn "PostgreSQL_DSN" ` --directory "C:\temp" ` --fileoutput "pg_test.csv" ` --query "SELECT * FROM public.test_table" ` --parallelmethod "DataDriven" ` --distributekeycolumn "category" ` --paralleldegree 6 ` --merge "False" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ``` tip Build your command with the [Wizard](/latest/wizard.md) --- # SQL Server Examples Comprehensive examples for exporting data from SQL Server (MSSQL, OLEDB, ODBC). ## Single-threaded Export[​](#single-threaded-export "Direct link to Single-threaded Export") Simple export without parallelization for smaller datasets. ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "FASTExportData" ` --trusted ` --query "SELECT top 1000 * FROM dbo.TEST_71_1M_12m" ` --directory "C:\temp" ` --fileoutput "TEST1000.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` ## Parallel Export - Random Method[​](#parallel-export---random-method "Direct link to Parallel Export - Random Method") Export using Random distribution based on modulo operation. * Windows Authentication * SQL Authentication ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "FASTExportData" ` --trusted ` --query "SELECT * FROM dbo.TEST_71_1M_12m" ` --directory "C:\temp" ` --fileoutput "TEST_71c_1Mr.csv" ` --decimalseparator "," ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "ID_ARTICLE" ` --paralleldegree 8 ` --merge "False" ` --runid "mssql_to_csv_parallel8_random" ``` ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "FASTExportData" ` --user "FastUser" ` --password "FastPassword" ` --query "SELECT * FROM dbo.TEST_71_1M_12m" ` --directory "C:\temp" ` --fileoutput "TEST_71c_1Mr.csv" ` --decimalseparator "," ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "ID_ARTICLE" ` --paralleldegree 8 ` --merge "False" ` --runid "mssql_to_csv_parallel8_random" ``` ## Parallel Export - RangeId Method[​](#parallel-export---rangeid-method "Direct link to Parallel Export - RangeId Method") Export using RangeId distribution for evenly distributed integer keys. **Using table name:** ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "tpch10_collation_bin2" ` --trusted ` --sourceschema "dbo" ` --sourcetable "orders" ` --directory "D:\temp" ` --fileoutput "mssql_orders.csv" ` --decimalseparator "," ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "RangeId" ` --distributekeycolumn "o_orderkey" ` --paralleldegree -2 ` --merge "False" ` --runid "mssql_to_csv_parallel-2_rangeid" ``` **Using query with filter:** ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "tpch10_collation_bin2" ` --trusted ` --query "select * from orders WHERE o_orderdate between '19950101' and '19951231'" ` --directory "D:\temp" ` --fileoutput "mssql_orders.csv" ` --decimalseparator "," ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "RangeId" ` --distributekeycolumn "o_orderkey" ` --paralleldegree -2 ` --merge "False" ` --runid "mssql_to_csv_parallel-2_rangeid_using_query" ``` ## Parallel Export - Ntile Method[​](#parallel-export---ntile-method "Direct link to Parallel Export - Ntile Method") Export using Ntile distribution for evenly distributed chunks. **Full table export:** ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "tpch10_collation_bin2" ` --trusted ` --sourceschema "dbo" ` --sourcetable "orders" ` --directory "D:\temp" ` --fileoutput "mssql_orders.csv" ` --decimalseparator "," ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Ntile" ` --distributekeycolumn "o_orderkey" ` --paralleldegree 12 ` --merge "False" ` --runid "mssql_to_csv_parallel12_Ntile" ``` **Filtered export with date column:** ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "tpch10_collation_bin2" ` --trusted ` --query "select * from orders WHERE o_orderdate between '19950101' and '19951231'" ` --directory "D:\temp" ` --fileoutput "mssql_orders.csv" ` --decimalseparator "," ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Ntile" ` --distributekeycolumn "o_orderdate" ` --paralleldegree 12 ` --merge "False" ` --runid "mssql_to_csv_parallel12_Ntile_using_query" ``` ## Parallel Export - DataDriven Method[​](#parallel-export---datadriven-method "Direct link to Parallel Export - DataDriven Method") Export using DataDriven distribution based on distinct values of a column. **Using partition function:** ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "tpch10_collation_bin2" ` --directory "D:\temp" ` --fileoutput "mssql_orders.csv" ` --trusted ` --sourceschema "dbo" ` --sourcetable "orders_part" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "DataDriven" ` --distributekeycolumn "`$partition.PF_DATE(o_orderdate)" ` --merge "False" ` --paralleldegree 10 ``` ## Export to Parquet[​](#export-to-parquet "Direct link to Export to Parquet") Export SQL Server data to Parquet format. **Single-threaded:** ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "faker" ` --trusted ` --sourceschema "dbo" ` --sourcetable "faker_s1000" ` --directory "D:\temp" ` --fileoutput "mssql_faker_s1000.parquet" ` --parallelmethod "None" ` --runid "mssql_to_parquet_NoParallel" ``` **Parallel with RangeId:** ``` .\FastBCP.exe ` --connectiontype "mssql" ` --trusted ` --server "localhost" ` --database "tpch10_collation_bin2" ` --directory "D:\temp" ` --fileoutput "mssql_orders.parquet" ` --parallelmethod "RangeId" ` --distributekeycolumn "o_orderkey" ` --paralleldegree 7 ` --sourceschema "dbo" ` --sourcetable "orders" ` --merge "False" ``` **Parallel with Ntile and query:** ``` .\FastBCP.exe ` --connectiontype "mssql" ` --trusted ` --server "localhost" ` --database "tpch10_collation_bin2" ` --directory "D:\temp" ` --fileoutput "mssql_orders_1995.parquet" ` --parallelmethod "Ntile" ` --distributekeycolumn "o_orderkey" ` --paralleldegree 7 ` --query "select * from dbo.orders where o_orderdate between '1995-01-01' and '1995-12-31'" ` --merge "False" ``` ## OLEDB Connection[​](#oledb-connection "Direct link to OLEDB Connection") Alternative connection method using OLEDB provider. **Single-threaded:** ``` $query="SELECT top 10000 * FROM FASTExportData.dbo.TEST_71_1M_12m" $target="localhost" .\FastBCP.exe ` --connectiontype "oledb" ` --provider "MSOLEDBSQL" ` --server $target ` --directory "C:\temp" ` --fileoutput "TEST.CSV" ` --paralleldegree 1 ` --trusted ` --query $query ` --parallelmethod "None" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ``` **Parallel Random with Windows Auth:** ``` .\FastBCP.exe ` --connectiontype "oledb" ` --provider "MSOLEDBSQL" ` --server $target ` --directory "C:\temp" ` --fileoutput "TEST.CSV" ` --paralleldegree 6 ` --trusted ` --query $query ` --parallelmethod "Random" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --distributekeycolumn "ID_ARTICLE" ` --merge "False" ``` **Parallel Random with SQL Auth:** ``` .\FastBCP.exe ` --connectiontype "oledb" ` --provider "MSOLEDBSQL" ` --server $target ` --directory "C:\temp" ` --fileoutput "TEST.CSV" ` --paralleldegree 6 ` --user "FastUser" ` --password "FastPassword" ` --query $query ` --parallelmethod "Random" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --distributekeycolumn "ID_ARTICLE" ` --merge "False" ``` **Parallel DataDriven:** ``` .\FastBCP.exe ` --connectiontype "oledb" ` --provider "MSOLEDBSQL" ` --server $target ` --directory "C:\temp" ` --fileoutput "TEST.CSV" ` --paralleldegree 6 ` --trusted ` --query $query ` --parallelmethod "DataDriven" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --distributekeycolumn "ID_DECOUPE_GEO" ` --merge "False" ``` ## ODBC Connection[​](#odbc-connection "Direct link to ODBC Connection") Using ODBC DSN for connection. **Single-threaded:** ``` .\FastBCP.exe ` --connectiontype "odbc" ` --dsn "DSN4FastBCP" ` --directory "C:\temp" ` --fileoutput "TEST.CSV" ` --paralleldegree 1 ` --trusted ` --query "SELECT * FROM [TEST_71_1M_12m]" ` --parallelmethod "None" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ``` **Parallel Random with Windows Auth:** ``` .\FastBCP.exe ` --connectiontype "odbc" ` --dsn "DSN4FastBCP" ` --directory "C:\temp" ` --fileoutput "TEST.CSV" ` --paralleldegree 6 ` --trusted ` --query "SELECT * FROM [TEST_71_1M_12m]" ` --parallelmethod "Random" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --distributekeycolumn "ID_ARTICLE" ` --merge "False" ``` **Parallel Random with SQL Auth:** ``` .\FastBCP.exe ` --connectiontype "odbc" ` --dsn "DSN4FastBCP" ` --directory "C:\temp" ` --fileoutput "TEST.CSV" ` --paralleldegree 6 ` --user "FastUser" ` --password "FastPassword" ` --query "SELECT * FROM [TEST_71_1M_12m]" ` --parallelmethod "Random" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --distributekeycolumn "ID_ARTICLE" ` --merge "False" ``` **Parallel DataDriven:** ``` .\FastBCP.exe ` --connectiontype "odbc" ` --dsn "DSN4FastBCP" ` --directory "C:\temp" ` --fileoutput "TEST.CSV" ` --paralleldegree 6 ` --trusted ` --query "SELECT * FROM [TEST_71_1M_12m]" ` --parallelmethod "DataDriven" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --distributekeycolumn "ID_GEO" ` --merge "False" ``` tip Build your command with the [Wizard](/latest/wizard.md) --- # Configuration Examples Here are sample configuration files for different logging scenarios: ## FastBCP\_Settings.json : Sinks on Console + Files (Windows path style) + MSSQL[​](#fastbcp_settingsjson---sinks-on-console--files-windows-path-style--mssql "Direct link to FastBCP_Settings.json : Sinks on Console + Files (Windows path style) + MSSQL") For logs with Console + Files stored on Windows machine + MSSQL sinks: ``` { "ConnectionStrings": { "MS_FastBCPLogs": "Server=localhost;Database=FastBCPLogs;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\\FastBCP_.json", "retainedFileCountLimit": 10, "rollingInterval": "Day", "rollOnFileSizeLimit": true } }, { "Name": "MSSqlServer", "Args": { "connectionString": "MS_FastBCPLogs", "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": "FastBCP" } } } ``` ## FastBCP\_Settings\_Linux\_Console\_Files.json[​](#fastbcp_settings_linux_console_filesjson "Direct link to FastBCP_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/FastBCP_.json", "retainedFileCountLimit": 10, "rollingInterval": "Day", "rollOnFileSizeLimit": true } } ], "Enrich": [ "FromLogContext", "WithMachineName", "WithProcessId", "WithThreadId" ], "Properties": { "Application": "FastBCP" } } } ``` ## FastBCP\_Settings\_Map\_for\_Windows.json[​](#fastbcp_settings_map_for_windowsjson "Direct link to FastBCP_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}\\FastBCP-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": "FastBCP" } } } ``` ## FastBCP\_Settings\_Map\_for\_Linux\_and\_Container.json[​](#fastbcp_settings_map_for_linux_and_containerjson "Direct link to FastBCP_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}/FastBCP-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": "FastBCP" } } } ``` ## FastBCP\_Settings\_Log\_to\_PGSQL.json : Console + PostgreSQL log database[​](#fastbcp_settings_log_to_pgsqljson--console--postgresql-log-database "Direct link to FastBCP_Settings_Log_to_PGSQL.json : Console + PostgreSQL log database") ``` { "ConnectionStrings": { "PG_FastBCPLogs": "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_FastBCPLogs", "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": "FastBCP" } } } ``` ## FastBCP\_Settings\_OpenTelemetry.json[​](#fastbcp_settings_opentelemetryjson "Direct link to FastBCP_Settings_OpenTelemetry.json") For Console with trace correlation and OpenTelemetry log export (e.g., to [Jaeger](https://www.jaegertracing.io/)): ``` { "Serilog": { "MinimumLevel": { "Default": "Debug", "Override": { "Microsoft": "Warning", "System": "Warning" } }, "Properties": { "LogDirectory": "logs" }, "Enrich": [ "FromLogContext", "WithEnvironmentUserName", "WithProcessId", "WithThreadId", "WithMachineName", "fulltargetname" ], "WriteTo": [ { "Name": "Console", "Args": { "restrictedToMinimumLevel": "Information", "outputTemplate": "{Timestamp:yyyy-MM-ddTHH:mm:ss.fff zzz} -|- {Application} -|- {Level:u12} -|- {fulltargetname} -|- TraceId={TraceId} SpanId={SpanId} -|- {Message}{NewLine}{Exception}", "theme": "Serilog.Sinks.SystemConsole.Themes.SystemConsoleTheme::Literate, Serilog.Sinks.Console" } }, { "Name": "OpenTelemetry", "Args": { "Endpoint": "http://localhost:4317", "Protocol": "Grpc", "ResourceAttributes": { "service.name": "FastBCP", "deployment.environment": "local-test" } } } ] } } ``` Usage with the `--traceparent` parameter to correlate with an upstream caller: ``` ./FastBCP \ --connectiontype mssql \ --server localhost \ --database "tpch10" \ --trusted \ --query "SELECT * FROM dbo.orders" \ --directory "/data/temp" \ --fileoutput "orders.csv" \ --traceparent "00-abcdef1234567890abcdef1234567890-1234567890abcdef-01" \ --settingsfile "/config/FastBCP_Settings_OpenTelemetry.json" ``` **Result in Jaeger UI:** ![FastBCP OpenTelemetry result in Jaeger UI](/assets/images/FastBCP_OpenTelemetry_result_sample-729a1de4f4ccde92a0856f3f4e8b9468.jpg) --- # Log Database FastBCP 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 `FastBCP_settings.json` * You can specify a custom settings file using the `--settingsfile` parameter Information **Log table is created automatically if not exists but it is not indexed.** Up to you to choose you indexed column(s) you prefer to index. We Advice you to index event\_timestamp column and run\_id Information No internal purge of the log table, it is up to you to decide when and how filter the log table Complete configuration examples for both MSSQL and PostgreSQL are available in the [Configuration Examples](/1.1/documentation/logging/examples.md#fastbcp_settingsjson-for-windows) page. Information **In case the database is not reachable, FastBCP will fail and will refuse to continue.** If you want to continue without logging in the database, you can rename the `FastBCP_settings.json` file to something else (like `FastBCP_settings.json.save`) and FastBCP 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 ***FastBCP\_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}/FastBCP-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**: [FastBCP\_Settings\_Map\_for\_Windows.json](/1.1/documentation/logging/examples.md#fastbcp_settings_map_for_windowsjson) * **Linux/Container**: [FastBCP\_Settings\_Map\_for\_Linux\_and\_Container.json](/1.1/documentation/logging/examples.md#fastbcp_settings_map_for_linux_and_containerjson) --- # Log Levels FastBCP 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 | | **Critical** | Severe errors causing termination | Fatal application errors | ## Configuration[​](#configuration "Direct link to Configuration") You can also configure the log level in the `FastBCP_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\\FastBCP_.json", "rollingInterval": "Day" } } ] } } ``` --- # OpenTelemetry FastBCP supports [OpenTelemetry](https://opentelemetry.io/) for distributed tracing and log correlation. This allows you to correlate FastBCP operations with upstream callers (orchestrators, APIs, pipelines) and export structured logs to any OpenTelemetry-compatible backend such as [Jaeger](https://www.jaegertracing.io/), [Zipkin](https://zipkin.io/), or [Grafana Tempo](https://grafana.com/oss/tempo/). ## The `--traceparent` Parameter[​](#the---traceparent-parameter "Direct link to the---traceparent-parameter") The `--traceparent` parameter accepts a [W3C Trace Context](https://www.w3.org/TR/trace-context/) traceparent identifier. When provided, FastBCP uses this trace context to link its internal spans and logs to the calling system's trace, enabling end-to-end distributed tracing. **Syntax:** * Long form only: `--traceparent ""` **Format:** The traceparent value follows the W3C Trace Context specification: ``` {version}-{trace-id}-{parent-id}-{trace-flags} ``` | Field | Format | Description | | --------------- | ------------- | --------------------------------------------- | | **version** | 2 hex digits | Version of the trace context (currently `00`) | | **trace-id** | 32 hex digits | Globally unique trace identifier | | **parent-id** | 16 hex digits | Identifier of the calling span | | **trace-flags** | 2 hex digits | Trace flags (e.g., `01` for sampled) | **Example:** * Windows * Linux ``` .\FastBCP.exe ` ... --traceparent "00-abcdef1234567890abcdef1234567890-1234567890abcdef-01" ` ... ``` ``` ./FastBCP \ ... --traceparent "00-abcdef1234567890abcdef1234567890-1234567890abcdef-01" \ ... ``` Tips Pass the traceparent from your orchestrator (Airflow, Kestra, CI/CD pipeline, or any OpenTelemetry-instrumented caller) so that FastBCP operations appear as child spans in your distributed traces. ## Configuring the OpenTelemetry Endpoint[​](#configuring-the-opentelemetry-endpoint "Direct link to Configuring the OpenTelemetry Endpoint") FastBCP uses the Serilog OpenTelemetry sink to export logs. You can configure the endpoint using either **environment variables** or a **`FastBCP_Settings.json`** file. ### Using Environment Variables[​](#using-environment-variables "Direct link to Using Environment Variables") Set the `OTEL_EXPORTER_OTLP_ENDPOINT` environment variable to point to your OpenTelemetry collector: * Windows * Linux ``` $env:OTEL_EXPORTER_OTLP_ENDPOINT = "http://localhost:4317" ``` ``` export OTEL_EXPORTER_OTLP_ENDPOINT="http://localhost:4317" ``` ### Using `FastBCP_Settings.json`[​](#using-fastbcp_settingsjson "Direct link to using-fastbcp_settingsjson") Add the OpenTelemetry sink to the `WriteTo` section of your `FastBCP_Settings.json` file. This gives you full control over the protocol, endpoint, and resource attributes. ``` { "Serilog": { "MinimumLevel": { "Default": "Debug", "Override": { "Microsoft": "Warning", "System": "Warning" } }, "Properties": { "LogDirectory": "logs" }, "Enrich": [ "FromLogContext", "WithEnvironmentUserName", "WithProcessId", "WithThreadId", "WithMachineName", "fulltargetname" ], "WriteTo": [ { "Name": "Console", "Args": { "restrictedToMinimumLevel": "Information", "outputTemplate": "{Timestamp:yyyy-MM-ddTHH:mm:ss.fff zzz} -|- {Application} -|- {Level:u12} -|- {fulltargetname} -|- TraceId={TraceId} SpanId={SpanId} -|- {Message}{NewLine}{Exception}", "theme": "Serilog.Sinks.SystemConsole.Themes.SystemConsoleTheme::Literate, Serilog.Sinks.Console" } }, { "Name": "OpenTelemetry", "Args": { "Endpoint": "http://localhost:4317", "Protocol": "Grpc", "ResourceAttributes": { "service.name": "FastBCP", "deployment.environment": "local-test" } } } ] } } ``` **Key settings in the OpenTelemetry sink:** | Setting | Description | | ---------------------- | ----------------------------------------------------------------------------- | | **Endpoint** | URL of your OpenTelemetry collector (default: `http://localhost:4317`) | | **Protocol** | Transport protocol: `Grpc` (default) or `HttpProtobuf` | | **ResourceAttributes** | Key-value pairs attached to every log entry (e.g., service name, environment) | Information The `TraceId` and `SpanId` fields in the console output template allow you to see trace correlation directly in the console logs, even without an OpenTelemetry backend. note When both an environment variable and a `FastBCP_Settings.json` configuration are present, the settings file takes precedence for the OpenTelemetry sink configuration. --- # Logging Overview ## Parameter Logs targets using FastBCP\_settings.json[​](#parameter-logs-targets-using-fastbcp_settingsjson "Direct link to Parameter Logs targets using FastBCP_settings.json") In FastBCP can log informations in 3 modes : * **[Console](/1.1/documentation/logging/logs-level.md)** * **[Database (MSSQL and PostgreSQL Only)](/1.1/documentation/logging/log-database.md)** * **[File (or Map)](/1.1/documentation/logging/log-files-names-mapping-using-variables.md)** FastBCP also supports **[OpenTelemetry](/1.1/documentation/logging/OpenTelemetry.md)** for distributed tracing and log export to any OpenTelemetry-compatible backend. Tips You can use several targets (sinks) at the same time. You can adapt what and where you want to log using the `FastBCP_settings.json` file. By default if no custom path is provided, FastBCP looks for the settings file in : * the current directory (the working directory) * the same directory where the FastBCP executable is located (the executable directory). If this file is not present, FastBCP will use the console log only. You can specify a custom path to the settings file using the `-f` or `--settingsfile` parameter. * Windows * Linux ``` .\FastBCP.exe ` --connectiontype mssql ` --server localhost ` --database "tpch10_collation_bin2" ` --trusted ` --query "SELECT * FROM dbo.orders" ` --directory "D:\temp" ` --fileoutput "mssql_orders.csv" ` --parallelmethod Ntile ` --distributekeycolumn "o_orderkey" ` --paralleldegree 7 ` --settingsfile "D:\logs\config\FastBCP_settings.json" ``` ``` ./FastBCP \ --connectiontype mssql \ --server localhost \ --database "tpch10_collation_bin2" \ --trusted \ --query "SELECT * FROM dbo.orders" \ --directory "/data/temp" \ --fileoutput "mssql_orders.csv" \ --parallelmethod Ntile \ --distributekeycolumn "o_orderkey" \ --paralleldegree 7 \ --settingsfile "/etc/fastbcp/FastBCP_settings.json" ``` Some settings files samples can be found in the [Configuration Examples](/1.1/documentation/logging/examples.md) page. --- # Installation ## Instructions[​](#instructions "Direct link to Instructions") * Windows * Linux * Docker/MacOS To start using FastBCP, first **[request a trial](https://arpe.io/get-trial?product=FastBCP)** to download the latest version. Once downloaded, unzip FastBCP to a directory of your choice. ``` Expand-Archive -Path .\FastBCP.zip -DestinationPath .\FastBCP ``` You can verify the installation by checking the version: ``` .\FastBCP.exe --version ``` To start using FastBCP, first **[request a trial](https://arpe.io/get-trial?product=FastBCP)** to download the latest version. Once downloaded, unzip FastBCP to a directory of your choice. ``` unzip FastBCP.zip -d FastBCP ``` On **Linux**, you need to give execution rights to the FastBCP binary: ``` chmod +x FastBCP ```
You can verify the installation by checking the version: ``` ./FastBCP --version ``` FastBCP is available as a Docker image on **[Docker Hub](https://hub.docker.com/repository/docker/arpeio/fastbcp/general)**. Pull the latest version: ``` docker pull arpeio/fastbcp ``` Or pull a specific version: ``` docker pull arpeio/fastbcp:v0.0.0 ``` You can verify the installation by checking the version: ``` docker run --rm arpeio/fastbcp:latest --version ```
**You are now ready to run FastBCP.** License Information After the trial period you will need a valid license. By default, FastBCP will try to find a `FastBCP.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 FastBCP : | 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 in order to use it with ODBC or OLEDB connection type. --- # Apache Airflow [Apache Airflow](https://airflow.apache.org/) is a powerful open-source platform for developing, scheduling, and monitoring batch-oriented workflows. FastBCP 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") FastBCP provides an official Docker image available on Docker Hub: **Image:** `arpeio/fastbcp:latest`
**Repository:** ## Prerequisites[​](#prerequisites "Direct link to Prerequisites") ### Install Docker Provider[​](#install-docker-provider "Direct link to Install Docker Provider") To use FastBCP 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. FastBCP integration requires connections for your source database and cloud storage. ### 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:** `host.docker.internal` (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) AWS Connection (for S3 Export)[​](#b-aws-connection-for-s3-export "Direct link to B) AWS Connection (for S3 Export)") Create an AWS connection to pass cloud credentials to the container: 1. Navigate to **Admin** → **Connections** in the Airflow UI 2. Click **+** to create a new connection 3. In the **Connection Type** dropdown, select **Amazon Web Services** 4. Configure the connection: **Connection Settings:** * **Connection Id:** `aws_fastbcp` (or your preferred name) * **Connection Type:** `Amazon Web Services` (select this from the dropdown) * **AWS Access Key ID:** Your AWS access key (in the Login field) * **AWS Secret Access Key:** Your AWS secret key (in the Password field) * **Extra:** `{"region_name":"eu-west-1"}` (or your preferred region) tip Airflow AWS providers commonly use `region_name` in Extra JSON. Alternatively, you can use `{"region":"eu-west-1"}` or `{"aws_default_region":"eu-west-1"}`. ## 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 FastBCP 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., `fastbcp_orders_mssql_to_s3.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 _mssql_parts(conn_id: str): """ Extract MSSQL connection details from Airflow connection. Expected Airflow connection (using ODBC): - Conn Id: mssql_tpch10 (conn_type: odbc) - Host: host.docker.internal - Port: 11433 - Login/Password: FastLogin / FastPassword - Extra JSON: {"database":"tpch10"} """ c = BaseHook.get_connection(conn_id) host = c.host port = c.port user = c.login pwd = c.password # For ODBC MSSQL, the database is typically stored in Extra JSON # (because the UI may not expose a dedicated "Database" field). db = c.extra_dejson.get("database") or c.schema if not db: raise ValueError( f"Connection '{conn_id}': missing database. Put it in Extra JSON " f'{{"database":"tpch10"}} (recommended for ODBC).' ) return host, port, user, pwd, db def _aws_env(conn_id: str): """ Extract AWS credentials from Airflow connection and map to container env vars. Expected Airflow AWS connection: - Conn Id: aws_fastbcp - Conn Type: Amazon Web Services - Login -> AWS_ACCESS_KEY_ID - Password -> AWS_SECRET_ACCESS_KEY - Extra -> {"region_name":"eu-west-1"} (or your region) Returns a dictionary with: - AWS_ACCESS_KEY_ID - AWS_SECRET_ACCESS_KEY - AWS_DEFAULT_REGION """ c = BaseHook.get_connection(conn_id) # Keys can be in login/password or in Extra JSON access_key = c.login or c.extra_dejson.get("aws_access_key_id") secret_key = c.password or c.extra_dejson.get("aws_secret_access_key") # Airflow AWS providers commonly use "region_name" in Extra JSON region = ( c.extra_dejson.get("region_name") or c.extra_dejson.get("region") or c.extra_dejson.get("aws_default_region") ) missing = [ k for k, v in { "AWS_ACCESS_KEY_ID": access_key, "AWS_SECRET_ACCESS_KEY": secret_key, "AWS_DEFAULT_REGION": region, }.items() if not v ] if missing: raise ValueError( f"Connection '{conn_id}': missing AWS fields: {missing}. " f"Set login/password and add Extra.region_name (or region)." ) return { "AWS_ACCESS_KEY_ID": access_key, "AWS_SECRET_ACCESS_KEY": secret_key, "AWS_DEFAULT_REGION": region, } with DAG( dag_id="fastbcp_export_orders_parquet_to_s3", start_date=datetime(2025, 1, 1), schedule=None, catchup=False, tags=["fastbcp", "mssql", "s3", "docker"], ) as dag: mssql_host, mssql_port, mssql_user, mssql_pwd, mssql_db = _mssql_parts("mssql_tpch10") aws_env = _aws_env("aws_fastbcp") DockerOperator( task_id="export_orders_parquet_to_s3", image="arpeio/fastbcp: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, environment=aws_env, command=[ "--connectiontype", "mssql", "--server", f"{mssql_host},{mssql_port}", "--user", mssql_user, "--password", mssql_pwd, "--database", mssql_db, "--sourceschema", "dbo", "--sourcetable", "orders", "--fileoutput", "orders.parquet", "--directory", "s3://fastbcp-export/orders/parquet", "--parallelmethod", "Ntile", "--paralleldegree", "12", "--distributekeycolumn", "o_orderkey", "--merge", "false", "--nobanner", ], network_mode="bridge", ) ``` **Key Parameters:** * `image`: Specifies the FastBCP Docker image * `docker_url`: Docker daemon endpoint * `environment`: Dictionary of environment variables (AWS credentials in this case) * `command`: List of FastBCP CLI arguments * `auto_remove`: Automatically remove the container after successful execution ### Helper Functions Explained[​](#helper-functions-explained "Direct link to Helper Functions Explained") The DAG includes two utility functions: #### `_mssql_parts(conn_id)`[​](#_mssql_partsconn_id "Direct link to _mssql_partsconn_id") Extracts connection details from an Airflow ODBC connection. This function: * Retrieves host, port, username, and password * Extracts the database name from the Extra JSON field * Returns all components needed to build the FastBCP connection string #### `_aws_env(conn_id)`[​](#_aws_envconn_id "Direct link to _aws_envconn_id") Extracts AWS credentials from an Airflow AWS connection and maps them to the environment variables expected by FastBCP: * `AWS_ACCESS_KEY_ID` * `AWS_SECRET_ACCESS_KEY` * `AWS_DEFAULT_REGION` This function supports multiple Extra JSON formats for flexibility. ## Logging[​](#logging "Direct link to Logging") All FastBCP 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., `fastbcp_export_orders_parquet_to_s3`) 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: * FastBCP 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 16:15:37] INFO - Settings file not found in the working directory nor in the executable directory [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.882 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- The "FastBCP_Settings.json" file does not exist. Using default settings. Console Only with loglevel=Information [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.892 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- FastBCP Trial – will expires on "2026‑03‑27" (24 day(s) left). [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.892 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Starting [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- FastBCP Version : "0.29.2.0" Architecture : "X64" - Framework : ".NET 8.0.24" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Internal Trace ID : "5ccea857-1538-4a28-8b1c-cfe5c51fbd43" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Internal Run ID : "5ccea857-1538-4a28-8b1c-cfe5c51fbd43" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- OS : "Debian GNU/Linux 13 (trixie)" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Connection Type : "mssql" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Source SqlInstance : "sql22,1433" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Source Database : "tpch" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Source Schema : "tpch10" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Source Table : "orders" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Trusted Connection : False [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- User : "migadmin" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Output File : "orders.parquet" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Output Directory : /data/parquet [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Degree : 12 [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Distribute Method : "Ntile" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Distribute Column : "o_orderkey" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Decimal Separator : "," [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Delimiter : "|" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Use quotes : False [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Date format: "yyyy-MM-dd" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Encoding : "UTF-8" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- No Header : False [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Timestamped : False [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Boolean Format : "automatic" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Cloud Profile : "" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Application Intent : "ReadOnly" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.906 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- file extension is ".parquet" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.909 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Encoding used : Unicode (UTF-8) - 65001 - utf-8 [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.965 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- 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=FastBCP;Application Intent=ReadOnly" [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.086 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- 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 16:15:38] INFO - 2026-03-02T15:15:38.110 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Get DataTypes with header end : Elapsed=6 ms [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Data Segments Computation Completed in 260 ms [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Distribute Column Type : "Int32" [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 0 : 1 : 1 - 5000001 or "o_orderkey" is null [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 1 : 2 : 5000002 - 10000002 [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 2 : 3 : 10000003 - 15000003 [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 3 : 4 : 15000004 - 20000004 [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 4 : 5 : 20000005 - 25000005 [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 5 : 6 : 25000006 - 30000006 [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 6 : 7 : 30000007 - 35000007 [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 7 : 8 : 35000032 - 40000032 [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 8 : 9 : 40000033 - 45000033 [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 9 : 10 : 45000034 - 50000034 [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 10 : 11 : 50000035 - 55000035 [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 11 : 12 : 55000036 - 60000000 [2026-03-02 16:15:46] INFO - 2026-03-02T15:15:46.611 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 002 for o_orderkey between 10000003 and 15000003 into /data/parquet/orders_chunk_002.parquet : 1250001 rows x 9 columns in 8234ms [2026-03-02 16:15:46] INFO - 2026-03-02T15:15:46.611 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 011 for o_orderkey between 55000036 and 60000000 into /data/parquet/orders_chunk_011.parquet : 1249989 rows x 9 columns in 8234ms [2026-03-02 16:15:46] INFO - 2026-03-02T15:15:46.790 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 003 for o_orderkey between 15000004 and 20000004 into /data/parquet/orders_chunk_003.parquet : 1250001 rows x 9 columns in 8413ms [2026-03-02 16:15:46] INFO - 2026-03-02T15:15:46.797 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 005 for o_orderkey between 25000006 and 30000006 into /data/parquet/orders_chunk_005.parquet : 1250001 rows x 9 columns in 8420ms [2026-03-02 16:15:46] INFO - 2026-03-02T15:15:46.936 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 008 for o_orderkey between 40000033 and 45000033 into /data/parquet/orders_chunk_008.parquet : 1250001 rows x 9 columns in 8559ms [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.139 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 010 for o_orderkey between 50000035 and 55000035 into /data/parquet/orders_chunk_010.parquet : 1250001 rows x 9 columns in 8763ms [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.154 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 000 for o_orderkey between 1 and 5000001 into /data/parquet/orders_chunk_000.parquet : 1250001 rows x 9 columns in 8777ms [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.247 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 009 for o_orderkey between 45000034 and 50000034 into /data/parquet/orders_chunk_009.parquet : 1250001 rows x 9 columns in 8870ms [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.308 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 006 for o_orderkey between 30000007 and 35000007 into /data/parquet/orders_chunk_006.parquet : 1250001 rows x 9 columns in 8931ms [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.309 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 001 for o_orderkey between 5000002 and 10000002 into /data/parquet/orders_chunk_001.parquet : 1250001 rows x 9 columns in 8932ms [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.363 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 007 for o_orderkey between 35000032 and 40000032 into /data/parquet/orders_chunk_007.parquet : 1250001 rows x 9 columns in 8986ms [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.366 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 004 for o_orderkey between 20000005 and 25000005 into /data/parquet/orders_chunk_004.parquet : 1250001 rows x 9 columns in 8989ms [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- files generation end : Elapsed=9257 ms - maxdop=12 [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total data rows : 15000000 [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total data columns : 9 [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total cells : 135000000 [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Throughput rows : 1568531 rows/s [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Throughput cells : 14116787 cells/s [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total time : Elapsed=9563 ms [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total data rows : 15000000 [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total data columns : 9 [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total cells : 135000000 [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Final Throughput rows : 1568482 rows/s [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Final Throughput cells : 14116346 cells/s [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Completed Load [2026-03-02 16:15:47] INFO - Task instance in success state [2026-03-02 16:15:47] INFO - Previous state of the Task instance: TaskInstanceState.RUNNING [2026-03-02 16:15:47] INFO - Task operator: ``` --- # Docker Minimal, production-ready container image to run FastBCP, a high-performance bulk copy 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/FastBCP` * **Repository**: [FastBCP-Image on GitHub](https://github.com/arpe-io/FastBCP-Image) * **DockerHub**: [arpeio/fastbcp](https://hub.docker.com/repository/docker/arpeio/fastbcp/general) * Published automatically via GitHub Actions for each new release and weekly security updates ## Prerequisites[​](#prerequisites "Direct link to Prerequisites") * Docker 24+ (or Podman) * FastBCP Linux x64 ≥ 0.28.0 binary (for build only) * Optional: `FastBCP_Settings.json` to mount/copy into `/config` for custom logging settings ## Using the Prebuilt Image from DockerHub[​](#using-the-prebuilt-image-from-dockerhub "Direct link to Using the Prebuilt Image from DockerHub") You can use a prebuilt image from DockerHub that already includes the FastBCP binary. You must provide your own license at runtime. ### Available Tags[​](#available-tags "Direct link to Available Tags") * **Version-specific tags** are aligned with FastBCP releases (e.g., `v0.28.3`) * **`latest` tag** always points to the most recent FastBCP version ### Automatic Updates[​](#automatic-updates "Direct link to Automatic Updates") * **New releases**: Images are automatically built when new FastBCP versions are released * **Security updates**: The latest version of each minor branch (e.g., latest v0.27.x, v0.28.x, v0.29.x) is automatically rebuilt weekly (every Monday) with the latest base image and security patches * This ensures that all actively used versions remain secure without breaking compatibility * Example: If you use `v0.28.8` (latest of 0.28.x branch), it gets security updates even after `v0.29.0` is released ### Pull the Image[​](#pull-the-image "Direct link to Pull the Image") ``` # Latest version docker pull arpeio/fastbcp:latest # Specific version docker pull arpeio/fastbcp:v0.28.3 ``` ### Basic Commands[​](#basic-commands "Direct link to Basic Commands") ``` # Get command line help docker run --rm arpeio/fastbcp:latest # Check version docker run --rm arpeio/fastbcp:latest --version ``` ### License Requirement[​](#license-requirement "Direct link to License Requirement") Since version 0.28.0, pass the license content directly via `--license "…"`. ``` export licenseContent=$(cat ./FastBCP.lic) # Use $licenseContent in your docker run commands docker run --rm arpeio/fastbcp: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. ## Usage Examples[​](#usage-examples "Direct link to Usage Examples") The Docker image uses the FastBCP binary as its entrypoint, so you can run it directly with parameters as defined in the [FastBCP documentation](/latest/.md). ### Example 1: SQL Server → Parquet on S3[​](#example-1-sql-server--parquet-on-s3 "Direct link to Example 1: SQL Server → Parquet on S3") ``` export licenseContent=$(cat ./FastBCP.lic) docker run --rm \ -e AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID} \ -e AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY} \ -e AWS_REGION=${AWS_REGION} \ arpeio/fastbcp:latest \ --connectiontype "mssql" \ --server "host.docker.internal,1433" \ --user "FastUser" \ --password "FastPassword" \ --database "tpch_test" \ --query "SELECT * FROM dbo.orders WHERE year(o_orderdate)=1998" \ --fileoutput "orders.parquet" \ --directory "s3://arpeioftoutput/dockertest/" \ --paralleldegree 12 \ --parallelmethod "Ntile" \ --distributekeycolumn "o_orderkey" \ --merge false \ --license "$licenseContent" ``` ### Example 2: SQL Server → CSV with Custom Logging[​](#example-2-sql-server--csv-with-custom-logging "Direct link to Example 2: SQL Server → CSV with Custom Logging") ``` export licenseContent=$(cat ./FastBCP.lic) docker run --rm \ -v fastbcp-config:/config \ -v fastbcp-data:/data \ -v fastbcp-logs:/logs \ arpeio/fastbcp:latest \ --settingsfile "/config/FastBCP_Settings_Logs_To_Files.json" \ --connectiontype "mssql" \ --server "host.docker.internal,1433" \ --user "FastUser" \ --password "FastPassword" \ --database "tpch_test" \ --query "SELECT * FROM dbo.orders WHERE year(o_orderdate)=1998" \ --fileoutput "orders.csv" \ --directory "/data/orders/csv" \ --delimiter "|" \ --decimalseparator "." \ --dateformat "yyyy-MM-dd HH:mm:ss" \ --paralleldegree 12 \ --parallelmethod "Ntile" \ --distributekeycolumn "o_orderkey" \ --merge false \ --license "$licenseContent" ``` ### Example 3: PostgreSQL → Parquet on Azure Data Lake Storage (ADLS)[​](#example-3-postgresql--parquet-on-azure-data-lake-storage-adls "Direct link to Example 3: PostgreSQL → Parquet on Azure Data Lake Storage (ADLS)") ``` export licenseContent=$(cat ./FastBCP.lic) export adlscontainer="arpeioadlseu" docker run --rm \ -e AZURE_CLIENT_ID=${AZURE_CLIENT_ID} \ -e AZURE_TENANT_ID=${AZURE_TENANT_ID} \ -e AZURE_CLIENT_SECRET=${AZURE_CLIENT_SECRET} \ arpeio/fastbcp:latest \ --connectiontype "pgcopy" \ --server "host.docker.internal:15432" \ --user "FastUser" \ --password "FastPassword" \ --database "tpch" \ --sourceschema "tpch_10" \ --sourcetable "orders" \ --query "SELECT * FROM tpch_10.orders WHERE o_orderdate >= '1998-01-01' AND o_orderdate < '1999-01-01'" \ --fileoutput "orders.parquet" \ --directory "abfss://${adlscontainer}.dfs.core.windows.net/fastbcpoutput/testdfs/orders" \ --paralleldegree -2 \ --parallelmethod "Ctid" \ --license "$licenseContent" ``` ### Example 4: Oracle → Parquet on Google Cloud Storage (GCS)[​](#example-4-oracle--parquet-on-google-cloud-storage-gcs "Direct link to Example 4: Oracle → Parquet on Google Cloud Storage (GCS)") ``` export licenseContent=$(cat ./FastBCP.lic) export gcsbucket="arpeio-gcs-bucket" export GOOGLE_APPLICATION_CREDENTIALS_JSON=$(cat ./gcp-credentials.json) docker run --rm \ -e GOOGLE_APPLICATION_CREDENTIALS="${GOOGLE_APPLICATION_CREDENTIALS_JSON}" \ arpeio/fastbcp:latest \ --connectiontype "oraodp" \ --server "host.docker.internal:1521/FREEPDB1" \ --user "TPCH_IN" \ --password "TPCH_IN" \ --database "FREEPDB1" \ --sourceschema "TPCH_IN" \ --sourcetable "ORDERS" \ --fileoutput "orders.parquet" \ --directory "gs://${gcsbucket}/fastbcpoutput/testgs/orders" \ --parallelmethod "Rowid" \ --paralleldegree -2 \ --license "$licenseContent" ``` ## Volumes[​](#volumes "Direct link to Volumes") The Docker image declares several volumes to organize data and configuration: ``` VOLUME ["/config", "/data", "/work", "/logs"] ``` ### Volume Configuration and Access Modes[​](#volume-configuration-and-access-modes "Direct link to Volume Configuration and Access Modes") | **Volume** | **Purpose** | **Access Mode** | **Notes** | | ---------- | ------------------------------------------------------------------- | --------------------- | ----------------------------------------------- | | `/config` | Contains user-provided configuration files (e.g., Serilog settings) | Read-only / Read-many | Shared across multiple containers; not modified | | `/data` | Input/output data directory | 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 FastBCP Logging[​](#configuring-fastbcp-logging "Direct link to Configuring FastBCP Logging") info Available starting from version v0.28.3 FastBCP supports custom logging configuration through an external Serilog settings file in JSON format. This allows you to control how and where logs are written — to the console, to files, or dynamically per run. You can download an example logging settings file directly from GitHub: [FastBCP\_Settings\_Logs\_To\_Files.json](https://raw.githubusercontent.com/aetperf/FastBCP-Image/main/FastBCP_Settings_Logs_To_Files.json) Custom settings files must be mounted into the container under the `/config` directory. ### 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") The following configuration is recommended for most production or Airflow environments. It writes: * Logs to the console for real-time visibility * Run summary logs to `/airflow/xcom/return.json` for Airflow integration * Per-run logs under `/logs`, automatically named with `{LogTimestamp}` and `{TraceId}` ``` { "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": "FastBCP" } } } ``` Important Notes * If a target directory (such as `/logs` or `/airflow/xcom`) does not exist, FastBCP 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") You can use the following placeholders to dynamically generate log file names or directories: | **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") Your Serilog configuration file (for example, `FastBCP_Settings_Logs_To_Files.json`) must be placed in `/config`, either by mounting a local directory or by using a Docker named volume. Example with named volumes: ``` # First, copy your config file to a volume location cp ~/FastBCP_Settings_Logs_To_Files.json /volumes/fastbcp-config/ # Then run FastBCP with mounted volumes docker run --rm \ -v fastbcp-config:/config \ -v fastbcp-data:/data \ -v fastbcp-logs:/logs \ arpeio/fastbcp:latest \ --settingsfile "/config/FastBCP_Settings_Logs_To_Files.json" \ --connectiontype "mssql" \ --server "host.docker.internal,1433" \ --user "FastUser" \ --password "FastPassword" \ --database "tpch_test" \ --query "SELECT * FROM dbo.orders" \ --fileoutput "orders.csv" \ --directory "/data" \ --paralleldegree 12 \ --parallelmethod "Ntile" \ --distributekeycolumn "o_orderkey" \ --merge false \ --license "$licenseContent" ``` If the `--settingsfile` argument is not provided, FastBCP will use its built-in default logging configuration. --- # Kestra [Kestra](https://kestra.io/) is a powerful open-source orchestration platform that can be used to automate and schedule FastBCP data export workflows. FastBCP can be seamlessly integrated into Kestra flows using its Docker image. ## Docker Image[​](#docker-image "Direct link to Docker Image") FastBCP provides an official Docker image available on Docker Hub: **Image:** `arpeio/fastbcp:latest`
**Repository:** ## Integration with Docker Run Plugin[​](#integration-with-docker-run-plugin "Direct link to Integration with Docker Run Plugin") The [`io.kestra.plugin.docker.Run`](https://kestra.io/plugins/plugin-docker/io.kestra.plugin.docker.run) plugin provides a direct way to execute FastBCP commands in a Docker container. This is the recommended method for integrating FastBCP with Kestra. ### Basic Example[​](#basic-example "Direct link to Basic Example") ``` id: fastbcp_export_orders namespace: arpe.io tasks: - id: export_orders_parquet type: io.kestra.plugin.docker.Run containerImage: arpeio/fastbcp:latest host: "tcp://host.docker.internal:2375" commands: - --connectiontype - mssql - --server - "host.docker.internal,11433" - --user - FastLogin - --password - FastPassword - --database - tpch10 - --sourceschema - dbo - --sourcetable - orders - --fileoutput - orders.parquet - --directory - /data/export - --parallelmethod - Ntile - --paralleldegree - "12" - --distributekeycolumn - o_orderkey - --nobanner ``` **Key Parameters:** * `containerImage`: Specifies the FastBCP Docker image * `host`: Docker daemon endpoint (required for Docker Run plugin) * `commands`: Array of FastBCP CLI arguments ## Environment Variables for Cloud Storage[​](#environment-variables-for-cloud-storage "Direct link to Environment Variables for Cloud Storage") When exporting data to cloud storage (AWS S3, Azure Blob, Google Cloud Storage), you can pass cloud credentials using environment variables (see [Cloud Connectivity](/1.1/documentation/cloud-connectivity/overview.md) for more details). ### Example with AWS S3[​](#example-with-aws-s3 "Direct link to Example with AWS S3") ``` id: fastbcp_export_to_s3 namespace: arpe.io tasks: - id: export_orders_to_s3 type: io.kestra.plugin.docker.Run containerImage: arpeio/fastbcp:latest host: "tcp://host.docker.internal:2375" env: AWS_ACCESS_KEY_ID: "AKIAIOSFODNN7EXAMPLE" AWS_SECRET_ACCESS_KEY: "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY" AWS_DEFAULT_REGION: "us-east-1" commands: - --connectiontype - mssql - --server - "host.docker.internal,11433" - --user - FastLogin - --password - FastPassword - --database - tpch10 - --sourceschema - dbo - --sourcetable - orders - --fileoutput - orders.parquet - --directory - s3://my-bucket/exports/orders - --parallelmethod - Ntile - --paralleldegree - "12" - --distributekeycolumn - o_orderkey - --merge - "false" - --nobanner ``` ## 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, connection strings, and cloud credentials, 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: * `FASTBCP_MSSQL_USER` * `FASTBCP_MSSQL_PASSWORD` * `FASTBCP_AWS_ACCESS_KEY_ID` * `FASTBCP_AWS_SECRET_ACCESS_KEY` * `FASTBCP_AWS_DEFAULT_REGION` ### Example with Secrets[​](#example-with-secrets "Direct link to Example with Secrets") ``` id: fastbcp_export_orders_s3_secret namespace: arpe.io tasks: - id: export_orders_parquet_to_s3 type: io.kestra.plugin.docker.Run containerImage: arpeio/fastbcp:latest host: "tcp://host.docker.internal:2375" env: AWS_ACCESS_KEY_ID: "{{ secret('FASTBCP_AWS_ACCESS_KEY_ID') }}" AWS_SECRET_ACCESS_KEY: "{{ secret('FASTBCP_AWS_SECRET_ACCESS_KEY') }}" AWS_DEFAULT_REGION: "{{ secret('FASTBCP_AWS_DEFAULT_REGION') }}" commands: - --connectiontype - mssql - --server - "host.docker.internal,11433" - --user - "{{ secret('FASTBCP_MSSQL_USER') }}" - --password - "{{ secret('FASTBCP_MSSQL_PASSWORD') }}" - --database - tpch10 - --sourceschema - dbo - --sourcetable - orders - --fileoutput - orders.parquet - --directory - s3://fastbcp-export/orders/parquet - --parallelmethod - Ntile - --paralleldegree - "12" - --distributekeycolumn - o_orderkey - --merge - "false" - --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 FastBCP 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 export process, including configuration parameters, connection details, data export progress, and performance metrics. ### Example Log Output[​](#example-log-output "Direct link to Example Log Output") ``` 2026-03-02T15:15:37.882 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- The "FastBCP_Settings.json" file does not exist. Using default settings. Console Only with loglevel=Information 2026-03-02 16:15:37.8922026-03-02T15:15:37.892 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- FastBCP Trial – will expires on "2026‑03‑27" (24 day(s) left). 2026-03-02 16:15:37.8922026-03-02T15:15:37.892 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Starting 2026-03-02 16:15:37.8932026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- FastBCP Version : "0.29.2.0" Architecture : "X64" - Framework : ".NET 8.0.24" 2026-03-02 16:15:37.8932026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Internal Trace ID : "5ccea857-1538-4a28-8b1c-cfe5c51fbd43" 2026-03-02 16:15:37.8932026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Internal Run ID : "5ccea857-1538-4a28-8b1c-cfe5c51fbd43" 2026-03-02 16:15:37.8932026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- OS : "Debian GNU/Linux 13 (trixie)" 2026-03-02 16:15:37.8932026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Connection Type : "mssql" 2026-03-02 16:15:37.8932026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Source SqlInstance : "sql22,1433" 2026-03-02 16:15:37.8932026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Source Database : "tpch" 2026-03-02 16:15:37.8932026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Source Schema : "tpch10" 2026-03-02 16:15:37.8932026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Source Table : "orders" 2026-03-02 16:15:37.8932026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Trusted Connection : False 2026-03-02 16:15:37.8932026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- User : "migadmin" 2026-03-02 16:15:37.8932026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Output File : "orders.parquet" 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Output Directory : /data/parquet 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Degree : 12 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Distribute Method : "Ntile" 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Distribute Column : "o_orderkey" 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Decimal Separator : "," 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Delimiter : "|" 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Use quotes : False 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Date format: "yyyy-MM-dd" 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Encoding : "UTF-8" 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- No Header : False 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Timestamped : False 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Boolean Format : "automatic" 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Cloud Profile : "" 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Application Intent : "ReadOnly" 2026-03-02 16:15:37.9062026-03-02T15:15:37.906 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- file extension is ".parquet" 2026-03-02 16:15:37.9092026-03-02T15:15:37.909 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Encoding used : Unicode (UTF-8) - 65001 - utf-8 2026-03-02 16:15:37.9652026-03-02T15:15:37.965 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- 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=FastBCP;Application Intent=ReadOnly" 2026-03-02 16:15:38.0862026-03-02T15:15:38.086 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- 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 16:15:38.1102026-03-02T15:15:38.110 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Get DataTypes with header end : Elapsed=6 ms 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Data Segments Computation Completed in 260 ms 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Distribute Column Type : "Int32" 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 0 : 1 : 1 - 5000001 or "o_orderkey" is null 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 1 : 2 : 5000002 - 10000002 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 2 : 3 : 10000003 - 15000003 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 3 : 4 : 15000004 - 20000004 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 4 : 5 : 20000005 - 25000005 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 5 : 6 : 25000006 - 30000006 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 6 : 7 : 30000007 - 35000007 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 7 : 8 : 35000032 - 40000032 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 8 : 9 : 40000033 - 45000033 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 9 : 10 : 45000034 - 50000034 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 10 : 11 : 50000035 - 55000035 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 11 : 12 : 55000036 - 60000000 2026-03-02 16:15:46.6112026-03-02T15:15:46.611 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 002 for o_orderkey between 10000003 and 15000003 into /data/parquet/orders_chunk_002.parquet : 1250001 rows x 9 columns in 8234ms 2026-03-02 16:15:46.6112026-03-02T15:15:46.611 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 011 for o_orderkey between 55000036 and 60000000 into /data/parquet/orders_chunk_011.parquet : 1249989 rows x 9 columns in 8234ms 2026-03-02 16:15:46.7902026-03-02T15:15:46.790 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 003 for o_orderkey between 15000004 and 20000004 into /data/parquet/orders_chunk_003.parquet : 1250001 rows x 9 columns in 8413ms 2026-03-02 16:15:46.7972026-03-02T15:15:46.797 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 005 for o_orderkey between 25000006 and 30000006 into /data/parquet/orders_chunk_005.parquet : 1250001 rows x 9 columns in 8420ms 2026-03-02 16:15:46.9362026-03-02T15:15:46.936 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 008 for o_orderkey between 40000033 and 45000033 into /data/parquet/orders_chunk_008.parquet : 1250001 rows x 9 columns in 8559ms 2026-03-02 16:15:47.1392026-03-02T15:15:47.139 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 010 for o_orderkey between 50000035 and 55000035 into /data/parquet/orders_chunk_010.parquet : 1250001 rows x 9 columns in 8763ms 2026-03-02 16:15:47.1542026-03-02T15:15:47.154 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 000 for o_orderkey between 1 and 5000001 into /data/parquet/orders_chunk_000.parquet : 1250001 rows x 9 columns in 8777ms 2026-03-02 16:15:47.2472026-03-02T15:15:47.247 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 009 for o_orderkey between 45000034 and 50000034 into /data/parquet/orders_chunk_009.parquet : 1250001 rows x 9 columns in 8870ms 2026-03-02 16:15:47.3082026-03-02T15:15:47.308 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 006 for o_orderkey between 30000007 and 35000007 into /data/parquet/orders_chunk_006.parquet : 1250001 rows x 9 columns in 8931ms 2026-03-02 16:15:47.3092026-03-02T15:15:47.309 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 001 for o_orderkey between 5000002 and 10000002 into /data/parquet/orders_chunk_001.parquet : 1250001 rows x 9 columns in 8932ms 2026-03-02 16:15:47.3632026-03-02T15:15:47.363 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 007 for o_orderkey between 35000032 and 40000032 into /data/parquet/orders_chunk_007.parquet : 1250001 rows x 9 columns in 8986ms 2026-03-02 16:15:47.3662026-03-02T15:15:47.366 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 004 for o_orderkey between 20000005 and 25000005 into /data/parquet/orders_chunk_004.parquet : 1250001 rows x 9 columns in 8989ms 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- files generation end : Elapsed=9257 ms - maxdop=12 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total data rows : 15000000 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total data columns : 9 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total cells : 135000000 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Throughput rows : 1568531 rows/s 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Throughput cells : 14116787 cells/s 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total time : Elapsed=9563 ms 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total data rows : 15000000 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total data columns : 9 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total cells : 135000000 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Final Throughput rows : 1568482 rows/s 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Final Throughput cells : 14116346 cells/s 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Completed Load ``` --- # PostgreSQL The **pg\_fastbcp** extension allows you to run the FastBCP tool directly from an SQL function, enabling fast data export from databases to various formats (CSV, Parquet) and cloud storage directly from PostgreSQL. ## Extension Overview[​](#extension-overview "Direct link to Extension Overview") * **Repository**: [arpe-io/pg\_fastbcp](https://github.com/arpe-io/pg_fastbcp) * **License**: MIT * **Latest version**: v0.30.0 * **Platforms**: Linux (Debian/Ubuntu) and Windows ![pg\_fastbcp Demo](/assets/images/pg_fastbcp-e5e0b5519f8de77a14a8f8cba33d251c.gif) ## Features[​](#features "Direct link to Features") * **Native PostgreSQL Integration**: Execute FastBCP commands directly from SQL * **Secure Password Management**: Built-in encryption for sensitive credentials * **Detailed Result Return**: Get export statistics and performance metrics as SQL results * **Cross-Platform**: Available for both Linux and Windows environments * **Flexible Configuration**: Support for all FastBCP parameters * **Multiple Output Formats**: Export to CSV, Parquet, or directly to cloud storage (AWS S3, Azure Blob, Google Cloud Storage, OneLake) ## Prerequisites[​](#prerequisites "Direct link to Prerequisites") * PostgreSQL 15, 16, 17, or 18 * Sudo/Administrator privileges to install the extension * Valid FastBCP license (request a [trial license](https://arpe.io/get-trial?product=FastBCP)) * FastBCP 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 `FastBCP` 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\_fastbcp releases page](https://github.com/arpe-io/pg_fastbcp/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_fastbcp.so` * `pg_fastbcp.control` * `pg_fastbcp--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_fastbcp.so /usr/lib/postgresql//lib/ sudo cp pg_fastbcp.control pg_fastbcp--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 FastBCP binary sudo chmod +x /path/to/FastBCP sudo chown postgres:postgres /path/to/FastBCP sudo chmod 750 /path/to/FastBCP # 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_fastbcp.dll` * `pg_fastbcp.control` * `pg_fastbcp--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_fastbcp.dll` file into the `lib` folder 4. Copy the `pg_fastbcp.control` and `pg_fastbcp--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 `FastBCP.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_fastbcp CASCADE; ``` ### Create the extension[​](#create-the-extension "Direct link to Create the extension") ``` CREATE EXTENSION pg_fastbcp CASCADE; ``` ## Functions[​](#functions "Direct link to Functions") ### pg\_fastbcp\_encrypt[​](#pg_fastbcp_encrypt "Direct link to pg_fastbcp_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_RunFastBcp_secure` function will automatically decrypt any values passed to its `password` argument. **Syntax:** ``` pg_fastbcp_encrypt(text_to_encrypt text) RETURNS text ``` **Example:** ``` SELECT pg_fastbcp_encrypt('MySecurePassword'); -- Returns: A base64-encoded encrypted string, e.g., "PgP...base64encodedstring==" ``` ### xp\_RunFastBcp\_secure[​](#xp_runfastbcp_secure "Direct link to xp_RunFastBcp_secure") This is the main function to execute the FastBCP tool. It takes various parameters to configure the data export operation. Password arguments (`password`) will be automatically decrypted. **Syntax:** ``` xp_RunFastBcp_secure( connectiontype text DEFAULT NULL, sourceconnectstring text DEFAULT NULL, dsn text DEFAULT NULL, provider text DEFAULT NULL, server text DEFAULT NULL, user_ text DEFAULT NULL, password text DEFAULT NULL, trusted boolean DEFAULT NULL, database_name text DEFAULT NULL, applicationintent text DEFAULT NULL, fileinput text DEFAULT NULL, query text DEFAULT NULL, sourceschema text DEFAULT NULL, sourcetable text DEFAULT NULL, fileoutput text DEFAULT NULL, directory text DEFAULT NULL, timestamped boolean DEFAULT NULL, encoding text DEFAULT NULL, delimiter text DEFAULT NULL, usequotes boolean DEFAULT NULL, dateformat text DEFAULT NULL, decimalseparator text DEFAULT NULL, boolformat text DEFAULT NULL, noheader boolean DEFAULT NULL, parquetcompression text DEFAULT NULL, cloudprofile text DEFAULT NULL, parallelmethod text DEFAULT NULL, paralleldegree integer DEFAULT NULL, distributekeycolumn text DEFAULT NULL, datadrivenquery text DEFAULT NULL, merge boolean DEFAULT NULL, loglevel text DEFAULT NULL, runid text DEFAULT NULL, settingsfile text DEFAULT NULL, config text DEFAULT NULL, nobanner boolean DEFAULT NULL, license text DEFAULT NULL, fastbcp_path text DEFAULT NULL ) RETURNS TABLE ( exit_code integer, output text, total_rows bigint, total_columns integer, total_time bigint ) ``` ## Usage Examples[​](#usage-examples "Direct link to Usage Examples") ### Linux Example - PostgreSQL to CSV[​](#linux-example---postgresql-to-csv "Direct link to Linux Example - PostgreSQL to CSV") Export data from PostgreSQL to CSV files: ``` SELECT * FROM xp_RunFastBcp_secure( connectiontype := 'pgsql', server := 'localhost:5432', user_ := 'postgres', password := pg_fastbcp_encrypt('MyActualPassword'), database_name := 'tpch', sourceschema := 'tpch_1', sourcetable := 'orders', fileoutput := 'orders.csv', directory := '/tmp/export', paralleldegree := 4, parallelmethod := 'Ntile', distributekeycolumn := 'o_orderkey', noheader := false, delimiter := ',', license := '/tmp/FastBCP_linux-x64_v0.30.0/FastBCP.lic', loglevel := 'information', nobanner := false, fastbcp_path := '/tmp/FastBCP_linux-x64_v0.30.0' ); ``` ## 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 FastBCP process. | | `output` | text | The full log output from the FastBCP tool. | | `total_rows` | bigint | The total number of rows transferred. | | `total_columns` | integer | The total number of columns transferred. | | `total_time` | bigint | The total execution time in milliseconds. | ## Output[​](#output "Direct link to Output") You can view the full FastBCP output using the `output` column returned by the function. ## Resources[​](#resources "Direct link to Resources") * [pg\_fastbcp GitHub Repository](https://github.com/arpe-io/pg_fastbcp) * [FastBCP Documentation](https://fastbcp-docs.arpe.io/latest/integration/postgresql-integration) * [Get a Trial License](https://arpe.io/get-trial?product=FastBCP) * [Report Issues](https://github.com/arpe-io/pg_fastbcp/issues) --- # Release Notes 0.32 ## New Features[​](#new-features "Direct link to New Features") ### OpenTelemetry Support[​](#opentelemetry-support "Direct link to OpenTelemetry Support") FastBCP now supports [OpenTelemetry](https://opentelemetry.io/) for distributed tracing and log correlation. **New parameter:** * `--traceparent`: Accept a [W3C Trace Context](https://www.w3.org/TR/trace-context/) traceparent identifier from an external caller, enabling end-to-end trace correlation across distributed systems. **OpenTelemetry log export:** * Logs can be exported to any OpenTelemetry-compatible collector (e.g., Jaeger, Zipkin, Grafana Tempo) via the Serilog OpenTelemetry sink. * Configuration through environment variables or the `FastBCP_Settings.json` file. See the [OpenTelemetry logging documentation](/1.1/documentation/logging/OpenTelemetry.md) for setup details and examples. ### Gzip Compression[​](#gzip-compression "Direct link to Gzip Compression") **Streamed gzip compression** is now possible by adding `.gz` to file extension. For csv, tsv and json only. * use `--fileoutput file.csv.gz` ### BREAKING CHANGE[​](#breaking-change "Direct link to BREAKING CHANGE") * `--merge` default is Switched from `true` to `false` ### Others[​](#others "Direct link to Others") * Better datatypes coverage for csv and json --- # Release Notes 1.0 ## What's Changed[​](#whats-changed "Direct link to What's Changed") ### ADBC Parquet Export - 2x Faster Performance[​](#adbc-parquet-export---2x-faster-performance "Direct link to ADBC Parquet Export - 2x Faster Performance") FastBCP now supports ADBC (Arrow Database Connectivity) for Parquet exports via the `--connectiontype adbc_mssql` connector, powered by ArrowTDS. **Performance improvements:** * 2x faster Parquet generation compared to traditional methods * Native columnar data format (Arrow) eliminates conversion overhead * Optimized for SQL Server data types **Usage:** ``` fastbcp --server myserver.database.windows.net \ --database MyDatabase \ --query "SELECT * FROM Sales.Orders" \ --connectiontype adbc_mssql \ --fileoutput "orders.parquet" ``` See [Connection Parameters documentation](/latest/documentation/cli/connection_parameters.md#connection-type) for more details. ### Buffered Cloud Uploads[​](#buffered-cloud-uploads "Direct link to Buffered Cloud Uploads") New environment variables enable buffered cloud uploads for significantly improved Azure Data Lake Storage and OneLake performance. **New environment variables:** * `FASTBCP_CLOUD_ISBUFFERED`: When `True`, ADLS/OneLake writes are buffered to a local temp file, then uploaded in parallel. When `False`, data is streamed directly to the cloud. * `FASTBCP_TMPPATH`: Base directory for temporary files created during buffered cloud uploads. Default: System temp (`%TEMP%` / `$TMPDIR`). * `FASTBCP_CLOUD_MAXUPLOADTHREAD_PER_STREAM`: Maximum number of parallel upload threads per cloud stream. Default: `8` if `parallelmethod=None`, `2` otherwise. * `FASTBCP_UID_STRING_CASING`: Controls UID-to-string casing. Values: `lower` or `upper`. Default: `lower` (RFC 4122). **Example — Buffered cloud uploads:** ``` # Enable buffered uploads for Azure $env:FASTBCP_CLOUD_ISBUFFERED = "True" $env:FASTBCP_TMPPATH = "D:\temp\fastbcp" fastbcp --server myserver --database MyDB --sourceschema Sales --sourcetable Orders ` --fileoutput "abfss://container@storage.dfs.core.windows.net/orders.parquet" ``` **Example — UID string casing (PowerShell):** ``` # Output UIDs in uppercase $env:FASTBCP_UID_STRING_CASING = "upper" fastbcp --server myserver --database MyDB --sourcetable MyTable --fileoutput "output.parquet" ``` **Example — UID string casing (Linux):** ``` # Output UIDs in uppercase export FASTBCP_UID_STRING_CASING=upper fastbcp --server myserver --database MyDB --sourcetable MyTable --fileoutput "output.parquet" ``` See the [Environment Variables](/1.1/documentation/environment-variables/overview.md) documentation for detailed configuration. ### Move to .NET 10[​](#move-to-net-10 "Direct link to Move to .NET 10") FastBCP now runs on .NET 10: * Performance improvements in runtime and GC * Enhanced security and stability * Continued long-term support * Compatibility: Windows, Linux, macOS (x64, ARM64) ### Improved SBOM Generation[​](#improved-sbom-generation "Direct link to Improved SBOM Generation") Enhanced Software Bill of Materials (SBOM) generation for better supply chain security and compliance. ### SLSA Build Provenance[​](#slsa-build-provenance "Direct link to SLSA Build Provenance") Added SLSA (Supply-chain Levels for Software Artifacts) build provenance in CI for enhanced supply chain security and compliance. ### Early Cleanup of Temp Files[​](#early-cleanup-of-temp-files "Direct link to Early Cleanup of Temp Files") When uploading to cloud storage, temporary files are now cleaned up earlier in the process to reduce disk space requirements. ## ArrowTDS ARPE.IO Driver[​](#arrowtds-arpeio-driver "Direct link to ArrowTDS ARPE.IO Driver") FastBCP 1.0 includes the ArrowTDS ARPE.IO driver for high-performance ADBC connectivity. **Key features:** * TDS 7.4 protocol compatibility * Native Arrow columnar format support * Optimized for SQL Server 2012 and later --- # Release Notes 1.1 ## What's Changed[​](#whats-changed "Direct link to What's Changed") ### ADBC PostgreSQL — Arpe.io ADBC FastDriver[​](#adbc-postgresql--arpeio-adbc-fastdriver "Direct link to ADBC PostgreSQL — Arpe.io ADBC FastDriver") FastBCP now supports ADBC for PostgreSQL via the `--connectiontype adbc_pgsql` connector, powered by the new ADBC Arrow\_FEBE drivers (Arpe.io ADBC FastDriver). **Key highlights:** * Ultra-fast Parquet exports from PostgreSQL * Native Arrow columnar format eliminates conversion overhead * Same high-performance ADBC approach as the existing `adbc_mssql` connector **Usage:** ``` fastbcp --server pg-server:5432 \ --database MyDatabase \ --query "SELECT * FROM public.orders" \ --connectiontype adbc_pgsql \ --fileoutput "orders.parquet" ``` See [Connection Parameters documentation](/latest/documentation/cli/connection_parameters.md#connection-type) for more details. ### \[Breaking] New Default Date Format[​](#breaking-new-default-date-format "Direct link to \[Breaking] New Default Date Format") The default `--dateformat` value for CSV, JSON, and XLSX outputs has changed from `yyyy-MM-dd` to `yyyy-MM-dd HH:mm:sszzz`. **Auto-adaptive behavior:** The format automatically adapts based on the column type: * **Date-only** columns remain formatted as `yyyy-MM-dd` * **Timestamp/DateTime** columns are formatted as `yyyy-MM-dd HH:mm:ss` even if a timezone token (`zzz`) is in the format string * **DateTimeOffset** columns include the full timezone offset This change also fixes date-only format handling and adds timezone support for CSV date formatting. **Migration:** If your pipeline depends on the previous default (`yyyy-MM-dd`), explicitly set `--dateformat "yyyy-MM-dd"` in your command. ### New Boolean Format Values[​](#new-boolean-format-values "Direct link to New Boolean Format Values") The `--boolformat` parameter now supports additional formats: | Format | Example output | | ------------ | --------------- | | `True/False` | `True`, `False` | | `yes/no` | `yes`, `no` | | `y/n` | `y`, `n` | These are in addition to the existing `true/false`, `t/f`, and `1/0` formats. **Example:** ``` fastbcp --server myserver \ --database MyDatabase \ --query "SELECT * FROM products" \ --fileoutput "products.csv" \ --boolformat "True/False" ``` ### Environment Variables Guardrails[​](#environment-variables-guardrails "Direct link to Environment Variables Guardrails") Security hardening of environment variable handling (internal improvement), with no user-facing impact. --- # Sitemap ## [Installation](/1.1/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](/1.1/.md) * CLI Reference * [Authentication](/1.1/documentation/cli/authentication.md) * [Connection Parameters](/1.1/documentation/cli/connection_parameters.md) * [Source Info](/1.1/documentation/cli/source_info.md) * [Output Info](/1.1/documentation/cli/output_info.md) * [CSV Formatting](/1.1/documentation/cli/csv_formatting.md) * [Parquet Formatting](/1.1/documentation/cli/parquet_formatting.md) * [Cloud Options](/1.1/documentation/cli/cloud_options.md) * [Parallel Parameters](/1.1/documentation/cli/parallel_parameters.md) * [Advanced Parameters](/1.1/documentation/cli/advanced_parameters.md) * [License](/1.1/documentation/cli/license.md) * Environment Variables * [Overview](/1.1/documentation/environment-variables/overview.md) * [FASTBCP\_CLOUD\_ISBUFFERED](/1.1/documentation/environment-variables/fastbcp-cloud-isbuffered.md) * [FASTBCP\_TMPPATH](/1.1/documentation/environment-variables/fastbcp-tmppath.md) * [FASTBCP\_CLOUD\_MAXUPLOADTHREAD\_PER\_STREAM](/1.1/documentation/environment-variables/fastbcp-cloud-maxuploadthread-per-stream.md) * [FASTBCP\_RGSIZE](/1.1/documentation/environment-variables/fastbcp-rgsize.md) * [FASTBCP\_UID\_STRING\_CASING](/1.1/documentation/environment-variables/fastbcp-uid-string-casing.md) * [FASTBCP\_DATEFORMAT](/1.1/documentation/environment-variables/fastbcp-dateformat.md) * Cloud Connectivity * [Overview](/1.1/documentation/cloud-connectivity/overview.md) * [AWS S3](/1.1/documentation/cloud-connectivity/aws-s3.md) * [Azure](/1.1/documentation/cloud-connectivity/azure.md) * [Google Cloud Storage](/1.1/documentation/cloud-connectivity/google-cloud.md) * [OneLake](/1.1/documentation/cloud-connectivity/onelake.md) * Logging * [Overview](/1.1/documentation/logging/Overview.md) * [Logs Level](/1.1/documentation/logging/logs-level.md) * [Log Database](/1.1/documentation/logging/log-database.md) * [Log Files Names Mapping using variables](/1.1/documentation/logging/log-files-names-mapping-using-variables.md) * [OpenTelemetry](/1.1/documentation/logging/OpenTelemetry.md) * [Examples](/1.1/documentation/logging/examples.md) * Examples * [SQL Server Examples](/1.1/documentation/examples/sql-server.md) * [PostgreSQL Examples](/1.1/documentation/examples/postgresql.md) * [MySQL Examples](/1.1/documentation/examples/mysql.md) * [Oracle Examples](/1.1/documentation/examples/oracle.md) * [DB2 Examples](/1.1/documentation/examples/db2.md) * [Other Databases](/1.1/documentation/examples/other-databases.md) * [Output Formats](/1.1/documentation/examples/output-formats.md) * [Cloud Storage](/1.1/documentation/examples/cloud-storage.md) * [Advanced Scenarios](/1.1/documentation/examples/advanced-scenarios.md) * Compatibility * [Sources & Platforms](/1.1/documentation/compatibility/sources_platforms.md) * [Operating Systems](/1.1/documentation/compatibility/operating_systems.md) ## Datatypes Conversion[​](#datatypes-conversion "Direct link to Datatypes Conversion") * [Overview](/1.1/datatypes-conversion/overview.md) * SQL Server * [mssql](/1.1/datatypes-conversion/mssql/parquet.md) * [adbc\_mssql](/1.1/datatypes-conversion/mssql/adbc-parquet.md) * MySQL * [mysql](/1.1/datatypes-conversion/mysql/parquet.md) * Oracle * [oraodp](/1.1/datatypes-conversion/oracle/parquet.md) * PostgreSQL * [pgsql](/1.1/datatypes-conversion/postgresql/parquet.md) * [pgcopy](/1.1/datatypes-conversion/postgresql-copy/parquet.md) * [adbc\_pgsql](/1.1/datatypes-conversion/postgresql/adbc-parquet.md) * SAP HANA * [hana](/1.1/datatypes-conversion/saphana/parquet.md) * Teradata * [teradata](/1.1/datatypes-conversion/teradata/parquet.md) ## Integration[​](#integration "Direct link to Integration") * [Docker](/1.1/integration/docker-integration.md) * [Kestra](/1.1/integration/kestra-integration.md) * [Airflow](/1.1/integration/airflow-integration.md) * [PostgreSQL](/1.1/integration/postgresql-integration.md) ## Release Notes[​](#release-notes "Direct link to Release Notes") * [Release Notes 1.1](/1.1/release-notes/release-notes-1.1.md) * [Release Notes 1.0](/1.1/release-notes/release-notes-1.0.md) * [Release Notes 0.32](/1.1/release-notes/release-notes-0.32.md) ## [Sitemap](/1.1/sitemap.md)[​](#sitemap-1 "Direct link to sitemap-1") --- # FastBCP Command Wizard Expand All\[ ] ### PlatformWindows Windows ![Linux](/img/tux.svg)Linux ### Connection ParametersMS SQL Server Connection Type? : ADBC (High Performance) MS SQL Server (Arpe.io ADBC FastDriver) PostgreSQL (Arpe.io ADBC FastDriver) Standard Drivers ClickHouse MS SQL Server MySQL Netezza ODBC OLEDB Oracle (ODP) PostgreSQL (pgcopy) PostgreSQL (pgsql) SAP HANA Teradata | Provider? : | SQLOLEDB | | ------------------------ | ----------------------------- | | Server? : | mss-server,1433 | | Source Connect String? : | Server=myserver;Database=mydb | | DSN? : | MyDSN | | Trusted? : | \[ ] | | User? : | username | | Password? : | password | | Database? : | mydb | | Application Intent? : | ReadOnlyReadWrite | ### Source Query / Table ### Output Options ### Format Options ### Parquet Options ### Cloud Options ### Parallel Parameters ### Advanced Parameters ### License ### Generated Command Multi-line\[x] generate config sharecopy ``` ``` --- # Getting Started with FastBCP If you haven't installed FastBCP yet, please check the [Installation](/1.2/installation.md) section first. You can also build your first FastBCP command using our interactive [Command Builder Wizard](/latest/wizard.md). [FastBCP Tutorial](https://www.youtube.com/embed/Tpmc6NrTtuM) --- # FastBCP Agent Skill arpe.io publishes official agent skills in the [arpe-io/arpeio-skills](https://github.com/arpe-io/arpeio-skills) GitHub repository. The [`fastbcp`](https://github.com/arpe-io/arpeio-skills/tree/main/plugins/fastbcp/skills/fastbcp) skill teaches your AI agent how to build, explain and troubleshoot FastBCP commands: which parameters exist, which options fit together, which parallel method to choose, and which mistakes to avoid. The same repository also has skills for FastTransfer, MigratorXpress, LakeXpress and the arpe.io ADBC drivers. ## Claude Code[​](#claude-code "Direct link to Claude Code") Install the skill as a plugin from the arpe.io marketplace: ``` /plugin install fastbcp --marketplace arpe-io/arpeio-skills ``` Or in two steps: ``` /plugin marketplace add arpe-io/arpeio-skills /plugin install fastbcp@arpe-io ``` Then just ask, for example: *"Export dbo.Orders from SQL Server to Parquet on S3 with FastBCP, in parallel"*. To get the latest version of the skill later: ``` /plugin marketplace update arpe-io /plugin update fastbcp@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/fastbcp/skills/fastbcp / ``` For agents without skill support, paste the content of [`SKILL.md`](https://github.com/arpe-io/arpeio-skills/blob/main/plugins/fastbcp/skills/fastbcp/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 is maintained against the latest FastBCP release, so some options it suggests may not exist in FastBCP 1.2. If you run FastBCP 1.2, tell the agent so, and check its command against this documentation. ## Reporting issues[​](#reporting-issues "Direct link to Reporting issues") If the agent produces a wrong command, open an issue at [github.com/arpe-io/arpeio-skills/issues](https://github.com/arpe-io/arpeio-skills/issues) with the FastBCP version, the prompt you gave, and the command the agent produced (with passwords and licence text removed). --- # SQL Server (ADBC) → Parquet Datatypes conversion mapping when exporting from **SQL Server** using the ADBC connector (`--connectiontype adbc_mssql`) to **Parquet** format. Platform availability The ADBC FastDriver connectors (`adbc_mssql`, `adbc_pgsql`) are available on **Windows x64** and **Linux x64** only. They are **not** supported on **Linux ARM64**. info The ADBC connector does not map every type the way the standard [`mssql`](/1.2/datatypes-conversion/mssql/parquet.md) driver does. Compare both pages before switching. | | | | --------------- | ------------------------ | | **Source** | SQL Server (adbc\_mssql) | | **Format** | Parquet | | **FastBCP** | 1.2.0.0 | | **Test Status** | PARTIAL (30/31 Nullable) | Failed Types The following datatype is **not supported** with this connector: * `SQL_VARIANT` — export fails ## Parquet Schema: testdatatypes\_nullable[​](#parquet-schema-testdatatypes_nullable "Direct link to Parquet Schema: testdatatypes_nullable") | name | physical\_type | converted\_type | logical\_type | | --------------------- | ----------------------- | ----------------- | --------------------------------------------- | | col\_bigint | INT64 | — | — | | col\_int | INT32 | — | — | | col\_smallint | INT32 | INT\_16 | IntType(bitWidth=16, isSigned=1) | | col\_tinyint | INT32 | UINT\_8 | IntType(bitWidth=8, isSigned=0) | | col\_bit | BOOLEAN | — | — | | col\_decimal | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=2, precision=18) | | col\_numeric | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=2, precision=18) | | col\_money | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=4, precision=19) | | col\_smallmoney | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=4, precision=10) | | col\_float | DOUBLE | — | — | | col\_real | FLOAT | — | — | | col\_date | INT32 | DATE | DateType() | | col\_time | INT64 | — | TimeType(isAdjustedToUTC=0, unit=NANOS) | | col\_datetime | INT64 | TIMESTAMP\_MILLIS | TimestampType(isAdjustedToUTC=0, unit=MILLIS) | | col\_datetime2 | INT64 | — | TimestampType(isAdjustedToUTC=0, unit=NANOS) | | col\_datetimeoffset | INT64 | — | TimestampType(isAdjustedToUTC=1, unit=NANOS) | | col\_smalldatetime | INT64 | TIMESTAMP\_MILLIS | TimestampType(isAdjustedToUTC=0, unit=MILLIS) | | col\_char | BYTE\_ARRAY | UTF8 | StringType() | | col\_varchar | BYTE\_ARRAY | UTF8 | StringType() | | col\_nchar | BYTE\_ARRAY | UTF8 | StringType() | | col\_nvarchar | BYTE\_ARRAY | UTF8 | StringType() | | col\_text | BYTE\_ARRAY | UTF8 | StringType() | | col\_ntext | BYTE\_ARRAY | UTF8 | StringType() | | col\_binary | BYTE\_ARRAY | — | — | | col\_varbinary | BYTE\_ARRAY | — | — | | col\_image | BYTE\_ARRAY | — | — | | col\_uniqueidentifier | BYTE\_ARRAY | UTF8 | StringType() | | col\_xml | BYTE\_ARRAY | UTF8 | StringType() | | col\_geography | BYTE\_ARRAY | — | — | | col\_geometry | BYTE\_ARRAY | — | — | --- # SQL Server → Parquet Datatypes conversion mapping when exporting from **SQL Server** (`--connectiontype mssql`) to **Parquet** format. | | | | --------------- | ------------------ | | **Source** | SQL Server (mssql) | | **Format** | Parquet | | **FastBCP** | 1.2.0.0 | | **Test Status** | PASS (Nullable) | ## Parquet Schema: testdatatypes\_nullable[​](#parquet-schema-testdatatypes_nullable "Direct link to Parquet Schema: testdatatypes_nullable") | name | physical\_type | converted\_type | logical\_type | | --------------------- | ----------------------- | ----------------- | ---------------------------------------- | | col\_bigint | INT64 | INT\_64 | IntType(bitWidth=64, isSigned=1) | | col\_int | INT32 | INT\_32 | IntType(bitWidth=32, isSigned=1) | | col\_smallint | INT32 | INT\_16 | IntType(bitWidth=16, isSigned=1) | | col\_tinyint | INT32 | UINT\_8 | IntType(bitWidth=8, isSigned=0) | | col\_bit | BOOLEAN | — | — | | col\_decimal | INT64 | DECIMAL | DecimalType(scale=2, precision=18) | | col\_numeric | INT64 | DECIMAL | DecimalType(scale=2, precision=18) | | col\_money | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=4, precision=19) | | col\_smallmoney | INT64 | DECIMAL | DecimalType(scale=4, precision=10) | | col\_float | DOUBLE | — | — | | col\_real | FLOAT | — | — | | col\_date | INT32 | DATE | — | | col\_time | INT64 | — | TimeType(isAdjustedToUTC=0, unit=MICROS) | | col\_datetime | INT64 | TIMESTAMP\_MILLIS | — | | col\_datetime2 | INT64 | TIMESTAMP\_MILLIS | — | | col\_datetimeoffset | BYTE\_ARRAY | UTF8 | StringType() | | col\_smalldatetime | INT64 | TIMESTAMP\_MILLIS | — | | col\_char | BYTE\_ARRAY | UTF8 | StringType() | | col\_varchar | BYTE\_ARRAY | UTF8 | StringType() | | col\_nchar | BYTE\_ARRAY | UTF8 | StringType() | | col\_nvarchar | BYTE\_ARRAY | UTF8 | StringType() | | col\_text | BYTE\_ARRAY | UTF8 | StringType() | | col\_ntext | BYTE\_ARRAY | UTF8 | StringType() | | col\_binary | BYTE\_ARRAY | — | — | | col\_varbinary | BYTE\_ARRAY | — | — | | col\_image | BYTE\_ARRAY | — | — | | col\_uniqueidentifier | BYTE\_ARRAY | UTF8 | StringType() | | col\_xml | BYTE\_ARRAY | UTF8 | StringType() | | col\_sql\_variant | BYTE\_ARRAY | UTF8 | StringType() | | col\_geography | BYTE\_ARRAY | UTF8 | StringType() | | col\_geometry | BYTE\_ARRAY | UTF8 | StringType() | --- # MySQL → Parquet Datatypes conversion mapping when exporting from **MySQL** (`--connectiontype mysql`) to **Parquet** format. | | | | --------------- | --------------- | | **Source** | MySQL (mysql) | | **Format** | Parquet | | **FastBCP** | 1.2.0.0 | | **Test Status** | PASS (Nullable) | ## Parquet Schema: testdatatypes\_nullable[​](#parquet-schema-testdatatypes_nullable "Direct link to Parquet Schema: testdatatypes_nullable") | name | physical\_type | converted\_type | logical\_type | | --------------- | -------------- | ----------------- | ---------------------------------- | | col\_bigint | INT64 | INT\_64 | IntType(bitWidth=64, isSigned=1) | | col\_int | INT32 | INT\_32 | IntType(bitWidth=32, isSigned=1) | | col\_mediumint | INT32 | INT\_32 | IntType(bitWidth=32, isSigned=1) | | col\_smallint | INT32 | INT\_16 | IntType(bitWidth=16, isSigned=1) | | col\_tinyint | BYTE\_ARRAY | UTF8 | StringType() | | col\_bit | BYTE\_ARRAY | UTF8 | StringType() | | col\_decimal | INT64 | DECIMAL | DecimalType(scale=2, precision=18) | | col\_float | FLOAT | — | — | | col\_double | DOUBLE | — | — | | col\_date | INT64 | TIMESTAMP\_MILLIS | — | | col\_time | BYTE\_ARRAY | UTF8 | StringType() | | col\_datetime | INT64 | TIMESTAMP\_MILLIS | — | | col\_timestamp | INT64 | TIMESTAMP\_MILLIS | — | | col\_year | INT32 | INT\_32 | IntType(bitWidth=32, isSigned=1) | | col\_char | BYTE\_ARRAY | UTF8 | StringType() | | col\_varchar | BYTE\_ARRAY | UTF8 | StringType() | | col\_tinytext | BYTE\_ARRAY | UTF8 | StringType() | | col\_text | BYTE\_ARRAY | UTF8 | StringType() | | col\_mediumtext | BYTE\_ARRAY | UTF8 | StringType() | | col\_longtext | BYTE\_ARRAY | UTF8 | StringType() | | col\_binary | BYTE\_ARRAY | — | — | | col\_varbinary | BYTE\_ARRAY | — | — | | col\_tinyblob | BYTE\_ARRAY | — | — | | col\_blob | BYTE\_ARRAY | — | — | | col\_mediumblob | BYTE\_ARRAY | — | — | | col\_longblob | BYTE\_ARRAY | — | — | | col\_enum | BYTE\_ARRAY | UTF8 | StringType() | | col\_set | BYTE\_ARRAY | UTF8 | StringType() | | col\_json | BYTE\_ARRAY | UTF8 | StringType() | | col\_geometry | BYTE\_ARRAY | — | — | | col\_point | BYTE\_ARRAY | — | — | | col\_linestring | BYTE\_ARRAY | — | — | | col\_polygon | BYTE\_ARRAY | — | — | --- # Oracle (ADBC) → Parquet Datatypes conversion mapping when exporting from **Oracle** using the ADBC connector (`--connectiontype adbc_oracle`) to **Parquet** format. Platform availability The ADBC FastDriver connectors are available on **Windows x64** and **Linux x64** only. They are **not** supported on **Linux ARM64**. info The ADBC connector does not map every type the way the standard [`oraodp`](/1.2/datatypes-conversion/oracle/parquet.md) driver does. Compare both pages before switching. | | | | --------------- | ------------------------ | | **Source** | Oracle (adbc\_oracle) | | **Format** | Parquet | | **FastBCP** | 1.2.0.0 | | **Test Status** | PARTIAL (21/25 Nullable) | Failed Types The following datatypes are **not supported** with this connector: * `ROWID` — export fails * `UROWID` — export fails * `XMLTYPE` — export fails * `BFILE` — export fails ## Parquet Schema: testdatatypes\_nullable[​](#parquet-schema-testdatatypes_nullable "Direct link to Parquet Schema: testdatatypes_nullable") | name | physical\_type | converted\_type | logical\_type | | ------------------- | ----------------------- | ----------------- | --------------------------------------------- | | COL\_NUMBER | BYTE\_ARRAY | UTF8 | StringType() | | COL\_NUMBER10 | INT64 | — | — | | COL\_NUMBER18\_2 | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=2, precision=18) | | COL\_FLOAT | BYTE\_ARRAY | UTF8 | StringType() | | COL\_BINARY\_FLOAT | FLOAT | — | — | | COL\_BINARY\_DOUBLE | DOUBLE | — | — | | COL\_CHAR | BYTE\_ARRAY | UTF8 | StringType() | | COL\_VARCHAR2 | BYTE\_ARRAY | UTF8 | StringType() | | COL\_NCHAR | BYTE\_ARRAY | UTF8 | StringType() | | COL\_NVARCHAR2 | BYTE\_ARRAY | UTF8 | StringType() | | COL\_CLOB | BYTE\_ARRAY | UTF8 | StringType() | | COL\_NCLOB | BYTE\_ARRAY | UTF8 | StringType() | | COL\_BLOB | BYTE\_ARRAY | — | — | | COL\_RAW | BYTE\_ARRAY | — | — | | COL\_LONG\_RAW | BYTE\_ARRAY | — | — | | COL\_DATE | INT64 | TIMESTAMP\_MILLIS | TimestampType(isAdjustedToUTC=0, unit=MILLIS) | | COL\_TIMESTAMP | INT64 | TIMESTAMP\_MICROS | TimestampType(isAdjustedToUTC=0, unit=MICROS) | | COL\_TIMESTAMP\_TZ | INT64 | TIMESTAMP\_MICROS | TimestampType(isAdjustedToUTC=1, unit=MICROS) | | COL\_TIMESTAMP\_LTZ | INT64 | TIMESTAMP\_MICROS | TimestampType(isAdjustedToUTC=1, unit=MICROS) | | COL\_INTERVAL\_YM | INT64 | — | — | | COL\_INTERVAL\_DS | BYTE\_ARRAY | UTF8 | StringType() | --- # Oracle → Parquet Datatypes conversion mapping when exporting from **Oracle** (`--connectiontype oraodp`) to **Parquet** format. | | | | --------------- | --------------- | | **Source** | Oracle (oraodp) | | **Format** | Parquet | | **FastBCP** | 1.2.0.0 | | **Test Status** | PASS (Nullable) | ## Parquet Schema: testdatatypes\_nullable[​](#parquet-schema-testdatatypes_nullable "Direct link to Parquet Schema: testdatatypes_nullable") | name | physical\_type | converted\_type | logical\_type | | ------------------- | ----------------------- | ----------------- | ----------------------------------- | | COL\_NUMBER | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=18, precision=38) | | COL\_NUMBER10 | INT64 | INT\_64 | IntType(bitWidth=64, isSigned=1) | | COL\_NUMBER18\_2 | INT64 | DECIMAL | DecimalType(scale=2, precision=18) | | COL\_FLOAT | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=18, precision=38) | | COL\_BINARY\_FLOAT | FLOAT | — | — | | COL\_BINARY\_DOUBLE | DOUBLE | — | — | | COL\_CHAR | BYTE\_ARRAY | UTF8 | StringType() | | COL\_VARCHAR2 | BYTE\_ARRAY | UTF8 | StringType() | | COL\_NCHAR | BYTE\_ARRAY | UTF8 | StringType() | | COL\_NVARCHAR2 | BYTE\_ARRAY | UTF8 | StringType() | | COL\_CLOB | BYTE\_ARRAY | UTF8 | StringType() | | COL\_NCLOB | BYTE\_ARRAY | UTF8 | StringType() | | COL\_BLOB | BYTE\_ARRAY | — | — | | COL\_RAW | BYTE\_ARRAY | — | — | | COL\_LONG\_RAW | BYTE\_ARRAY | — | — | | COL\_DATE | INT64 | TIMESTAMP\_MILLIS | — | | COL\_TIMESTAMP | INT64 | TIMESTAMP\_MILLIS | — | | COL\_TIMESTAMP\_TZ | BYTE\_ARRAY | UTF8 | StringType() | | COL\_TIMESTAMP\_LTZ | INT64 | TIMESTAMP\_MILLIS | — | | COL\_INTERVAL\_YM | INT64 | INT\_64 | IntType(bitWidth=64, isSigned=1) | | COL\_INTERVAL\_DS | BYTE\_ARRAY | UTF8 | StringType() | | COL\_ROWID | BYTE\_ARRAY | UTF8 | StringType() | | COL\_UROWID | BYTE\_ARRAY | UTF8 | StringType() | | COL\_XMLTYPE | BYTE\_ARRAY | UTF8 | StringType() | | COL\_BFILE | BYTE\_ARRAY | — | — | --- # Datatypes Conversion When FastBCP exports a table, every native source column type is mapped to a type in the target output format. This section documents the **exact mappings** FastBCP produces. These pages are not a specification: each one is the Parquet schema read back from a real export of a test table covering all of the source's native datatypes. ## Supported Sources[​](#supported-sources "Direct link to Supported Sources") Sources are grouped by database system. A system can be read through several connection types (`--connectiontype`), and each one has its own page because the mappings it produces can differ — `pgcopy` produces exactly the same mappings as `pgsql`, while the ADBC connectors differ from their standard counterparts on several types. | Database | Connection Types | | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | SQL Server | [`mssql`](/1.2/datatypes-conversion/mssql/parquet.md) · [`adbc_mssql`](/1.2/datatypes-conversion/mssql/adbc-parquet.md) | | MySQL | [`mysql`](/1.2/datatypes-conversion/mysql/parquet.md) | | Oracle | [`oraodp`](/1.2/datatypes-conversion/oracle/parquet.md) · [`adbc_oracle`](/1.2/datatypes-conversion/oracle/adbc-parquet.md) | | PostgreSQL | [`pgsql`](/1.2/datatypes-conversion/postgresql/parquet.md) · [`pgcopy`](/1.2/datatypes-conversion/postgresql-copy/parquet.md) · [`adbc_pgsql`](/1.2/datatypes-conversion/postgresql/adbc-parquet.md) | | SAP HANA | [`hana`](/1.2/datatypes-conversion/saphana/parquet.md) | | Teradata | [`teradata`](/1.2/datatypes-conversion/teradata/parquet.md) | Parquet is the only output format documented here. ## How to Read a Page[​](#how-to-read-a-page "Direct link to How to Read a Page") Each page opens with a summary of the export it documents — source, output format, the FastBCP build used and the test status — followed by the Parquet schema produced from the **`testdatatypes_nullable`** table, in which every column accepts `NULL`. | Column | Description | | ------------------- | ------------------------------------------------------------------------------------------------------------------------- | | **name** | The column name in the source table | | **physical\_type** | The Parquet physical storage type: `BOOLEAN`, `INT32`, `INT64`, `FLOAT`, `DOUBLE`, `BYTE_ARRAY` or `FIXED_LEN_BYTE_ARRAY` | | **converted\_type** | The legacy Parquet annotation on top of it (`UTF8`, `DECIMAL`, `DATE`, `TIMESTAMP_MILLIS`, …) | | **logical\_type** | The modern Parquet annotation (`StringType()`, `DecimalType(scale=2, precision=18)`, `IntType(…)`, …) | A `—` means the column carries no annotation of that kind, so the physical type alone describes it. NOT NULL columns Declaring the source columns `NOT NULL` does not change the mapping. The only difference is the Parquet repetition level (REQUIRED instead of OPTIONAL), which these tables do not show. --- # PostgreSQL COPY → Parquet Datatypes conversion mapping when exporting from **PostgreSQL** using the COPY protocol (`--connectiontype pgcopy`) to **Parquet** format. info The COPY protocol variant produces the same type mappings as the standard PostgreSQL driver. See also [PostgreSQL (pgsql)](/1.2/datatypes-conversion/postgresql/parquet.md). | | | | --------------- | ------------------------ | | **Source** | PostgreSQL COPY (pgcopy) | | **Format** | Parquet | | **FastBCP** | 1.2.0.0 | | **Test Status** | PASS (Nullable) | ## Parquet Schema: testdatatypes\_nullable[​](#parquet-schema-testdatatypes_nullable "Direct link to Parquet Schema: testdatatypes_nullable") | name | physical\_type | converted\_type | logical\_type | | ---------------------- | ----------------------- | ----------------- | ---------------------------------------- | | col\_bigint | INT64 | INT\_64 | IntType(bitWidth=64, isSigned=1) | | col\_integer | INT32 | INT\_32 | IntType(bitWidth=32, isSigned=1) | | col\_smallint | INT32 | INT\_16 | IntType(bitWidth=16, isSigned=1) | | col\_boolean | BOOLEAN | — | — | | col\_numeric | INT64 | DECIMAL | DecimalType(scale=2, precision=18) | | col\_real | FLOAT | — | — | | col\_double\_precision | DOUBLE | — | — | | col\_money | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=4, precision=19) | | col\_date | INT32 | DATE | — | | col\_time | INT32 | TIME\_MILLIS | TimeType(isAdjustedToUTC=0, unit=MILLIS) | | col\_timestamp | INT64 | TIMESTAMP\_MILLIS | — | | col\_timestamptz | BYTE\_ARRAY | UTF8 | StringType() | | col\_interval | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | col\_char | BYTE\_ARRAY | UTF8 | StringType() | | col\_varchar | BYTE\_ARRAY | UTF8 | StringType() | | col\_text | BYTE\_ARRAY | UTF8 | StringType() | | col\_bytea | BYTE\_ARRAY | — | — | | col\_uuid | BYTE\_ARRAY | UTF8 | StringType() | | col\_json | BYTE\_ARRAY | UTF8 | StringType() | | col\_jsonb | BYTE\_ARRAY | — | — | | col\_xml | BYTE\_ARRAY | UTF8 | StringType() | | col\_inet | BYTE\_ARRAY | UTF8 | StringType() | | col\_cidr | BYTE\_ARRAY | UTF8 | StringType() | | col\_macaddr | BYTE\_ARRAY | UTF8 | StringType() | | col\_point | BYTE\_ARRAY | UTF8 | StringType() | | col\_line | BYTE\_ARRAY | UTF8 | StringType() | | col\_lseg | BYTE\_ARRAY | UTF8 | StringType() | | col\_box | BYTE\_ARRAY | UTF8 | StringType() | | col\_path | BYTE\_ARRAY | UTF8 | StringType() | | col\_polygon | BYTE\_ARRAY | UTF8 | StringType() | | col\_circle | BYTE\_ARRAY | UTF8 | StringType() | | col\_int4range | BYTE\_ARRAY | UTF8 | StringType() | | col\_int8range | BYTE\_ARRAY | UTF8 | StringType() | | col\_numrange | BYTE\_ARRAY | UTF8 | StringType() | | col\_tsrange | BYTE\_ARRAY | UTF8 | StringType() | | col\_tstzrange | BYTE\_ARRAY | UTF8 | StringType() | | col\_daterange | BYTE\_ARRAY | UTF8 | StringType() | | col\_bit | BYTE\_ARRAY | UTF8 | StringType() | | col\_bit\_varying | BYTE\_ARRAY | UTF8 | StringType() | | col\_oid | BYTE\_ARRAY | UTF8 | StringType() | | col\_int\_array | BYTE\_ARRAY | UTF8 | StringType() | --- # PostgreSQL (ADBC) → Parquet Datatypes conversion mapping when exporting from **PostgreSQL** using the ADBC connector (`--connectiontype adbc_pgsql`) to **Parquet** format. Platform availability The ADBC FastDriver connectors (`adbc_mssql`, `adbc_pgsql`) are available on **Windows x64** and **Linux x64** only. They are **not** supported on **Linux ARM64**. info The ADBC connector does not map every type the way the standard [`pgsql`](/1.2/datatypes-conversion/postgresql/parquet.md) driver does. Compare both pages before switching. | | | | --------------- | ------------------------ | | **Source** | PostgreSQL (adbc\_pgsql) | | **Format** | Parquet | | **FastBCP** | 1.2.0.0 | | **Test Status** | PARTIAL (40/41 Nullable) | Failed Types The following datatype is **not supported** with this connector: * `INTERVAL` — export fails ## Parquet Schema: testdatatypes\_nullable[​](#parquet-schema-testdatatypes_nullable "Direct link to Parquet Schema: testdatatypes_nullable") | name | physical\_type | converted\_type | logical\_type | | ---------------------- | ----------------------- | ----------------- | --------------------------------------------- | | col\_bigint | INT64 | — | — | | col\_integer | INT32 | — | — | | col\_smallint | INT32 | INT\_16 | IntType(bitWidth=16, isSigned=1) | | col\_boolean | BOOLEAN | — | — | | col\_numeric | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=2, precision=18) | | col\_real | FLOAT | — | — | | col\_double\_precision | DOUBLE | — | — | | col\_money | BYTE\_ARRAY | — | — | | col\_date | INT32 | DATE | DateType() | | col\_time | INT64 | — | TimeType(isAdjustedToUTC=0, unit=MICROS) | | col\_timestamp | INT64 | TIMESTAMP\_MICROS | TimestampType(isAdjustedToUTC=0, unit=MICROS) | | col\_timestamptz | INT64 | TIMESTAMP\_MICROS | TimestampType(isAdjustedToUTC=1, unit=MICROS) | | col\_char | BYTE\_ARRAY | UTF8 | StringType() | | col\_varchar | BYTE\_ARRAY | UTF8 | StringType() | | col\_text | BYTE\_ARRAY | UTF8 | StringType() | | col\_bytea | BYTE\_ARRAY | — | — | | col\_uuid | BYTE\_ARRAY | UTF8 | StringType() | | col\_json | BYTE\_ARRAY | UTF8 | StringType() | | col\_jsonb | BYTE\_ARRAY | UTF8 | StringType() | | col\_xml | BYTE\_ARRAY | UTF8 | StringType() | | col\_inet | BYTE\_ARRAY | UTF8 | StringType() | | col\_cidr | BYTE\_ARRAY | UTF8 | StringType() | | col\_macaddr | BYTE\_ARRAY | UTF8 | StringType() | | col\_point | BYTE\_ARRAY | — | — | | col\_line | BYTE\_ARRAY | — | — | | col\_lseg | BYTE\_ARRAY | — | — | | col\_box | BYTE\_ARRAY | — | — | | col\_path | BYTE\_ARRAY | — | — | | col\_polygon | BYTE\_ARRAY | — | — | | col\_circle | BYTE\_ARRAY | — | — | | col\_int4range | BYTE\_ARRAY | — | — | | col\_int8range | BYTE\_ARRAY | — | — | | col\_numrange | BYTE\_ARRAY | — | — | | col\_tsrange | BYTE\_ARRAY | — | — | | col\_tstzrange | BYTE\_ARRAY | — | — | | col\_daterange | BYTE\_ARRAY | — | — | | col\_bit | BYTE\_ARRAY | UTF8 | StringType() | | col\_bit\_varying | BYTE\_ARRAY | UTF8 | StringType() | | col\_oid | INT32 | — | — | | col\_int\_array | BYTE\_ARRAY | — | — | --- # PostgreSQL → Parquet Datatypes conversion mapping when exporting from **PostgreSQL** (`--connectiontype pgsql`) to **Parquet** format. info [PostgreSQL COPY](/1.2/datatypes-conversion/postgresql-copy/parquet.md) (`--connectiontype pgcopy`) produces identical type mappings. The [ADBC connector](/1.2/datatypes-conversion/postgresql/adbc-parquet.md) (`--connectiontype adbc_pgsql`) does not. | | | | --------------- | ------------------ | | **Source** | PostgreSQL (pgsql) | | **Format** | Parquet | | **FastBCP** | 1.2.0.0 | | **Test Status** | PASS (Nullable) | ## Parquet Schema: testdatatypes\_nullable[​](#parquet-schema-testdatatypes_nullable "Direct link to Parquet Schema: testdatatypes_nullable") | name | physical\_type | converted\_type | logical\_type | | ---------------------- | ----------------------- | ----------------- | ---------------------------------------- | | col\_bigint | INT64 | INT\_64 | IntType(bitWidth=64, isSigned=1) | | col\_integer | INT32 | INT\_32 | IntType(bitWidth=32, isSigned=1) | | col\_smallint | INT32 | INT\_16 | IntType(bitWidth=16, isSigned=1) | | col\_boolean | BOOLEAN | — | — | | col\_numeric | INT64 | DECIMAL | DecimalType(scale=2, precision=18) | | col\_real | FLOAT | — | — | | col\_double\_precision | DOUBLE | — | — | | col\_money | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=4, precision=19) | | col\_date | INT32 | DATE | — | | col\_time | INT32 | TIME\_MILLIS | TimeType(isAdjustedToUTC=0, unit=MILLIS) | | col\_timestamp | INT64 | TIMESTAMP\_MILLIS | — | | col\_timestamptz | BYTE\_ARRAY | UTF8 | StringType() | | col\_interval | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | col\_char | BYTE\_ARRAY | UTF8 | StringType() | | col\_varchar | BYTE\_ARRAY | UTF8 | StringType() | | col\_text | BYTE\_ARRAY | UTF8 | StringType() | | col\_bytea | BYTE\_ARRAY | — | — | | col\_uuid | BYTE\_ARRAY | UTF8 | StringType() | | col\_json | BYTE\_ARRAY | UTF8 | StringType() | | col\_jsonb | BYTE\_ARRAY | — | — | | col\_xml | BYTE\_ARRAY | UTF8 | StringType() | | col\_inet | BYTE\_ARRAY | UTF8 | StringType() | | col\_cidr | BYTE\_ARRAY | UTF8 | StringType() | | col\_macaddr | BYTE\_ARRAY | UTF8 | StringType() | | col\_point | BYTE\_ARRAY | UTF8 | StringType() | | col\_line | BYTE\_ARRAY | UTF8 | StringType() | | col\_lseg | BYTE\_ARRAY | UTF8 | StringType() | | col\_box | BYTE\_ARRAY | UTF8 | StringType() | | col\_path | BYTE\_ARRAY | UTF8 | StringType() | | col\_polygon | BYTE\_ARRAY | UTF8 | StringType() | | col\_circle | BYTE\_ARRAY | UTF8 | StringType() | | col\_int4range | BYTE\_ARRAY | UTF8 | StringType() | | col\_int8range | BYTE\_ARRAY | UTF8 | StringType() | | col\_numrange | BYTE\_ARRAY | UTF8 | StringType() | | col\_tsrange | BYTE\_ARRAY | UTF8 | StringType() | | col\_tstzrange | BYTE\_ARRAY | UTF8 | StringType() | | col\_daterange | BYTE\_ARRAY | UTF8 | StringType() | | col\_bit | BYTE\_ARRAY | UTF8 | StringType() | | col\_bit\_varying | BYTE\_ARRAY | UTF8 | StringType() | | col\_oid | BYTE\_ARRAY | UTF8 | StringType() | | col\_int\_array | BYTE\_ARRAY | UTF8 | StringType() | --- # SAP HANA → Parquet Datatypes conversion mapping when exporting from **SAP HANA** (`--connectiontype hana`) to **Parquet** format. | | | | --------------- | --------------- | | **Source** | SAP HANA (hana) | | **Format** | Parquet | | **FastBCP** | 1.2.0.0 | | **Test Status** | PASS (Nullable) | ## Parquet Schema: testdatatypes\_nullable[​](#parquet-schema-testdatatypes_nullable "Direct link to Parquet Schema: testdatatypes_nullable") | name | physical\_type | converted\_type | logical\_type | | ----------------- | -------------- | ----------------- | ---------------------------------- | | COL\_TINYINT | INT32 | UINT\_8 | IntType(bitWidth=8, isSigned=0) | | COL\_SMALLINT | INT32 | INT\_16 | IntType(bitWidth=16, isSigned=1) | | COL\_INTEGER | INT32 | INT\_32 | IntType(bitWidth=32, isSigned=1) | | COL\_BIGINT | INT64 | INT\_64 | IntType(bitWidth=64, isSigned=1) | | COL\_DECIMAL | INT64 | DECIMAL | DecimalType(scale=2, precision=18) | | COL\_SMALLDECIMAL | INT64 | DECIMAL | DecimalType(scale=0, precision=16) | | COL\_REAL | FLOAT | — | — | | COL\_DOUBLE | DOUBLE | — | — | | COL\_FLOAT | DOUBLE | — | — | | COL\_BOOLEAN | BOOLEAN | — | — | | COL\_DATE | INT64 | TIMESTAMP\_MILLIS | — | | COL\_TIME | BYTE\_ARRAY | UTF8 | StringType() | | COL\_TIMESTAMP | INT64 | TIMESTAMP\_MILLIS | — | | COL\_SECONDDATE | INT64 | TIMESTAMP\_MILLIS | — | | COL\_CHAR | BYTE\_ARRAY | UTF8 | StringType() | | COL\_VARCHAR | BYTE\_ARRAY | UTF8 | StringType() | | COL\_NCHAR | BYTE\_ARRAY | UTF8 | StringType() | | COL\_NVARCHAR | BYTE\_ARRAY | UTF8 | StringType() | | COL\_ALPHANUM | BYTE\_ARRAY | UTF8 | StringType() | | COL\_CLOB | BYTE\_ARRAY | UTF8 | StringType() | | COL\_NCLOB | BYTE\_ARRAY | UTF8 | StringType() | | COL\_BLOB | BYTE\_ARRAY | — | — | | COL\_BINARY | BYTE\_ARRAY | — | — | | COL\_VARBINARY | BYTE\_ARRAY | — | — | | COL\_ST\_GEOMETRY | BYTE\_ARRAY | — | — | | COL\_ST\_POINT | BYTE\_ARRAY | — | — | | COL\_SHORTTEXT | BYTE\_ARRAY | UTF8 | StringType() | --- # Teradata → Parquet Datatypes conversion mapping when exporting from **Teradata** (`--connectiontype teradata`) to **Parquet** format. | | | | --------------- | ------------------- | | **Source** | Teradata (teradata) | | **Format** | Parquet | | **FastBCP** | 1.2.0.0 | | **Test Status** | PASS (Nullable) | ## Parquet Schema: testdatatypes\_nullable[​](#parquet-schema-testdatatypes_nullable "Direct link to Parquet Schema: testdatatypes_nullable") | name | physical\_type | converted\_type | logical\_type | | ------------------------ | ----------------------- | ----------------- | ---------------------------------------- | | col\_byteint | INT32 | INT\_16 | IntType(bitWidth=16, isSigned=1) | | col\_smallint | INT32 | INT\_16 | IntType(bitWidth=16, isSigned=1) | | col\_integer | INT32 | INT\_32 | IntType(bitWidth=32, isSigned=1) | | col\_bigint | INT64 | INT\_64 | IntType(bitWidth=64, isSigned=1) | | col\_decimal18\_2 | INT64 | DECIMAL | DecimalType(scale=2, precision=18) | | col\_float | DOUBLE | — | — | | col\_number | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=18, precision=38) | | col\_number18\_2 | INT64 | DECIMAL | DecimalType(scale=2, precision=18) | | col\_date | INT32 | DATE | — | | col\_time | INT64 | — | TimeType(isAdjustedToUTC=0, unit=MICROS) | | col\_timestamp | INT64 | TIMESTAMP\_MILLIS | — | | col\_timestamp\_tz | BYTE\_ARRAY | UTF8 | StringType() | | tdintervalyear | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | tdintervalyeartomonth | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | tdintervalmonth | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | tdintervalday | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | tdintervaldaytohour | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | tdintervaldaytominute | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | tdintervaldaytosecond | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | tdintervalhour | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | tdintervalhourtominute | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | tdintervalhourtosecond | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | tdintervalminute | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | tdintervalminutetosecond | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | tdintervalsecond | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | col\_real | DOUBLE | — | — | | col\_double\_precision | DOUBLE | — | — | | col\_char | BYTE\_ARRAY | UTF8 | StringType() | | col\_varchar | BYTE\_ARRAY | UTF8 | StringType() | | col\_clob | BYTE\_ARRAY | UTF8 | StringType() | | col\_byte | BYTE\_ARRAY | — | — | | col\_varbyte | BYTE\_ARRAY | — | — | | col\_blob | BYTE\_ARRAY | — | — | | col\_period\_date | BYTE\_ARRAY | UTF8 | StringType() | | col\_period\_timestamp | BYTE\_ARRAY | UTF8 | StringType() | | col\_json | BYTE\_ARRAY | UTF8 | StringType() | | col\_xml | BYTE\_ARRAY | UTF8 | StringType() | | col\_st\_geometry | BYTE\_ARRAY | UTF8 | StringType() | --- # Advanced Parameters This section covers advanced configuration options for FastBCP. ## Run ID[​](#run-id "Direct link to Run ID") The Run ID parameter `--runid` is a unique identifier for the current export operation. It can be used for tracking, logging, and monitoring purposes. Information If not specified, FastBCP will generate a unique Run ID automatically. Tips If possible, inject the RunId provided by the caller (e.g., SSIS, Airflow, or any scheduler that supports a run identifier). This will greatly facilitate log correlation and troubleshooting. ``` ./FastBCP \ ... --runid "export-2024-01-09-001" \ ... ``` **Syntax:** * Long form only: `--runid ""` ## Log Level[​](#log-level "Direct link to Log Level") The Log Level parameter `--loglevel` controls the verbosity of logging output during export operations. **Available values:** * `Information` (default): Standard logging with key operation details * `Debug`: Verbose logging with detailed diagnostic information ``` ./FastBCP \ ... --loglevel "Debug" \ ... ``` **Syntax:** * Long form only: `--loglevel ""` note If a settings file is specified with `--settingsfile`, the log level defined in the settings file takes precedence unless overridden by the command-line parameter. Information See [Logging Overview](/1.2/documentation/logging/Overview.md) for detailed information about logging configuration and output. ## Settings File[​](#settings-file "Direct link to Settings File") The Settings File parameter `--settingsfile` allows you to store all FastBCP parameters in a configuration file, making it easier to manage complex exports and reuse configurations. ``` ./FastBCP \ ... --settingsfile "/path/to/config/export-config.json" \ ... ``` **Syntax:** * Long form only: `--settingsfile ""` Information See [Logging Overview](/1.2/documentation/logging/Overview.md) for examples of settings file configuration. ## Config File[​](#config-file "Direct link to Config File") The Config File parameter `--config` allows you to define all FastBCP parameters in a YAML configuration file. This provides a more structured and readable way to manage export configurations compared to JSON settings files. * Windows * Linux ``` .\FastBCP.exe --config samples\sample_mssql_to_csv.yaml ``` ``` ./FastBCP --config samples/sample_mssql_to_csv.yaml ``` **Syntax:** * Long form only: `--config ""` ### YAML Configuration Example[​](#yaml-configuration-example "Direct link to YAML Configuration Example") Here's a complete example of a YAML configuration file: ``` # FastBCP – MSSQL to CSV using RangeId parallel method # # Usage: # .\FastBCP.exe --config samples\sample_mssql_to_csv.yaml connection: type: mssql server: localhost database: tpch10_collation_bin2 trusted: true source: schema: dbo table: orders output: file: "mssql_orders_{startdate}.csv" directory: 'D:\temp\{database}\{schema}\{table}\full\' delimiter: "|" decimal_separator: "." date_format: "yyyy-MM-dd HH:mm:ss" encoding: UTF-8 performance: method: RangeId degree: -2 distribute_key_column: o_orderkey merge: false logging: run_id: mssql_to_csv_parallel-2_rangeid ``` Benefits of YAML Configuration * **Structured and readable**: YAML format is more human-friendly than JSON * **Comments support**: Add documentation directly in your configuration files * **Reusable configurations**: Version control your export settings * **Simplified command-line**: Reduce complex exports to a single `--config` parameter ## Traceparent[​](#traceparent "Direct link to Traceparent") The `--traceparent` parameter accepts a [W3C Trace Context](https://www.w3.org/TR/trace-context/) traceparent identifier from an external caller. This enables distributed trace correlation between FastBCP and upstream systems such as orchestrators, APIs, or CI/CD pipelines. Information See [OpenTelemetry](/1.2/documentation/logging/OpenTelemetry.md) for detailed information about configuring OpenTelemetry tracing and log export. ``` ./FastBCP \ ... --traceparent "00-abcdef1234567890abcdef1234567890-1234567890abcdef-01" \ ... ``` **Syntax:** * Long form only: `--traceparent ""` ## No Banner[​](#no-banner "Direct link to No Banner") Disable the FastBCP banner display in the command line output. This is useful for scripting or when you want cleaner output in automated processes. **Example:** ``` ./FastBCP \ ... --nobanner \ ... ``` **Syntax:** * Long form: `--nobanner` Clean Output Using `--nobanner` is recommended when running FastBCP 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 ``` .\FastBCP.exe ` --connectiontype "oraodp" ` --server "localhost:1521/OraService" ` --database "tpch" ` --user "FastUser" ` --password "FastPassword" ` --sourceschema "TPCH" ` --sourcetable "ORDERS" ` --directory "D:\temp" ` --fileoutput "orders.xlsx" ` --encoding "UTF-8" ` --parallelmethod RowId ` --paralleldegree 7 ` --merge false ` --loglevel "Debug" ` --runid "oracle_to_excel_parallel_rowid" ` --settingsfile "C:\config\oracle-export.json" ` --nobanner ``` ``` ./FastBCP \ --connectiontype "oraodp" \ --server "localhost:1521/OraService" \ --database "tpch" \ --user "FastUser" \ --password "FastPassword" \ --sourceschema "TPCH" \ --sourcetable "ORDERS" \ --directory "/temp" \ --fileoutput "orders.xlsx" \ --encoding "UTF-8" \ --parallelmethod RowId \ --paralleldegree 7 \ --merge false \ --loglevel "Debug" \ --runid "oracle_to_excel_parallel_rowid" \ --settingsfile "/config/oracle-export.json" \ --nobanner ``` This example: * Connects to an Oracle database using the RowId parallel method * Exports ORDERS table to Excel format with UTF-8 encoding * Uses 7 parallel threads with separate files (merge=false) * Enables Debug logging for detailed diagnostics * Uses a custom Run ID for tracking * Loads additional configuration from a settings file * Disables the banner for cleaner output --- # Authentication FastBCP supports two types of authentication methods depending on your database platform. ## Authentication Methods[​](#authentication-methods "Direct link to Authentication Methods") ### 1. Trusted Connection[​](#1-trusted-connection "Direct link to 1. Trusted Connection") Uses the current Windows user's credentials or the operating system authentication if allowed by the RDBMS. ``` .\FastBCP.exe ` ... --trusted ` ... ``` **Syntax:** * Short form: `-A` * Long form: `--trusted` Warning This method is only available if your RDBMS supports trusted/integrated authentication (e.g., SQL Server with Windows Authentication). ### 2. SQL Login with Username and Password[​](#2-sql-login-with-username-and-password "Direct link to 2. SQL Login with Username and Password") Standard database authentication with explicit credentials. ``` ./FastBCP ` ... --user "myuser" ` --password "mypassword" ` ... ``` **Syntax:** * Username: `-U "username"` or `--user "username"` * Password: `-X "password"` or `--password "password"` ### Alternative: Connection String Parameter[​](#alternative-connection-string-parameter "Direct link to Alternative: Connection String Parameter") You can also use the `--sourceconnectstring` parameter where you pass the user and password directly in the connection string. This parameter will be covered in detail in the [Connection Parameters](/1.2/documentation/cli/connection_parameters.md#source-connection-string) section. Password Security in Logs All passwords passed either through the `--password` parameter or within the `--sourceconnectstring` parameter 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 FASTBCP\_USER and FASTBCP\_PASSWORD for exemple or store the password in an encrypted file. Up to you to decrypt the file and it’s content before using it in a shell variable that will be used with FastBCP. --- # Cloud Options FastBCP supports direct exports to cloud storage platforms: AWS S3, Azure Blob Storage, Azure Data Lake Gen2, and Google Cloud Storage. For detailed cloud authentication setup and configuration, see the [Cloud Connectivity](/1.2/documentation/cloud-connectivity/overview.md) documentation. note FastBCP will use multi-part uploads for all cloud provider Warning Since FastBCP 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**. ## Supported Cloud Platforms[​](#supported-cloud-platforms "Direct link to Supported Cloud Platforms") To export data to a cloud storage service, use the URI scheme specific to your target destination with the `--directory` value | Platform | URI Scheme | Example | | ------------------------ | ------------ | ----------------------------------------------------------- | | **AWS S3** | `s3://` | `s3://my-bucket/data/` | | **Azure Blob** | `abs://` | `abs://myaccount.blob.core.windows.net/mycontainer/mydir/` | | **Azure Data Lake Gen2** | `abfss://` | `abfss://myaccount.dfs.core.windows.net/mycontainer/mydir/` | | **Google Cloud Storage** | `gs://` | `gs://my-bucket/data/` | | **S3-Compatible** | `s3://` | `s3://mybucket/export/` (MinIO, OVH, etc.) | | **OneLake** | `onelake://` | `onelake://MyWorSpace/MyLakeHouse/MyDir/` | ## Cloud Profile[​](#cloud-profile "Direct link to Cloud Profile") You can use the `--cloudprofile` parameter to specify which cloud credentials profile to use. ``` ./FastBCP \ ... --directory "s3://my-bucket/exports" \ --fileoutput "orders.parquet" \ --cloudprofile "production" \ ... ``` **Syntax:** * Long form: `--cloudprofile ` --- # Connection Parameters FastBCP requires connection information to access your database. This page covers all connection-related parameters. ## Connection Type[​](#connection-type "Direct link to Connection Type") Specify the type of database connection driver to use. This parameter determines how FastBCP connects to your database. ``` ./FastBCP \ ... --connectiontype mssql \ ... ``` **Syntax:** * Short form: `-C "connection_type"` * Long form: `--connectiontype "connection_type"` **Available Connection Types:** | Connection Type | Description | | --------------- | --------------------------------------------------------------------------------------- | | `adbc_mssql` | Microsoft SQL Server via ADBC (Arpe.io ADBC FastDriver) - 2x faster for Parquet exports | | `adbc_pgsql` | PostgreSQL via ADBC (Arpe.io ADBC FastDriver) - ultra-fast Parquet exports | | `adbc_oracle` | Oracle via ADBC (Arpe.io ADBC FastDriver) - ultra-fast Parquet exports | | `clickhouse` | ClickHouse database | | `hana` | SAP HANA database | | `mssql` | Microsoft SQL Server (default) | | `mysql` | MySQL/MariaDB database | | `nzsql` | IBM Netezza | | `odbc` | Generic ODBC connection | | `oledb` | Generic OLE DB connection | | `oraodp` | Oracle Data Provider | | `pgcopy` | PostgreSQL with COPY protocol | | `pgsql` | PostgreSQL standard connection | | `teradata` | Teradata database | Platform availability The ADBC FastDriver connectors (`adbc_mssql`, `adbc_pgsql`, `adbc_oracle`) are available on **Windows x64** and **Linux x64** only. They are **not** supported on **Linux ARM64**. Parquet-only output ADBC connectors (`adbc_mssql`, `adbc_pgsql`, `adbc_oracle`) only support exporting to **Parquet** format. No other output format is supported with these connection types. ## DSN (Data Source Name)[​](#dsn-data-source-name "Direct link to DSN (Data Source Name)") If you have chosen an ODBC connection type, you must define the DSN with the `-N` or `--dsn` parameter, or alternatively define a connection string using `-g` or `--sourceconnectstring`. ``` ./FastBCP \ ... --connectiontype odbc \ --dsn "MyODBCDataSource" \ ... ``` **Syntax:** * Short form: `-N "DSN_name"` * Long form: `--dsn "DSN_name"` ## Provider[​](#provider "Direct link to Provider") If you have chosen an OLEDB connection type, you must define the OLEDB provider with the `-P` or `--provider` parameter. ``` ./FastBCP \ ... --connectiontype oledb \ --provider MSOLEDBSQL \ ... ``` ``` ./FastBCP \ ... --connectiontype oledb \ --provider NZOLEDB \ ... ``` **Syntax:** * Short form: `-P "provider_name"` * Long form: `--provider "provider_name"` ## Server[​](#server "Direct link to Server") Except if you have defined a connection string (`-g` or `--sourceconnectstring`), you must define a server (or could also be a TNS entry for Oracle). **Syntax:** * Short form: `-S "server"` * Long form: `--server "server"` ### Server Format Examples[​](#server-format-examples "Direct link to Server Format Examples") The server parameter accepts different formats depending on your database: **IP address or DNS name:** ``` ./FastBCP \ ... --server "myserver.mydomain.com" \ ... ``` **IP address or DNS name with port number:** ``` ./FastBCP \ ... --server "myserver.mydomain.com:2433" \ ... ``` or ``` ./FastBCP \ ... --server "myserver.mydomain.com,2433" \ ... ``` **IP address or DNS name with named instance:** ``` ./FastBCP \ ... --server "myserver.mydomain.com\myinstance" \ ... ``` **For Oracle - Easy Connect string:** ``` ./FastBCP \ ... --server "myserver.mydomain.com:1521/myinstance" \ ... ``` ## Trusted or User & Password[​](#trusted-or-user--password "Direct link to Trusted or User & Password") ### Trusted[​](#trusted "Direct link to Trusted") You can used a trusted (Windows or Kerberos Authentication) using the `--trusted` switch parameter. ``` ./FastBCP \ ... --server "myserver.mydomain.com\myinstance \ --trusted \ --database MySourceDB" \ ... ``` ### User and Password[​](#user-and-password "Direct link to User and Password") You can also provide a user and password the `--user` and `--password` can be used like this ``` ./FastBCP \ ... --server "myserver.mydomain.com\myinstance \ --user "FastUser" \ --password "FastPassword" \ --database MySourceDB" \ ... ``` ## 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 database. This connection string will override any other connection parameters and can be used if the other authentication mode are not enougth for your case You can use the connection string for any connection type. The connection string must be enclosed in double quotes. **Example:** ``` ./FastBCP \ ... --sourceconnectstring "Server=myserver;Database=mydb;User ID=FastUser;Password=FastPassword;Encrypt=True;TrustServerCertificate=True" ... ``` **Syntax:** * Short form: `-g "connection_string"` * Long form: `--sourceconnectstring "connection_string"` ## Database[​](#database "Direct link to Database") Optionally define a source database. **Example:** ``` ./FastBCP \ ... --database "AdventureWorks" \ ... ``` **Syntax:** * Short form: `-I "database_name"` * Long form: `--database "database_name"` ## Application Intent[​](#application-intent "Direct link to Application Intent") Specifies the application workload type when connecting to SQL Server. This parameter is only applicable for SQL Server (`mssql`) and OLEDB (`oledb`) connection types. **Syntax:** * Long form: `--applicationintent "ReadOnly|ReadWrite"` **Values:** * `ReadOnly` (default) - Declares the read-only workload type when connecting to a read-only replica in an Always On availability group * `ReadWrite` - Declares a read-write workload type (standard connection) **Example (Read-Only):** ``` ./FastBCP \ --connectiontype mssql \ --server "myserver.mydomain.com" \ --applicationintent ReadOnly \ --database "AdventureWorks" \ ... ``` **Example (Read-Write):** ``` ./FastBCP \ --connectiontype mssql \ --server "myserver.mydomain.com" \ --applicationintent ReadWrite \ --database "AdventureWorks" \ ... ``` info When using `ReadOnly`, the connection will be routed to a read-only replica if available in an Always On availability group configuration. This is useful for offloading reporting and export workloads from the primary replica. --- # CSV Formatting When exporting to CSV format (`.csv` extension), FastBCP provides extensive formatting options. ## Delimiter[​](#delimiter "Direct link to Delimiter") Use the `-d` or `--delimiter` parameter to specify the character(s) used to separate fields. ``` ./FastBCP \ ... --fileoutput "data.csv" \ --delimiter "," \ ... ``` **Syntax:** * Short form: `-d "delimiter"` * Long form: `--delimiter "delimiter"` **Default:** `,` (comma) ### Common Delimiters[​](#common-delimiters "Direct link to Common Delimiters") * Comma (CSV) * Tab (TSV) * Pipe * Semicolon ``` --delimiter "," ``` ``` --delimiter "\t" ``` ``` --delimiter "|" ``` ``` --delimiter ";" ``` ## Use Quotes[​](#use-quotes "Direct link to Use Quotes") Use the `-t` or `--quotes` switch to enclose string fields in double quotes. ``` ./FastBCP \ ... --fileoutput "products.csv" \ --quotes \ ... ``` **Syntax:** * Short form: `-t` * Long form: `--quotes` **Default:** Without quotes * Without --quotes * With --quotes ``` ProductID,ProductName,Description,Price 1,Widget A,Small widget,19.99 2,Widget B,Large widget,29.99 ``` ``` "ProductID","ProductName","Description","Price" "1","Widget A","Small widget","19.99" "2","Widget B","Large widget","29.99" ``` Information When `--quotes`, any double quotes (`"`) in the data are escaped with backslash (`\"`). ## Date Format[​](#date-format "Direct link to Date Format") Use the `-f` or `--dateformat` parameter to specify how dates and timestamps are formatted. ``` ./FastBCP \ ... --fileoutput "orders.csv" --dateformat "yyyy-MM-dd HH:mm:ss" \ ... ``` **Syntax:** * Short form: `-f "format"` * Long form: `--dateformat "format"` **Default:** `yyyy-MM-dd HH:mm:sszzz` Auto-adaptive formatting The date format is auto-adaptive based on the column type: * **Date-only** columns will always output as `yyyy-MM-dd` regardless of the format string * **Timestamp/DateTime** columns will output as `yyyy-MM-dd HH:mm:ss` even if a timezone token (`zzz`) is present in the format string * **DateTimeOffset** columns will include the timezone offset as specified ### Format Codes[​](#format-codes "Direct link to Format Codes") | Code | Description | Example | | ------ | ---------------- | -------- | | `yyyy` | 4-digit year | `2026` | | `MM` | Month (01-12) | `01` | | `dd` | Day (01-31) | `07` | | `HH` | Hour 24h (00-23) | `14` | | `mm` | Minute (00-59) | `30` | | `ss` | Second (00-59) | `22` | | `zzz` | UTC offset | `+02:00` | ## Decimal Separator[​](#decimal-separator "Direct link to Decimal Separator") Use the `-n` or `--decimalseparator` parameter to specify the decimal separator for numeric values. ``` ./FastBCP \ ... --fileoutput "products.csv" --decimalseparator "," ... ``` **Syntax:** * Short form: `-n "separator"` * Long form: `--decimalseparator "separator"` **Default:** `.` (period/dot) ## No Header[​](#no-header "Direct link to No Header") Use the `-h` or `--noheader` parameter to exclude column headers from the output. ``` ./FastBCP \ ... --fileoutput "customers.csv" \ --noheader \ ... ``` **Syntax:** * Short form: `-h` * Long form: `--noheader` - Without --noheader (default) - With --noheader ``` CustomerID,CustomerName,Email 1,John Doe,john@example.com 2,Jane Smith,jane@example.com ``` ``` 1,John Doe,john@example.com 2,Jane Smith,jane@example.com ``` ## Boolean Format[​](#boolean-format "Direct link to Boolean Format") Use the `-b` or `--boolformat` parameter to specify how boolean values are represented. ``` ./FastBCP \ ... --fileoutput "products.csv" \ --boolformat "1/0" \ ... ``` **Syntax:** * Short form: `-b "format"` * Long form: `--boolformat "format"` **Default:** `True/False` **Options:** * `true/false` * `True/False` (default) * `t/f` * `1/0` * `yes/no` * `y/n` **With `--boolformat "true/false"` (default):** ``` ProductID,ProductName,InStock,Discontinued 1,Widget A,true,false 2,Widget B,false,true ``` **With `--boolformat "1/0"`:** ``` ProductID,ProductName,InStock,Discontinued 1,Widget A,1,0 2,Widget B,0,1 ``` **With `--boolformat "yes/no"`:** ``` ProductID,ProductName,InStock,Discontinued 1,Widget A,yes,no 2,Widget B,no,yes ``` ## Complete Example[​](#complete-example "Direct link to Complete Example") * Windows * Linux ``` .\FastBCP.exe ` --connectiontype mssql ` --server "localhost" ` --database "AdventureWorks" ` --trusted ` --query "SELECT OrderID, OrderDate, CustomerName, TotalAmount, IsShipped FROM Sales.Orders WHERE OrderDate >= '2024-01-01'" ` --directory "C:\exports\sales" ` --fileoutput "orders_{startdate}.csv" ` --delimiter "," ` --quotes ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --decimalseparator "." ` --boolformat "1/0" ` --encoding "UTF-8" ``` ``` ./FastBCP \ --connectiontype mssql \ --server "localhost" \ --database "AdventureWorks" \ --trusted \ --query "SELECT OrderID, OrderDate, CustomerName, TotalAmount, IsShipped FROM Sales.Orders WHERE OrderDate >= '2024-01-01'" \ --directory "/exports/sales" \ --fileoutput "orders_{startdate}.csv" \ --delimiter "," \ --quotes \ --dateformat "yyyy-MM-dd HH:mm:ss" \ --decimalseparator "." \ --boolformat "1/0" \ --encoding "UTF-8" ``` **Output (orders\_20260107.csv):** ``` "OrderID","OrderDate","CustomerName","TotalAmount","IsShipped" "1001","2026-01-05 10:30:00","John Doe","299.99","1" "1002","2026-01-05 11:15:00","Jane Smith","149.50","0" "1003","2026-01-06 09:20:00","Bob Johnson","599.00","1" ``` tip For Excel compatibility, use `.xlsx` format instead: `--fileoutput "data.xlsx"` --- # License Configure how FastBCP 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 FastBCP license. By default, FastBCP will try to use the license file named `FastBCP.lic` in the same directory as the FastBCP executable. You can specify a custom license file using the `--license` parameter. ### License Sources[​](#license-sources "Direct link to License Sources") FastBCP 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 ``` .\FastBCP.exe ` ... --license "C:\licenses\FastBCP.lic" ` ... ``` ``` ./FastBCP \ ... --license "/path/to/licenses/FastBCP.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 ``` .\FastBCP.exe ` ... --license "https://licenseserve.yourdomain.lan/fastbcp.lic" ` ... ``` ``` ./FastBCP \ ... --license "https://licenseserve.yourdomain.lan/fastbcp.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:FASTBCP_LICENSE = "LICENSE_CONTENT_HERE" .\FastBCP.exe ` ... --license $env:FASTBCP_LICENSE ` ... # Using variable $license = Get-Content "C:\licenses\FastBCP.lic" -Raw .\FastBCP.exe ` ... --license $license ` ... ``` ``` # Using environment variable export FASTBCP_LICENSE="LICENSE_CONTENT_HERE" ./FastBCP \ ... --license "$FASTBCP_LICENSE" \ ... # Using variable license=$(cat /path/to/licenses/FastBCP.lic) ./FastBCP \ ... --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 parallel export: * Windows * Linux ``` .\FastBCP.exe ` --connectiontype pgsql ` --server "localhost:15432" ` --database "tpch10" ` --user "FastUser" ` --password "FastPassword" ` --query "SELECT * FROM dbo.orders" ` --directory "D:\temp" ` --fileoutput "pgsql_orders.parquet" ` --parallelmethod DataDriven ` --distributekeycolumn "YEAR(o_orderdate)" ` --paralleldegree 7 ` --merge false ` --runid "pgsql_to_parquet_parallel_datadriven" ` --license "//SharedUnc/licenses/fastbcp/fastbcp.lic" ``` ``` ./FastBCP \ --connectiontype pgsql \ --server "localhost:15432" \ --database "tpch10" \ --user "FastUser" \ --password "FastPassword" \ --query "SELECT * FROM dbo.orders" \ --directory "/temp" \ --fileoutput "pgsql_orders.parquet" \ --parallelmethod DataDriven \ --distributekeycolumn "YEAR(o_orderdate)" \ --paralleldegree 7 \ --merge false \ --runid "pgsql_to_parquet_parallel_datadriven" \ --license "//SharedUnc/licenses/fastbcp/fastbcp.lic" ``` This example: * Retrieves the license from a remote unc path * Connects to a PostgreSQL database * Exports orders data using DataDriven parallel method with 7 threads * Uses a YEAR expression on the distribute key column * Keeps distributed files separate (merge=false) --- # Output Info Configure where and how FastBCP saves exported data. ## Directory[​](#directory "Direct link to Directory") Use the `-D` or `--directory` parameter to specify where the output file(s) will be saved. ### Local Paths[​](#local-paths "Direct link to Local Paths") * Windows * Linux ``` .\FastBCP.exe \ ... --directory "C:\exports\sales\orders" \ ... ``` ``` ./FastBCP \ ... --directory "/exports/sales/orders" \ ... ``` ### UNC Paths[​](#unc-paths "Direct link to UNC Paths") For Windows network shares, you can use UNC paths: ``` .\FastBCP.exe \ ... --directory "\\server\share\exports\orders" \ ... ``` ### Cloud Paths[​](#cloud-paths "Direct link to Cloud Paths") FastBCP supports direct export to cloud storage: * AWS S3 * Azure Blob * Azure Data Lake Gen2 * Google Cloud Storage * S3-Compatible (MinIO, OVH) * OneLake ``` ./FastBCP \ ... --directory "s3://my-bucket/exports/orders" \ ... ``` ``` ./FastBCP \ ... --directory "abs://mystorageaccount.blob.core.windows.net/container/path" \ ... ``` ``` ./FastBCP \ ... --directory "abfss://mystorageaccount.dfs.core.windows.net/container/path/to/data" \ ... ``` ``` ./FastBCP \ ... --directory "gs://my-bucket/exports/orders" \ ... ``` ``` ./FastBCP \ ... --directory "s3://my-bucket/exports" \ ... ``` ``` ./FastBCP \ ... --directory "onelake://myworkspace.dfs.core.windows.net/lakehouse/path/to/data" \ ... ``` Information See [Cloud Options](/1.2/documentation/cli/cloud_options.md) for authentication and configuration details. **Syntax:** * Short form: `-D "path"` * Long form: `--directory "path"` ## Output File[​](#output-file "Direct link to Output File") Use the `-o` or `--fileoutput` parameter to specify the name of the output file. The file extension determines the output format. ``` ./FastBCP \ ... --fileoutput "orders.parquet" \ ... ``` **Syntax:** * Short form: `-o "filename"` * Long form: `--fileoutput "filename"` ### Supported Formats[​](#supported-formats "Direct link to Supported Formats") | Extension | Format | Description | | ---------- | ------------ | --------------------------------------------------- | | `.parquet` | Parquet | Columnar, compressed (recommended) | | `.csv` | CSV | Delimiter-separated values | | `.tsv` | TSV | Tab-separated values | | `.json` | JSON | JavaScript Object Notation | | `.bson` | BSON | Binary JSON | | `.xlsx` | Excel | Microsoft Excel format | | `.bin` | Binary | PostgreSQL COPY binary format | | `.csv.gz` | CSV Gzipped | Delimiter-separated values and compressed with Gzip | | `.tsv.gz` | TSV Gzipped | Tab delimited values and compressed with Gzip | | `.json.gz` | JSON Gzipped | JavaScript Object Notation with Gzip | ## Tokens[​](#tokens "Direct link to Tokens") Use tokens in `--directory` and `--fileoutput` parameters for dynamic paths and filenames. ``` ./FastBCP \ ... --directory "/exports/{sourcedatabase}/{sourceschema}" \ --fileoutput "{sourcetable}_{startdate}.parquet" \ ... ``` **Syntax:** Tokens are enclosed in curly braces `{token_name}` ### Available Tokens[​](#available-tokens "Direct link to Available Tokens") | Token | Description | Example Value | | ------------------------- | ---------------------------------- | ------------------------------------ | | `{sourcedatabase}` | Value from `--database` | `AdventureWorks` | | `{sourceschema}` | Value from `--sourceschema` | `Sales` | | `{sourcetable}` | Value from `--sourcetable` | `Orders` | | `{starttimestamp}` | Job start (yyyyMMddHHmmss) | `20260107143022` | | `{starttimestamp:FORMAT}` | Custom timestamp format | [See below](#timestamp-format-codes) | | `{startdate}` | Job start date (yyyyMMdd) | `20260107` | | `{starttime}` | Job start time (HHmmss) | `143022` | | `{starthour}` | Job start hour (HH) | `14` | | `{user}` | Username (from `--user` or system) | `dbuser` | | `{filetype}` | Output format extension | `parquet` | | `{datadrivencolumn}` | Data-driven split value | Varies | ### Timestamp Format Codes[​](#timestamp-format-codes "Direct link to Timestamp Format Codes") Use `{starttimestamp:FORMAT}` with custom format: | Format | Description | Example | | ------ | ---------------- | ------- | | `yyyy` | 4-digit year | `2026` | | `yy` | 2-digit year | `26` | | `MM` | Month (01-12) | `01` | | `dd` | Day (01-31) | `07` | | `HH` | Hour 24h (00-23) | `14` | | `mm` | Minute (00-59) | `30` | | `ss` | Second (00-59) | `22` | **Examples:** ``` # yyyyMMdd format ./FastBCP \ ... --fileoutput "orders_{starttimestamp:yyyyMMdd}.parquet" \ ... # yyyy-MM-dd format ./FastBCP \ ... --fileoutput "orders_{starttimestamp:yyyy-MM-dd}.parquet" \ ... # yyyyMMddHH format (hourly) ./FastBCP \ ... --fileoutput "logs_{starttimestamp:yyyyMMddHH}.parquet" \ ... ``` ## Timestamped Output[​](#timestamped-output "Direct link to Timestamped Output") Use the `-x` or `--timestamped` parameter to automatically add a timestamp to the filename. ``` ./FastBCP \ ... --fileoutput "orders.parquet" \ --timestamped \ ... ``` **Syntax:** * Short form: `-x` * Long form: `--timestamped` tip `--timestamped` automatically appends `_yyyyMMddHHmmss` to the filename. For more control over format and placement, use timestamp tokens instead. ## Encoding[​](#encoding "Direct link to Encoding") Use the `-e` or `--encoding` parameter to specify character encoding for text formats (CSV, JSON, TSV). ``` ./FastBCP \ ... --fileoutput "orders.csv" \ --encoding "UTF-8" \ ... ``` **Syntax:** * Short form: `-e "encoding"` * Long form: `--encoding "encoding"` **Default:** `UTF-8` note Encoding is not applicable to Parquet files (they use UTF-8 internally). --- # Parallel Parameters FastBCP 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 ``` .\FastBCP.exe ` ... --parallelmethod Ntile ` ... ``` ``` ./FastBCP \ ... --parallelmethod Ntile \ ... ``` **Syntax:** * Short form: `-m ` * Long form: `--parallelmethod ` ### Methods Comparison[​](#methods-comparison "Direct link to Methods Comparison") | Method | Parallel | Needs Distributed Column | Database Source Type | | --------------- | -------- | ------------------------ | ---------------------------- | | `None` | | | Any | | `Random` | | | Any | | `DataDriven` | | | Any | | `RangeId` | | | Any | | `Ntile` | | | Any | | `Ctid` | | | PostgreSQL (pgsql/pgcopy) | | `Physloc` | | | SQL Server (mssql) | | `Rowid` | | | Oracle (oraodp/adbc\_oracle) | | `NZDataSlice` | | | Netezza (nzsql) | | `Timepartition` | | | Any | ### Available Methods[​](#available-methods "Direct link to Available Methods") **None** - No parallel processing. Data is exported sequentially. **DataDriven** - Uses all values of a column (or a given list provided by `--datadrivenquery`) to split the export. If the number of values is greater than the degree of parallelism, throttling will be applied. tip You can use an expression in the distribute key column instead of a column name.
Example: `YEAR(o_orderdate)` **Ntile** - Uses the distributed column field and ntile values to retrieve evenly distributed chunks of data. Each parallel thread exports a portion based on a range built using the distributed column values. The uniqueness of the distributed column is not mandatory. **RangeId** - Uses the distributed column field and its min/max values to retrieve chunks of data. Each parallel thread exports a portion based on a range built using the distributed column values. **Random** - Requires a distribution column that must be an integer/bigint with many values (at least as many as the degree of parallelism). **Ctid** - Uses an internal hidden field to retrieve chunks of data. Each parallel thread exports a portion based on the CTID range. note PostgreSQL databases only (and some compatible PostgreSQL databases). **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. **Rowid** - Uses an internal hidden field to retrieve chunks of data. Each parallel thread exports a portion based on the ROWID range. note `RowId` parallel method is for Oracle databases only (`oraodp` and `adbc_oracle` connection types). **NZDataSlice** - Uses the native Netezza data slices to retrieve chunks of data. Each parallel thread exports a portion based on the data slice distribution. note `NZDataSlice` parallel method is for Netezza databases only. **Timepartition** - Uses a date/datetime column to partition data into time-based chunks. Each parallel thread exports data for a specific time period (year, month, week, or day). The distributed key column must be specified in a special format: `(datecolumn, year, month)`, `(datecolumn, year, month, day)`, `(datecolumn, year)`, or `(datecolumn, year, week)`. tip This method is ideal for time-series data and allows efficient parallel export based on temporal ranges. ## Distribute Key Column[​](#distribute-key-column "Direct link to Distribute Key Column") Use the `-c` or `--distributekeycolumn` parameter to define the column (or computation) on the data source that will be used to split the data into several parts. FastBCP 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. Timepartition Special Format When using the `Timepartition` method, the distribute key column must be specified in a special format: * `(datecolumn, year, month)` - Partition by year and month * `(datecolumn, year, month, day)` - Partition by year, month, and day * `(datecolumn, year)` - Partition by year only * `(datecolumn, year, week)` - Partition by year and week Example: `--distributekeycolumn "(o_orderdate, year, month)"` * Windows * Linux ``` # Using a column name .\FastBCP.exe ` ... --distributekeycolumn order_date ` ... # Using an expression .\FastBCP.exe ` ... --distributekeycolumn "YEAR(order_date)" ` ... ``` ``` # Using a column name ./FastBCP \ ... --distributekeycolumn order_date \ ... # Using an expression ./FastBCP \ ... --distributekeycolumn "YEAR(order_date)" \ ... ``` **Syntax:** * Short form: `-c ` * Long form: `--distributekeycolumn ` ## Degree of Parallelism[​](#degree-of-parallelism "Direct link to Degree of Parallelism") Use the `-p` or `--paralleldegree` 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 .\FastBCP.exe ` ... --paralleldegree 8 ` ... # Auto-detect based on CPU cores .\FastBCP.exe ` ... --paralleldegree 0 ` ... # Use half of available cores .\FastBCP.exe ` ... --paralleldegree -2 ` ... ``` ``` # Use 8 parallel threads ./FastBCP \ ... --paralleldegree 8 \ ... # Auto-detect based on CPU cores ./FastBCP \ ... --paralleldegree 0 \ ... # Use half of available cores ./FastBCP \ ... --paralleldegree -2 \ ... ``` **Syntax:** * Short form: `-p ` * Long form: `--paralleldegree ` **Default:** `-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. * Windows * Linux ``` .\FastBCP.exe ` ... --datadrivenquery "SELECT tagname FROM tags" ` ... ``` ``` ./FastBCP \ ... --datadrivenquery "SELECT tagname FROM tags" \ ... ``` * Windows * Linux ``` .\FastBCP.exe ` ... --datadrivenquery "SELECT o_orderdate FROM dim_date where ref_date > getdate() - 30" ` ... ``` ``` ./FastBCP \ ... --datadrivenquery "SELECT o_orderdate FROM dim_date where ref_date > getdate() - 30" \ ... ``` **Syntax:** * Long form only: `--datadrivenquery ""` ## Merge (boolean)[​](#merge-boolean "Direct link to Merge (boolean)") Use the `-M` or `--merge` true/false to specify if the temporary files generated for the parallel export should be kept splitted. Default `false` warning Current version allows valid merge for CSV and Parquet formats only. warning Merge is not available for cloud destinations warning Merge is automatic for local files destination * Windows * Linux ``` # Merge files after parallel export (default for local files) .\FastBCP.exe ` ... --merge true ` ... # Keep distributed files .\FastBCP.exe ` ... --merge false ` ... ``` ``` # Merge files after parallel export (default for local files) ./FastBCP \ ... --merge true \ ... # Keep distributed files ./FastBCP \ ... --merge false \ ... ``` **Syntax:** * Short form: `-M` * Long form: `--merge` **Default:** `true` ## Complete Example[​](#complete-example "Direct link to Complete Example") Here's a complete example using parallel parameters with the DataDriven method: * Windows * Linux ``` .\FastBCP.exe ` --connectiontype "pgcopy" ` --server "localhost:15432" ` --database "tpch" ` --user "FastUser" ` --password "FastPassword" ` --query "with T1 AS (select *, to_char(o_orderdate, 'YYYYMM') o_ordermonth from tpch_10.orders) SELECT * FROM T1" ` --directory "D:\temp\tpch\orders\" ` --fileoutput "pgcopy_orders.parquet" ` --method "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" ` --paralleldegree 10 ` --merge "False" ` --runid "pgcopy_to_parquet_parallel12_DataDriven" ``` ``` ./FastBCP \ --connectiontype "pgcopy" \ --server "localhost:15432" \ --database "tpch" \ --user "FastUser" \ --password "FastPassword" \ --query "with T1 AS (select *, to_char(o_orderdate, 'YYYYMM') o_ordermonth from tpch_10.orders) SELECT * FROM T1" \ --directory "/data/export/tpch/orders/" \ --fileoutput "pgcopy_orders.parquet" \ --method "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" \ --paralleldegree 10 \ --merge "False" \ --runid "pgcopy_to_parquet_parallel12_DataDriven" ``` This example: * Connects to a PostgreSQL database on localhost:15432 * Exports data from the dbo.orders table * Uses the DataDriven distribution method * Distributes work based on the month of the order date using an expression * Use a custom query to generate month values to extract from a light query (instead of a `SELECT DISTINCT o_ordermonth` from the source query) * Uses 10 parallel threads (even if there is 12 month to export) * Keeps distributed files without merging (--merge false) * Assigns a custom Run ID for tracking ## Timepartition Example[​](#timepartition-example "Direct link to Timepartition Example") Here's an example using the Timepartition method to partition data based on a date column: * Windows * Linux ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "tpch_copy" ` --user "FastUser" ` --password "FastPassword" ` --sourceschema "tpch_10" ` --sourcetable "orders_date_sorted" ` --directory "D:\temp\TestPartition" ` --fileoutput "orders.csv" ` --decimalseparator "," ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --method "Timepartition" ` --distributekeycolumn "(o_orderdate,year,month)" ` --paralleldegree 16 ` --merge "False" ` --runid "mssql_to_csv_parallel8_timepartition" ``` ``` ./FastBCP \ --connectiontype "mssql" \ --server "localhost" \ --database "tpch_copy" \ --user "FastUser" \ --password "FastPassword" \ --sourceschema "tpch_10" \ --sourcetable "orders_date_sorted" \ --directory "/data/export/TestPartition" \ --fileoutput "orders.csv" \ --decimalseparator "," \ --delimiter "|" \ --dateformat "yyyy-MM-dd HH:mm:ss" \ --encoding "UTF-8" \ --method "Timepartition" \ --distributekeycolumn "(o_orderdate,year,month)" \ --paralleldegree 16 \ --merge "False" \ --runid "mssql_to_csv_parallel8_timepartition" ``` This example: * Connects to a SQL Server database on localhost * Exports data from the tpch\_10.orders\_date\_sorted table * Uses the Timepartition distribution method * Partitions data by year and month based on the o\_orderdate column * Uses 16 parallel threads * Keeps distributed files without merging * Assigns a custom Run ID for tracking --- # Parquet Formatting [Apache Parquet](https://parquet.apache.org/) is a columnar storage format optimized for analytics. FastBCP automatically uses Parquet format when the output file has a `.parquet` extension. ## Parquet Compression[​](#parquet-compression "Direct link to Parquet Compression") Use the `--parquetcompression` parameter to specify the parquet compression codec. ``` ./FastBCP \ ... --fileoutput "orders.parquet" \ --parquetcompression Snappy \ ... ``` **Syntax:** * Long form: `--parquetcompression ` **Default:** `Zstd` (faster and better compression ratio than others) **Available Algorithms:** * `None` - No compression * `Snappy` - Fast, small compression, classic * `Gzip` - Smaller files, slower * `Lzo` - Slower, medium compression (rarely used) * `Lz4` - Slower, moderate compression * `Zstd` - Best compression and Fast (default) tip The **Zstd** (default) is best for most cases. It provides the best compression ratio with moderate speed, ideal for cloud storage to minimize storage costs and transfer time. * So no need to set this parameter to use Zstd. ## Row Group Size Configuration[​](#row-group-size-configuration "Direct link to Row Group Size Configuration") Available since version 0.30.1 This feature is available starting from FastBCP version 0.30.1. You can control the Parquet row group size using the `FASTBCP_RGSIZE` environment variable. Row groups are the unit of parallelization in Parquet files, and their size can impact query performance and memory usage. **Environment Variable:** `FASTBCP_RGSIZE` **Default Value:** `max(2^18/sqrt(degree),64000)` **Usage:** * Windows * Linux ``` # Set the row group size to 500,000 rows $env:FASTBCP_RGSIZE = "500000" # Run FastBCP .\FastBCP.exe --connectiontype mssql --server "localhost" ... ``` ``` # Set the row group size to 500,000 rows export FASTBCP_RGSIZE=500000 # Run FastBCP ./FastBCP --connectiontype mssql --server "localhost" ... ``` ## Complete Example[​](#complete-example "Direct link to Complete Example") * Windows * Linux ``` $env:FASTBCP_RGSIZE = "500000" .\FastBCP.exe ` --connectiontype mssql ` --server "localhost" ` --database "sales" ` --trusted ` --query "SELECT * FROM orders WHERE OrderDate >= '2024-01-01'" ` --directory "C:\exports" ` --fileoutput "orders.parquet" ` --parquetcompression Snappy ``` ``` export FASTBCP_RGSIZE=500000 ./FastBCP \ --connectiontype mssql \ --server "localhost" \ --database "sales" \ --trusted \ --query "SELECT * FROM orders WHERE OrderDate >= '2024-01-01'" \ --directory "/exports" \ --fileoutput "orders.parquet" \ --parquetcompression Snappy ``` --- # Source Info FastBCP offers multiple ways to define your data source for extraction. You can use a query, an input file, or specify schema and table names directly. ## Query[​](#query "Direct link to Query") Use the `-q` or `--query` parameter to specify your extraction as a SELECT statement. ``` ./FastBCP \ ... --query "SELECT * FROM Sales.Orders WHERE OrderDate >= '2024-01-01'" \ ... ``` **Syntax:** * Short form: `-q "SELECT_statement"` * Long form: `--query "SELECT_statement"` ## Input File[​](#input-file "Direct link to Input File") Use the `-F` or `--fileinput` parameter to specify an input file that contains only one query. ``` ./FastBCP \ ... --fileinput "/sources/sql/queries/my_extraction.sql" \ ... ``` **Syntax:** * Short form: `-F "file_path"` * Long form: `--fileinput "file_path"` Warning The query in the input file must not end with a semicolon (`;`). ## Source Schema[​](#source-schema "Direct link to Source Schema") If no query or input file is used, you can specify the source schema with the `-s` or `--sourceschema` parameter. Combined with the source table, this will extract data from `sourceschema.sourcetable`. ``` ./FastBCP \ ... --sourceschema "Sales" \ --sourcetable "Orders" \ ... ``` **Syntax:** * Short form: `-s "schema_name"` * Long form: `--sourceschema "schema_name"` Information This field is mandatory if some parallel method is used. See **[Advanced Parameters](/1.2/documentation/cli/advanced_parameters.md)** section for more details. ## Source Table[​](#source-table "Direct link to Source Table") If no query or input file is used, you can specify the source table with the `-T` or `--sourcetable` parameter. Combined with the source schema, this will extract data from `sourceschema.sourcetable`. ``` ./FastBCP \ ... --sourceschema "Sales" \ --sourcetable "Orders" \ ... ``` **Syntax:** * Short form: `-T "table_name"` * Long form: `--sourcetable "table_name"` Information This field is mandatory if some parallel method is used. See **[Advanced Parameters](/1.2/documentation/cli/advanced_parameters.md)** section for more details. Warning if you use the placeholder `{sourceschema}` and `{sourcetable}` in the `--directory` or `--fileoutput` (See **[Output Info](/1.2/documentation/cli/output_info.md)**) then you must set the `--sourceschema `and the `--sourcetable `even you use `--query `or `--inputfile` --- # AWS S3 Configuration Complete guide for configuring AWS S3 connectivity with FastBCP. ## Authentication Methods[​](#authentication-methods "Direct link to Authentication Methods") FastBCP 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 FastBCP:** ``` # Use default profile ./FastBCP \ ... --directory "s3://my-bucket/exports" \ --fileoutput "data.parquet" \ ... # Use production profile ./FastBCP \ ... --directory "s3://prod-bucket/exports" \ --cloudprofile "production" \ --fileoutput "data.parquet" \ ... # Use development profile ./FastBCP \ ... --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 FastBCP .\FastBCP.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 FastBCP ./FastBCP \ ... --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 FastBCP 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 FastBCP:** ``` { "Version": "2012-10-17", "Statement": [ { "Sid": "FastBCPRequired", "Comment": "REQUIRED - actual operations performed by FastBCP (multipart upload)", "Effect": "Allow", "Action": [ "s3:PutObject", "s3:AbortMultipartUpload" ], "Resource": "arn:aws:s3:::MY-BUCKET/exports/*" }, { "Sid": "FastBCPOptionalConvenience", "Comment": "OPTIONAL - operational convenience, not required by the code", "Effect": "Allow", "Action": [ "s3:GetObject", "s3:ListBucket" ], "Resource": [ "arn:aws:s3:::MY-BUCKET/exports/*", "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 ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "orders" ` --directory "s3://my-bucket/exports/{sourcetable}" ` --fileoutput "{sourcetable}.parquet" ``` ``` ./FastBCP \ --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 ``` .\FastBCP.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" ``` ``` ./FastBCP \ --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 ``` .\FastBCP.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 ``` ``` ./FastBCP \ --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") FastBCP 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 FastBCP. ## 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") FastBCP 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 ``` FastBCP will automatically use the Azure CLI's authentication credentials. **Using with FastBCP:** ``` # No additional configuration needed - just run FastBCP ./FastBCP \ ... --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 FastBCP .\FastBCP.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 FastBCP ./FastBCP \ ... --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 FastBCP .\FastBCP.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 FastBCP ./FastBCP \ ... --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 FastBCP 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 ``` .\FastBCP.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" ``` ``` ./FastBCP \ --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 ``` .\FastBCP.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 ``` ``` ./FastBCP \ --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 ``` .\FastBCP.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" ``` ``` ./FastBCP \ --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 ``` .\FastBCP.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 ``` ``` ./FastBCP \ --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 FastBCP. ## Authentication Methods[​](#authentication-methods "Direct link to Authentication Methods") FastBCP 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 ``` FastBCP will automatically use the gcloud CLI's authentication credentials. **Using with FastBCP:** ``` # No additional configuration needed - just run FastBCP ./FastBCP \ ... --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., "fastbcp-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 fastbcp-export \ --display-name="FastBCP Export Service Account" # Grant Storage Object Admin role gcloud projects add-iam-policy-binding my-project-id \ --member="serviceAccount:fastbcp-export@my-project-id.iam.gserviceaccount.com" \ --role="roles/storage.objectAdmin" # Create and download key file gcloud iam service-accounts keys create ~/fastbcp-key.json \ --iam-account=fastbcp-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\fastbcp-key.json" # Run FastBCP .\FastBCP.exe ` ... --directory "gs://my-bucket/exports" ` --fileoutput "data.parquet" ` ... ``` ``` # Set path to service account key file export GOOGLE_APPLICATION_CREDENTIALS="/path/to/fastbcp-key.json" # Run FastBCP ./FastBCP \ ... --directory "gs://my-bucket/exports" \ --fileoutput "data.parquet" \ ... ``` ### 3. Default Application Credentials[​](#3-default-application-credentials "Direct link to 3. Default Application Credentials") When FastBCP 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 ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Orders" ` --directory "gs://my-bucket/exports/orders" ` --fileoutput "orders.parquet" ``` ``` ./FastBCP \ --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 ``` .\FastBCP.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 ``` ``` ./FastBCP \ --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 ``` .\FastBCP.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 ``` ``` ./FastBCP \ --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 ``` .\FastBCP.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 ``` ``` ./FastBCP \ --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:fastbcp-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 FastBCP 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" .\FastBCP.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 "onelake://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" ./FastBCP ` --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 "onelake://myworkspace/mylakehouse/{sourcedatabase}/{sourceschema}/{sourcetable}/year=2024/" \ --fileoutput "orders_2024.parquet" \ --parallelmethod "Ctid" \ --paralleldegree 8 ``` --- # Cloud Connectivity Overview FastBCP 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 FastBCP will use multi-part uploads for all cloud provider Warning Since FastBCP 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") FastBCP 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](/1.2/documentation/cloud-connectivity/aws-s3.md) * [Azure Setup](/1.2/documentation/cloud-connectivity/azure.md) * [Google Cloud Storage Setup](/1.2/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 ./FastBCP / ... --directory "s3://my-bucket/exports" / --fileoutput "data.parquet" / ... ``` ``` # Azure Blob ./FastBCP \ ... --directory "abs://account.blob.core.windows.net/container/exports/" \ --fileoutput "data.parquet" \ ... ``` ``` # Azure Datalake Gen 2 ./FastBCP \ ... --directory "abs://account.dfs.core.windows.net/container/exports/" \ --fileoutput "data.parquet" \ ... ``` ``` # Google Cloud Storage ./FastBCP \ ... --directory "gs://my-bucket/exports" \ --fileoutput "data.parquet" \ ... ``` ``` # OneLake ./FastBCP \ ... --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: ``` ./FastBCP \ ... --directory "s3://prod-bucket/exports" \ --cloudprofile "production" \ ... ./FastBCP \ ... --directory "s3://dev-bucket/exports" \ --cloudprofile "development" ... ``` --- # Operating Systems FastBCP supports Windows and Linux 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 | | ------------------------ | -------------------------- | ------------- | --------- | | Amazon Linux | 2023 (Kernel 6.1) | Arm64, x64 | | | 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 FastBCP supports a wide range of database systems across different platforms. ## Supported Databases & Platforms[​](#supported-databases--platforms "Direct link to Supported Databases & Platforms") | Database | Windows AMD64 | Linux AMD64 | Linux ARM64 | | --------------------- | ------------- | ----------- | ----------- | | **SQL Server** | | | | | **SQL Server (ADBC)** | | | | | **PostgreSQL** | | | | | **PostgreSQL (ADBC)** | | | | | **MySQL** | | | | | **Oracle** | | | | | **Oracle (ADBC)** | | | | | **ClickHouse** | | | | | **DuckDB** | | | | | **Teradata** | | | | | **Netezza** | | | | | **SAP HANA** | | | | | **ODBC** | | | | | **OLEDB** | | | | The ADBC FastDriver connectors (**SQL Server (ADBC)**, **PostgreSQL (ADBC)**, and **Oracle (ADBC)**) are not supported on **Linux ARM64**. --- # FASTBCP\_ADBC\_BATCHCELLS ## Overview[​](#overview "Direct link to Overview") The `FASTBCP_ADBC_BATCHCELLS` environment variable controls the size of the Arrow record batches fetched by the ADBC connectors (`adbc_mssql`, `adbc_pgsql`), expressed in **cells** (rows × columns) rather than rows alone. Because a batch's memory footprint depends on both its row count and its column count, sizing by cell count keeps memory usage predictable across tables of very different widths: a narrow table fetches more rows per batch, a wide table fewer, for a comparable memory footprint. ## Syntax[​](#syntax "Direct link to Syntax") * Windows * Linux ``` $env:FASTBCP_ADBC_BATCHCELLS = 1000000 ``` ``` export FASTBCP_ADBC_BATCHCELLS=1000000 ``` ## Configuration[​](#configuration "Direct link to Configuration") | Property | Value | | -------------- | ------------------------------------------------------------------- | | **Type** | Integer (> 0) | | **Default** | `500000` (500,000 cells) | | **Applies to** | `adbc_mssql` and `adbc_pgsql` connections (Arpe.io ADBC FastDriver) | | **Since** | FastBCP 1.2 | ## How Batch Size Is Derived[​](#how-batch-size-is-derived "Direct link to How Batch Size Is Derived") For a given table, the effective number of rows per Arrow record batch is computed as: ``` rows per batch = FASTBCP_ADBC_BATCHCELLS / number of columns ``` For example, with the default `500000` cells: | Columns | Rows per batch | | ------- | -------------- | | 10 | 50,000 | | 50 | 10,000 | | 500 | 1,000 | ## When to Change It[​](#when-to-change-it "Direct link to When to Change It") * **Increase** the value to reduce the number of round trips for very wide or very narrow tables when more memory is available, which can improve throughput. * **Decrease** the value to lower peak memory usage in constrained environments (containers, small VMs) or when exporting extremely wide tables. ## Examples[​](#examples "Direct link to Examples") ### Increase batch size for higher throughput[​](#increase-batch-size-for-higher-throughput "Direct link to Increase batch size for higher throughput") * Windows * Linux ``` $env:FASTBCP_ADBC_BATCHCELLS = 2000000 fastbcp -S myserver.database.windows.net ` -d MyDatabase ` -T dbo.MyTable ` -C adbc_mssql ` --fileoutput "output.parquet" ``` ``` export FASTBCP_ADBC_BATCHCELLS=2000000 fastbcp -S myserver.database.windows.net \ -d MyDatabase \ -T dbo.MyTable \ -C adbc_mssql \ --fileoutput "output.parquet" ``` ### Reduce batch size to limit memory usage[​](#reduce-batch-size-to-limit-memory-usage "Direct link to Reduce batch size to limit memory usage") * Windows * Linux ``` $env:FASTBCP_ADBC_BATCHCELLS = 100000 fastbcp -S pg-server:5432 ` -d MyDatabase ` -Q "SELECT * FROM public.orders" ` -C adbc_pgsql ` --fileoutput "orders.parquet" ``` ``` export FASTBCP_ADBC_BATCHCELLS=100000 fastbcp -S pg-server:5432 \ -d MyDatabase \ -Q "SELECT * FROM public.orders" \ -C adbc_pgsql \ --fileoutput "orders.parquet" ``` Platform availability This variable only applies to the ADBC FastDriver connectors (`adbc_mssql`, `adbc_pgsql`), available on **Windows x64** and **Linux x64** only. See [Connection Parameters](/1.2/documentation/cli/connection_parameters.md#connection-type) for details. --- # FASTBCP\_CLOUD\_ISBUFFERED ## Overview[​](#overview "Direct link to Overview") The `FASTBCP_CLOUD_ISBUFFERED` environment variable controls whether FastBCP uses buffered uploads when writing to cloud storage. ## Syntax[​](#syntax "Direct link to Syntax") * Windows * Linux ``` $env:FASTBCP_CLOUD_ISBUFFERED = "True" # or "False" ``` ``` export FASTBCP_CLOUD_ISBUFFERED=True # or False ``` ## Configuration[​](#configuration "Direct link to Configuration") | Property | Value | | -------------- | --------------------------------------------------------------------- | | **Type** | Boolean (`True` / `False`) | | **Default** | `False` | | **Applies to** | Azure Data Lake Storage (ADLS), OneLake, AWS S3, Google Cloud Storage | | **Since** | FastBCP 1.0 | ## Behavior[​](#behavior "Direct link to Behavior") ### When `False` (Default)[​](#when-false-default "Direct link to when-false-default") FastBCP uses the cloud SDK's `OpenWriteAsync` streaming upload: * Data is written directly to the cloud storage in chunks * Each chunk blocks the writer until acknowledged * **Simpler** but can be **slower** for Azure storage ### When `True` (Recommended for Azure)[​](#when-true-recommended-for-azure "Direct link to when-true-recommended-for-azure") FastBCP uses buffered uploads: * Data is first written to a local temporary file (see [`FASTBCP_TMPPATH`](/1.2/documentation/environment-variables/fastbcp-tmppath.md)) * When the stream is closed, the file is uploaded in parallel blocks (azcopy-like pattern) * **Significantly faster** for Azure Data Lake Storage and OneLake * Requires temporary disk space --- # FASTBCP\_CLOUD\_MAXUPLOADTHREAD\_PER\_STREAM ## Overview[​](#overview "Direct link to Overview") The `FASTBCP_CLOUD_MAXUPLOADTHREAD_PER_STREAM` environment variable controls the maximum number of parallel threads used to upload each file to cloud storage during buffered uploads. ## Syntax[​](#syntax "Direct link to Syntax") * Windows * Linux ``` $env:FASTBCP_CLOUD_MAXUPLOADTHREAD_PER_STREAM = 16 ``` ``` export FASTBCP_CLOUD_MAXUPLOADTHREAD_PER_STREAM=16 ``` ## Configuration[​](#configuration "Direct link to Configuration") | Property | Value | | -------------- | -------------------------------------------------------------------------------------------------------------------------- | | **Type** | Integer (> 0) | | **Default** | `8` when `parallelmethod=None`, `2` otherwise | | **Applies to** | Cloud uploads when [`FASTBCP_CLOUD_ISBUFFERED=True`](/1.2/documentation/environment-variables/fastbcp-cloud-isbuffered.md) | | **Since** | FastBCP 1.0 | ## Behavior[​](#behavior "Direct link to Behavior") ### Default Values[​](#default-values "Direct link to Default Values") FastBCP automatically adjusts the default based on the parallel extraction method: | Parallel Method | Default Threads | Reason | | --------------------------- | --------------- | ---------------------------------------------------------------------------------------------- | | `None` (single stream) | `8` | FastBCP itself is not parallelized, so more bandwidth can be allocated to upload | | `Ntile`, `DataDriven`, etc. | `2` | FastBCP is already extracting in parallel, so limit upload threads to avoid saturating network | ### How It Works[​](#how-it-works "Direct link to How It Works") When [`FASTBCP_CLOUD_ISBUFFERED=True`](/1.2/documentation/environment-variables/fastbcp-cloud-isbuffered.md): 1. Data is written to a local temporary file 2. On stream close, the file is uploaded in parallel blocks 3. `FASTBCP_CLOUD_MAXUPLOADTHREAD_PER_STREAM` controls how many threads upload blocks concurrently 4. Maps to `StorageTransferOptions.MaximumConcurrency` in Azure SDK --- # FASTBCP\_DATEFORMAT ## Overview[​](#overview "Direct link to Overview") The `FASTBCP_DATEFORMAT` environment variable lets you specify a custom format string for converting date values to strings in the output. When not set, FastBCP uses the default `yyyy-MM-dd HH:mm:sszzz`. The format string follows [.NET standard and custom date/time format patterns](https://learn.microsoft.com/en-us/dotnet/standard/base-types/custom-date-and-time-format-strings). ## Syntax[​](#syntax "Direct link to Syntax") * Windows * Linux ``` $env:FASTBCP_DATEFORMAT = "yyyyMMdd" ``` ``` export FASTBCP_DATEFORMAT=yyyyMMdd ``` ## Configuration[​](#configuration "Direct link to Configuration") | Property | Value | | -------------- | --------------------------------------------------------------------------- | | **Type** | Format string | | **Default** | `yyyy-MM-dd HH:mm:sszzz` | | **Applies to** | All output formats that serialize date columns as strings (CSV, JSON, etc.) | | **Since** | FastBCP 1.0 | Auto-adaptive formatting The date format is auto-adaptive based on the column type: * **Date-only** columns will always output as `yyyy-MM-dd` regardless of the format string * **Timestamp/DateTime** columns will output as `yyyy-MM-dd HH:mm:ss` even if a timezone token (`zzz`) is present in the format string * **DateTimeOffset** columns will include the timezone offset as specified ## Format Examples[​](#format-examples "Direct link to Format Examples") | Format string | Example output | | ---------------------------------- | --------------------------- | | `yyyy-MM-dd HH:mm:sszzz` (default) | `2026-06-28 14:30:22+02:00` | | `yyyy-MM-dd` | `2026-06-28` | | `yyyyMMdd` | `20260628` | | `dd/MM/yyyy` | `28/06/2026` | | `MM-dd-yyyy` | `06-28-2026` | | `yyyy/MM/dd` | `2026/06/28` | | `yyyy-MM-dd HH:mm:ss` | `2026-06-28 14:30:22` | ## Examples[​](#examples "Direct link to Examples") ### Compact date format — no separators[​](#compact-date-format--no-separators "Direct link to Compact date format — no separators") * Windows * Linux ``` $env:FASTBCP_DATEFORMAT = "yyyyMMdd" fastbcp -S myserver.database.windows.net ` -d MyDatabase ` -T dbo.MyTable ` --fileoutput "output.csv" ``` ``` export FASTBCP_DATEFORMAT=yyyyMMdd fastbcp -S myserver.database.windows.net \ -d MyDatabase \ -T dbo.MyTable \ --fileoutput "output.csv" ``` Output column value: `20260628` ### Restore default ISO 8601 format[​](#restore-default-iso-8601-format "Direct link to Restore default ISO 8601 format") * Windows * Linux ``` Remove-Item Env:FASTBCP_DATEFORMAT ``` ``` unset FASTBCP_DATEFORMAT ``` --- # FASTBCP\_PERFORMANCE\_COLLECT ## Overview[​](#overview "Direct link to Overview") The `FASTBCP_PERFORMANCE_COLLECT` environment variable controls whether FastBCP collects performance information about the machine (CPU usage, memory usage, etc.) during the run. ## Syntax[​](#syntax "Direct link to Syntax") * Windows * Linux ``` $env:FASTBCP_PERFORMANCE_COLLECT = $True ``` ``` export FASTBCP_PERFORMANCE_COLLECT=True ``` ## Configuration[​](#configuration "Direct link to Configuration") | Property | Value | | ----------- | -------------------------- | | **Type** | Boolean (`True` / `False`) | | **Default** | `False` (disabled) | | **Since** | FastBCP 1.2 | ## Behavior[​](#behavior "Direct link to Behavior") ### When `False` (Default)[​](#when-false-default "Direct link to when-false-default") No performance information is collected during the run. ### When `True`[​](#when-true "Direct link to when-true") FastBCP collects performance information of the machine (CPU, memory usage, etc.) while the run is in progress. tip Use together with [`FASTBCP_SYSTEMINFO_COLLECT`](/1.2/documentation/environment-variables/fastbcp-systeminfo-collect.md) to also capture system information during the run. --- # FASTBCP\_RGSIZE ## Overview[​](#overview "Direct link to Overview") The `FASTBCP_RGSIZE` environment variable controls the row group size for Parquet file exports. Row groups are the primary unit for organizing data within a Parquet file and significantly impact query performance and compression efficiency. ## Syntax[​](#syntax "Direct link to Syntax") * Windows * Linux ``` $env:FASTBCP_RGSIZE = 500000 ``` ``` export FASTBCP_RGSIZE=500000 ``` ## Configuration[​](#configuration "Direct link to Configuration") | Property | Value | | -------------- | ------------------------------ | | **Type** | Integer (> 0) | | **Default** | `max(2^18/sqrt(degree),64000)` | | **Applies to** | Parquet file exports | | **Since** | FastBCP 0.30 | ## What is a Row Group?[​](#what-is-a-row-group "Direct link to What is a Row Group?") A **row group** is a horizontal partition of data in a Parquet file: * Parquet files are divided into one or more row groups * Each row group contains a subset of rows * Column data within a row group is compressed together * Query engines can skip entire row groups based on metadata ``` Parquet File Structure: ├── Row Group 1 (1M rows) │ ├── Column A (compressed) │ ├── Column B (compressed) │ └── Column C (compressed) ├── Row Group 2 (1M rows) │ ├── Column A (compressed) │ ├── Column B (compressed) │ └── Column C (compressed) └── Footer (metadata) ``` --- # FASTBCP\_SYSTEMINFO\_COLLECT ## Overview[​](#overview "Direct link to Overview") The `FASTBCP_SYSTEMINFO_COLLECT` environment variable controls whether FastBCP collects information about the machine it runs on (CPU, memory, OS, etc.) during the run. ## Syntax[​](#syntax "Direct link to Syntax") * Windows * Linux ``` $env:FASTBCP_SYSTEMINFO_COLLECT = $True ``` ``` export FASTBCP_SYSTEMINFO_COLLECT=True ``` ## Configuration[​](#configuration "Direct link to Configuration") | Property | Value | | ----------- | -------------------------- | | **Type** | Boolean (`True` / `False`) | | **Default** | `False` (disabled) | | **Since** | FastBCP 1.2 | ## Behavior[​](#behavior "Direct link to Behavior") ### When `False` (Default)[​](#when-false-default "Direct link to when-false-default") No system information is collected during the run. ### When `True`[​](#when-true "Direct link to when-true") FastBCP collects system information about the machine (CPU, memory, OS, etc.) while the run is in progress. tip Use together with [`FASTBCP_PERFORMANCE_COLLECT`](/1.2/documentation/environment-variables/fastbcp-performance-collect.md) to also capture performance metrics during the run. --- # FASTBCP\_TMPPATH ## Overview[​](#overview "Direct link to Overview") The `FASTBCP_TMPPATH` environment variable specifies the base directory where FastBCP creates temporary files during buffered cloud uploads. ## Syntax[​](#syntax "Direct link to Syntax") * Windows * Linux ``` $env:FASTBCP_TMPPATH = "D:\temp\fastbcp" ``` ``` export FASTBCP_TMPPATH=/tmp/fastbcp ``` ## Configuration[​](#configuration "Direct link to Configuration") | Property | Value | | -------------- | -------------------------------------------------------------------------------------------------------------------------- | | **Type** | Directory path (absolute or relative) | | **Default** | System temp directory (`%TEMP%` on Windows, `$TMPDIR` on Linux/macOS) | | **Applies to** | Cloud uploads when [`FASTBCP_CLOUD_ISBUFFERED=True`](/1.2/documentation/environment-variables/fastbcp-cloud-isbuffered.md) | | **Since** | FastBCP 1.0 | ## Behavior[​](#behavior "Direct link to Behavior") ### Default Behavior (Not Set)[​](#default-behavior-not-set "Direct link to Default Behavior (Not Set)") FastBCP uses the system's default temporary directory: * **Windows**: `%TEMP%` (typically `C:\Users\\AppData\Local\Temp`) * **Linux/macOS**: `$TMPDIR` (typically `/tmp`) ### Custom Path[​](#custom-path "Direct link to Custom Path") When set, FastBCP creates a unique subdirectory per process: ``` /fastbcp_/ ``` **Example:** ``` D:\temp\fastbcp\fastbcp_a1b2c3d4-e5f6-7890-abcd-ef1234567890\ ``` ### Automatic Cleanup[​](#automatic-cleanup "Direct link to Automatic Cleanup") * Subdirectories are created automatically * Temporary files are deleted after successful upload * In case of errors, files may remain and need manual cleanup --- # FASTBCP\_UID\_STRING\_CASING ## Overview[​](#overview "Direct link to Overview") The `FASTBCP_UID_STRING_CASING` environment variable controls whether UID (UUID) values are converted to lowercase or uppercase strings in the output. The default is lowercase, which follows [RFC 4122](https://www.rfc-editor.org/rfc/rfc4122) standard formatting (e.g. `550e8400-e29b-41d4-a716-446655440000`). ## Syntax[​](#syntax "Direct link to Syntax") * Windows * Linux ``` $env:FASTBCP_UID_STRING_CASING = "upper" ``` ``` export FASTBCP_UID_STRING_CASING=upper ``` ## Configuration[​](#configuration "Direct link to Configuration") | Property | Value | | -------------- | -------------------------------------------------------- | | **Type** | `lower` / `upper` | | **Default** | `lower` | | **Applies to** | All output formats that serialize UID columns as strings | | **Since** | FastBCP 1.0 | ## Values[​](#values "Direct link to Values") | Value | Output example | | ----------------- | -------------------------------------- | | `lower` (default) | `550e8400-e29b-41d4-a716-446655440000` | | `upper` | `550E8400-E29B-41D4-A716-446655440000` | ## Examples[​](#examples "Direct link to Examples") ### Export with uppercase UIDs[​](#export-with-uppercase-uids "Direct link to Export with uppercase UIDs") * Windows * Linux ``` $env:FASTBCP_UID_STRING_CASING = "upper" fastbcp -S myserver.database.windows.net ` -d MyDatabase ` -T dbo.MyTable ` --fileoutput "output.csv" ``` ``` export FASTBCP_UID_STRING_CASING=upper fastbcp -S myserver.database.windows.net \ -d MyDatabase \ -T dbo.MyTable \ --fileoutput "output.csv" ``` ### Restore default lowercase (RFC 4122)[​](#restore-default-lowercase-rfc-4122 "Direct link to Restore default lowercase (RFC 4122)") * Windows * Linux ``` $env:FASTBCP_UID_STRING_CASING = "lower" ``` ``` export FASTBCP_UID_STRING_CASING=lower ``` --- # Environment Variables Overview FastBCP supports several environment variables to customize its behavior. This page provides a comprehensive overview of all available environment variables. ## Quick Reference Table[​](#quick-reference-table "Direct link to Quick Reference Table") | Variable | Type | Default | Category | Description | | ---------------------------------------------------------------------------------------------------------------------------------- | ----------------- | ---------------------------- | ------------ | ----------------------------------------------------------------- | | [`FASTBCP_CLOUD_ISBUFFERED`](/1.2/documentation/environment-variables/fastbcp-cloud-isbuffered.md) | `True` / `False` | `False` | Cloud Upload | Enables buffered cloud uploads for better performance | | [`FASTBCP_TMPPATH`](/1.2/documentation/environment-variables/fastbcp-tmppath.md) | Directory path | System temp | Cloud Upload | Base directory for temporary files during buffered uploads | | [`FASTBCP_CLOUD_MAXUPLOADTHREAD_PER_STREAM`](/1.2/documentation/environment-variables/fastbcp-cloud-maxuploadthread-per-stream.md) | Integer (> 0) | `8` or `2` | Cloud Upload | Maximum parallel upload threads per cloud stream | | [`FASTBCP_RGSIZE`](/1.2/documentation/environment-variables/fastbcp-rgsize.md) | Integer (> 0) | max(2^18/sqrt(degree),64000) | Parquet | Row group size for Parquet files | | [`FASTBCP_UID_STRING_CASING`](/1.2/documentation/environment-variables/fastbcp-uid-string-casing.md) | `lower` / `upper` | `lower` | Output | Casing for UID-to-string conversion (RFC 4122) | | [`FASTBCP_DATEFORMAT`](/1.2/documentation/environment-variables/fastbcp-dateformat.md) | Format string | `yyyy-MM-dd HH:mm:sszzz` | Output | Custom date format string for date-to-string conversion | | [`FASTBCP_ADBC_BATCHCELLS`](/1.2/documentation/environment-variables/fastbcp-adbc-batchcells.md) | Integer (> 0) | `500000` | ADBC | Arrow record batch size (in cells) for ADBC connectors | | [`FASTBCP_SYSTEMINFO_COLLECT`](/1.2/documentation/environment-variables/fastbcp-systeminfo-collect.md) | `True` / `False` | `False` | Diagnostics | Collects system information about the machine during the run | | [`FASTBCP_PERFORMANCE_COLLECT`](/1.2/documentation/environment-variables/fastbcp-performance-collect.md) | `True` / `False` | `False` | Diagnostics | Collects performance information about the machine during the run | --- # Advanced Scenarios Advanced use cases, partition functions, and troubleshooting examples. ## SQL Server Partition Functions[​](#sql-server-partition-functions "Direct link to SQL Server Partition Functions") Use SQL Server partition functions for efficient parallel exports. ### Using Partition Function with DataDriven[​](#using-partition-function-with-datadriven "Direct link to Using Partition Function with DataDriven") Leverage existing partition functions to distribute work: ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "tpch10_collation_bin2" ` --trusted ` --sourceschema "dbo" ` --sourcetable "orders_part" ` --directory "D:\temp" ` --fileoutput "orders_partitioned.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "DataDriven" ` --distributekeycolumn "`$partition.PF_DATE(o_orderdate)" ` --paralleldegree 10 ` --merge "False" ``` Partition Function Syntax Use `` `$partition.FunctionName(ColumnName) `` to reference a partition function. The backtick escapes the dollar sign in PowerShell. ### Date-based Partitioning[​](#date-based-partitioning "Direct link to Date-based Partitioning") #### Partition by date ranges for time-series data using database partitions:[​](#partition-by-date-ranges-for-time-series-data-using-database-partitions "Direct link to Partition by date ranges for time-series data using database partitions:") ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "TimeSeriesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "SensorReadings" ` --directory "C:\temp" ` --fileoutput "sensor_readings.parquet" ` --parallelmethod "DataDriven" ` --distributekeycolumn "`$partition.PF_Monthly(reading_date)" ` --paralleldegree 12 ` --merge "False" ``` #### Partition by date ranges for time-series data using Timepartition FastBCP parallelmethod :[​](#partition-by-date-ranges-for-time-series-data-using-timepartition-fastbcp-parallelmethod-- "Direct link to Partition by date ranges for time-series data using Timepartition FastBCP parallelmethod :") ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "TimeSeriesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "SensorReadings" ` --directory "s3://mycorpexportbucket/raw/TimeSeriesDB/SensorReadings/" ` --fileoutput "sensor_readings.parquet" ` --cloudprofile "mycorps3profile" ` --parallelmethod "Timepartition" ` --distributekeycolumn "(reading_date,year,month,day)" ` --paralleldegree 12 ` --merge "False" ``` This technic will produce one file per day inside a directory structure (local or cloud) as a Hive partitionning directory : /year=2026/month=11/day=11/sensor\_readings.parquet You can after a full export use a query to filter your data and overwrite files that was already generated on the overlaping period. ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "TimeSeriesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "SensorReadings_Part" ` --query "SELECT * FROM dbo.SensorReadings_Part WHERE reading_date >= CAST(GETDATE() - 10 AS DATE)" ` --directory "s3://mycorpexportbucket/raw/TimeSeriesDB/SensorReadings/" ` --fileoutput "sensor_readings.parquet" ` --cloudprofile "mycorps3profile" ` --parallelmethod "Timepartition" ` --distributekeycolumn "(reading_date,year,month,day)" ` --paralleldegree 10 ` --merge "False" ``` ## Complex Queries[​](#complex-queries "Direct link to Complex Queries") ### Multi-table Joins[​](#multi-table-joins "Direct link to Multi-table Joins") Export data with a query with joins: ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --query "SELECT o.order_id, o.order_date, c.customer_name, od.product_id, od.quantity, od.unit_price FROM orders o INNER JOIN customers c ON o.customer_id = c.customer_id INNER JOIN order_details od ON o.order_id = od.order_id WHERE o.order_date >= '2024-01-01'" ` --directory "C:\temp" ` --fileoutput "sales_detail.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Ntile" ` --distributekeycolumn "o.order_id" ` --paralleldegree 8 ` --merge "False" ``` ### Aggregated Data[​](#aggregated-data "Direct link to Aggregated Data") Export pre-aggregated data: ``` .\FastBCP.exe ` --connectiontype "pgsql" ` --server "localhost" ` --port "5432" ` --database "analytics" ` --user "postgres" ` --password "postgres" ` --query "SELECT date_trunc('day', order_date) as order_day, customer_region, COUNT(*) as order_count, SUM(total_amount) as total_sales FROM orders GROUP BY date_trunc('day', order_date), customer_region" ` --directory "C:\temp" ` --fileoutput "daily_sales_by_region.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd" ` --encoding "UTF-8" ` --parallelmethod "None" ``` ## Performance Tuning[​](#performance-tuning "Direct link to Performance Tuning") ### Optimal Parallel Degree[​](#optimal-parallel-degree "Direct link to Optimal Parallel Degree") * Auto-detect * Manual Use negative values to auto-calculate based on CPU cores: ``` # Use all cores minus 2 .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "LargeDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "BigTable" ` --directory "C:\temp" ` --fileoutput "bigtable.parquet" ` --parallelmethod "RangeId" ` --distributekeycolumn "id" ` --paralleldegree -2 ` --merge "False" ``` Specify exact thread count: ``` # Use exactly 16 threads .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "LargeDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "BigTable" ` --directory "C:\temp" ` --fileoutput "bigtable.parquet" ` --parallelmethod "RangeId" ` --distributekeycolumn "id" ` --paralleldegree 16 ` --merge "False" ``` ### Parquet RowGroup Size[​](#parquet-rowgroup-size "Direct link to Parquet RowGroup Size") To reduce memory pressure and, in many cases, improve export performance, you can configure the Parquet row group size by setting the `FASTBCP_RGSIZE` environment variable. A smaller `FASTBCP_RGSIZE` value reduces memory usage during export. However, this comes with a trade-off: smaller row groups may reduce Parquet compression efficiency and can sometimes increase the final file size. Recommended values range from `1000` to `1_000_000`. In practice, values between 32,000 and 64,000 often provide a good balance between memory usage, performance, and compression efficiency. * Windows * Linux ``` $Env:FASTBCP_RGSIZE=32000 .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "LargeDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "BigTable" ` --directory "C:\temp" ` --fileoutput "bigtable.parquet" ` --parallelmethod "RangeId" ` --distributekeycolumn "id" ` --paralleldegree -2 ` --merge "False" ``` Specify exact thread count: ``` export FASTBCP_RGSIZE=32000 .\FastBCP / --connectiontype "mssql" / --server "mssqlhost.domain.lan,1433" / --database "LargeDB" / --user "FastUSer" / --password "FastPassword" / --sourceschema "dbo" / --sourcetable "BigTable" / --directory "/data/export/bigtable/" / --fileoutput "bigtable.parquet" / --parallelmethod "RangeId" / --distributekeycolumn "id" / --paralleldegree 16 / --merge "False" ``` ### Merge vs No-Merge[​](#merge-vs-no-merge "Direct link to Merge vs No-Merge") * With Merge * Without Merge Combine parallel outputs into single file: ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "DataDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Data" ` --directory "C:\temp" ` --fileoutput "data_merged.parquet" ` --parallelmethod "RangeId" ` --distributekeycolumn "id" ` --paralleldegree 8 ` --merge "True" ``` **Result**: Single file `data_merged.parquet`, slower and only OnPremise. Keep separate files for parallel processing: ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "DataDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Data" ` --directory "C:\temp" ` --fileoutput "data_part.parquet" ` --parallelmethod "RangeId" ` --distributekeycolumn "id" ` --paralleldegree 8 ` --merge "False" ``` **Result**: Multiple files `data_part_Chunk000.parquet`, `data_part_Chunk001.parquet`, etc. ### Enable Debug Logging[​](#enable-debug-logging "Direct link to Enable Debug Logging") Get detailed execution information: ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "TestDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "TestTable" ` --directory "C:\temp" ` --fileoutput "debug_export.csv" ` --parallelmethod "Random" ` --distributekeycolumn "id" ` --paralleldegree 4 ` --merge "False" ` --loglevel "Debug" ` --runid "debug_test_run" ``` Debug Mode Use `--loglevel "Debug"` to see detailed execution steps, connection strings (without passwords), and query generation details. tip Build your command with the [Wizard](/latest/wizard.md) --- # Cloud Storage Examples Examples for exporting data directly to cloud storage platforms. ## AWS S3[​](#aws-s3 "Direct link to AWS S3") Export data directly to Amazon S3 buckets using date-based placeholders. ### S3 with Date Placeholders[​](#s3-with-date-placeholders "Direct link to S3 with Date Placeholders") Automatically organize files by date using placeholder tokens: ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "DailySales" ` --directory "s3://my-bucket/data/sales/full/" ` --fileoutput "sales.parquet" ` --parallelmethod "RangeId" ` --distributekeycolumn "sale_id" ` --paralleldegree 8 ` --runid "sales_to_s3_daily" ``` ### S3 with Nested Structure[​](#s3-with-nested-structure "Direct link to S3 with Nested Structure") Create hierarchical folder structures: ``` .\FastBCP.exe ` --connectiontype "pgsql" ` --server "localhost" ` --port "5432" ` --database "ecommerce" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "orders" ` --directory "s3://analytics-bucket/exports/orders/" ` --fileoutput "orders.parquet" ` --parallelmethod "DataDriven" ` --distributekeycolumn "o_orderdate" ` --paralleldegree 10 ` --merge "True" ``` ### S3 with CSV Format[​](#s3-with-csv-format "Direct link to S3 with CSV Format") Export CSV files to S3 with manual date partitioning: ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "LogsDB" ` --trusted ` --query "SELECT * FROM ApplicationLogs WHERE log_date = '2024-05-01'" ` --directory "s3://logs-bucket/app-logs/appdate=2024-05-01/" ` --fileoutput "app_logs.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ``` ## Azure Blob Storage[​](#azure-blob-storage "Direct link to Azure Blob Storage") Export data to Azure Blob Storage containers. ### Azure with Date Partitioning[​](#azure-with-date-partitioning "Direct link to Azure with Date Partitioning") ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "AnalyticsDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Events" ` --directory "abs://mystorageaccount.blob.core.windows.net/datacontainer/events/full/" ` --fileoutput "events.parquet" ` --parallelmethod "Timepartition" ` --distributekeycolumn "event_timestamp(year,month)" ` --paralleldegree 10 ``` ### Azure Data Lake Gen2[​](#azure-data-lake-gen2 "Direct link to Azure Data Lake Gen2") Export to Azure Data Lake Storage Gen2: ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "AnalyticsDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Events" ` --directory "abfss://mystorageaccount.dfs.core.windows.net/datacontainer/events/full/" ` --fileoutput "events.parquet" ` --parallelmethod "Timepartition" ` --distributekeycolumn "event_timestamp(year,month)" ` --paralleldegree 10 ``` ## Hourly Exports[​](#hourly-exports "Direct link to Hourly Exports") Create exports with hourly granularity. ### Hourly Data Partition by Sensor with an incremental time range drived from outside[​](#hourly-data-partition-by-sensor-with-an-incremental-time-range-drived-from-outside "Direct link to Hourly Data Partition by Sensor with an incremental time range drived from outside") ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "StreamingDB" ` --trusted ` --query "SELECT * FROM SensorData WHERE reading_time >= '2024-02-03 14:00:00' and reading_time < '2024-02-03 15:00:00'" ` --directory "s3://iot-bucket/sensor-data/" ` --fileoutput "sensors_20240203140000_20240203150000.parquet" ` --parallelmethod "DataDriven" ` --distributekeycolumn "sensor_id" ` --datadrivenquery "SELECT sensor_id From SensorList" ` --paralleldegree 8 ` --runid "hourly_sensor_export_20240203140000_20240203150000" ``` ## Best for Cloud Exports[​](#best-for-cloud-exports "Direct link to Best for Cloud Exports") ### Performance Tips[​](#performance-tips "Direct link to Performance Tips") Parquet **Use Parquet for cloud storage**: Better compression and query performance, reduce network traffic Parallelism **Enable parallel execution when needed**: * if you need to split data on a business criteria * if you have a lots of data to extract Dynamic Parallel Degree Use negativ value for `--paralleldegree` to automatically set threads to (CPU cores / abs(degree)), leaving resources for other processes. eg `--paralleldegree -2` will use half of the core of the machine from where FastBCP is launched DataDriven Query \*\*Use `--datadrivenquery` to : * speedup the retrieval of the elements list to extract. * as a technic for incremental extraction by using a where in the `--datadrivenquery` instead of the main `--query` warning Keep the degree safe for your source, to avoid a total saturation. ### Example with All Best Practices[​](#example-with-all-best-practices "Direct link to Example with All Best Practices") ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "DataWarehouse" ` --trusted ` --sourceschema "dbo" ` --sourcetable "FactSales" ` --directory "s3://analytics-bucket/warehouse/sales/{sourcetable}" ` --fileoutput "FactSales.parquet" ` --parallelmethod "DataDriven" ` --datadrivenquery "SELECT ref_date from calendar where ref_date > cast(getdate()-30 as date)" ` --distributekeycolumn "sale_date" ` --paralleldegree -2 ` --runid "daily_sales_to_s3" ` --loglevel "Information" ``` tip Build your command with the [Wizard](/latest/wizard.md) --- # DB2 Examples Comprehensive examples for exporting data from IBM DB2 using the generic `odbc` connection type. DB2 ODBC Driver DB2 is not a native connection type, so FastBCP connects to it through ODBC. Install the IBM DB2 ODBC driver, then provide either a DSN (`--dsn`) or a full connection string (`--sourceconnectstring`) as shown below. ## Connection String[​](#connection-string "Direct link to Connection String") **Single-threaded export:** ``` .\FastBCP.exe ` --connectiontype "odbc" ` --sourceconnectstring "Driver={IBM DB2 ODBC DRIVER};Database=SAMPLE;Hostname=db2server.company.corp;Port=25010;Protocol=TCPIP;Uid=db2user;Pwd=password;CurrentSchema=DB2ADMIN" ` --query "SELECT * FROM DB2ADMIN.ORDERS" ` --directory "C:\temp" ` --fileoutput "db2_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` **Parallel export with Ntile method:** ``` .\FastBCP.exe ` --connectiontype "odbc" ` --sourceconnectstring "Driver={IBM DB2 ODBC DRIVER};Database=SAMPLE;Hostname=db2server.company.corp;Port=25010;Protocol=TCPIP;Uid=db2user;Pwd=password;CurrentSchema=DB2ADMIN" ` --query "SELECT * FROM DB2ADMIN.ORDERS" ` --directory "C:\temp" ` --fileoutput "db2_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Ntile" ` --distributekeycolumn "ORDER_ID" ` --paralleldegree -2 ` --merge "False" ``` **Parallel export with Random method:** ``` .\FastBCP.exe ` --connectiontype "odbc" ` --sourceconnectstring "Driver={IBM DB2 ODBC DRIVER};Database=SAMPLE;Hostname=db2server.company.corp;Port=25010;Protocol=TCPIP;Uid=db2user;Pwd=password;CurrentSchema=DB2ADMIN" ` --query "SELECT * FROM DB2ADMIN.ORDERS" ` --directory "C:\temp" ` --fileoutput "db2_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "ORDER_ID" ` --paralleldegree 8 ` --merge "False" ``` ## DSN Connection[​](#dsn-connection "Direct link to DSN Connection") If a DSN is already configured on the machine, you can use `--dsn` instead of `--sourceconnectstring`. ``` .\FastBCP.exe ` --connectiontype "odbc" ` --dsn "DB2_DSN" ` --query "SELECT * FROM DB2ADMIN.ORDERS" ` --directory "C:\temp" ` --fileoutput "db2_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` Quoting special identifiers If your DB2 schema or table name contains special characters (e.g. `HCR_BI."APER@XPSAHISTO"`), keep the double quotes around the identifier inside your `--query` value so DB2 treats it as a delimited identifier. tip Build your command with the [Wizard](/latest/wizard.md) --- # MySQL Examples Examples for exporting data from MySQL databases. ## Single-threaded Export[​](#single-threaded-export "Direct link to Single-threaded Export") Simple export without parallelization. ``` .\FastBCP.exe ` --connectiontype "mysql" ` --server "localhost" ` --port "3306" ` --database "test" ` --user "root" ` --password "password" ` --query "SELECT * FROM test_table LIMIT 1000" ` --directory "C:\temp" ` --fileoutput "mysql_test.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` ## Parallel Export - Random Method[​](#parallel-export---random-method "Direct link to Parallel Export - Random Method") Export using Random distribution. ``` .\FastBCP.exe ` --connectiontype "mysql" ` --server "localhost" ` --port "3306" ` --database "test" ` --user "root" ` --password "password" ` --sourceschema "test" ` --sourcetable "orders" ` --directory "C:\temp" ` --fileoutput "mysql_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "order_id" ` --paralleldegree 8 ` --merge "False" ` --runid "mysql_to_csv_parallel8_random" ``` ## Parallel Export - DataDriven Method[​](#parallel-export---datadriven-method "Direct link to Parallel Export - DataDriven Method") Export using DataDriven distribution based on distinct column values. ``` .\FastBCP.exe ` --connectiontype "mysql" ` --server "localhost" ` --port "3306" ` --database "test" ` --user "root" ` --password "password" ` --sourceschema "test" ` --sourcetable "orders" ` --directory "C:\temp" ` --fileoutput "mysql_orders_dd.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "DataDriven" ` --distributekeycolumn "status" ` --paralleldegree 10 ` --merge "False" ` --runid "mysql_to_csv_parallel10_datadriven" ``` ## Export to Parquet[​](#export-to-parquet "Direct link to Export to Parquet") Export MySQL data to Parquet format. ``` .\FastBCP.exe ` --connectiontype "mysql" ` --server "localhost" ` --port "3306" ` --database "test" ` --user "root" ` --password "password" ` --sourceschema "test" ` --sourcetable "orders" ` --directory "C:\temp" ` --fileoutput "mysql_orders.parquet" ` --parallelmethod "Random" ` --distributekeycolumn "order_id" ` --paralleldegree 6 ` --merge "False" ``` tip Build your command with the [Wizard](/latest/wizard.md) --- # Oracle Examples Comprehensive examples for exporting data from Oracle databases. ## Connection Types[​](#connection-types "Direct link to Connection Types") Oracle exports support multiple connection types: * **oraodp**: Native Oracle Data Provider (recommended) * **oledb**: Using Oracle OLEDB Provider (OraOLEDB) * **odbc**: Using ODBC DSN * **adbc\_oracle**: ADBC FastDriver — ultra-fast, Parquet-only export (see [ADBC Examples](#adbc-examples)) ADBC Support The `adbc_oracle` connection type uses the Arpe.io ADBC FastDriver for ultra-fast, Arrow-native Parquet exports, and also supports the `Rowid` parallel method. Output is Parquet-only — see the [ADBC Examples](#adbc-examples) section below. ## Single-threaded Export[​](#single-threaded-export "Direct link to Single-threaded Export") Simple export without parallelization. * Oracle Data Provider * OLEDB Provider ``` .\FastBCP.exe ` --connectiontype "oraodp" ` --server "localhost:1521/ORCLPDB1" ` --user "system" ` --password "password" ` --query "SELECT * FROM customers WHERE ROWNUM <= 1000" ` --directory "C:\temp" ` --fileoutput "oracle_customers.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` ``` .\FastBCP.exe ` --connectiontype "oledb" ` --provider "OraOLEDB.Oracle" ` --server "localhost:1521/ORCLPDB1" ` --user "system" ` --password "password" ` --query "SELECT * FROM customers WHERE ROWNUM <= 1000" ` --directory "C:\temp" ` --fileoutput "oracle_customers.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` ## Parallel Export - Rowid Method[​](#parallel-export---rowid-method "Direct link to Parallel Export - Rowid Method") Oracle-specific parallel export 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 exports and does not require a specific distribute key column. **Full table export:** ``` .\FastBCP.exe ` --connectiontype "oraodp" ` --server "localhost:1521/ORCLPDB1" ` --user "system" ` --password "password" ` --sourceschema "SYSTEM" ` --sourcetable "ORDERS" ` --directory "C:\temp" ` --fileoutput "oracle_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Rowid" ` --paralleldegree 8 ` --merge "False" ` --runid "oraodp_to_csv_parallel8_rowid" ``` **With query filter:** ``` .\FastBCP.exe ` --connectiontype "oraodp" ` --server "localhost:1521/ORCLPDB1" ` --user "system" ` --password "password" ` --query "SELECT * FROM SYSTEM.ORDERS WHERE order_date >= TO_DATE('2024-01-01', 'YYYY-MM-DD')" ` --directory "C:\temp" ` --fileoutput "oracle_orders_2024.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Rowid" ` --paralleldegree 8 ` --merge "False" ` --runid "oraodp_to_csv_parallel8_rowid_filtered" ``` ## Parallel Export - Random Method[​](#parallel-export---random-method "Direct link to Parallel Export - Random Method") Export using Random distribution with modulo operation. ``` .\FastBCP.exe ` --connectiontype "oraodp" ` --server "localhost:1521/ORCLPDB1" ` --user "system" ` --password "password" ` --sourceschema "SYSTEM" ` --sourcetable "ORDERS" ` --directory "C:\temp" ` --fileoutput "oracle_orders_random.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "order_id" ` --paralleldegree 8 ` --merge "False" ` --runid "oraodp_to_csv_parallel8_random" ``` ## Parallel Export - DataDriven Method[​](#parallel-export---datadriven-method "Direct link to Parallel Export - DataDriven Method") Export using DataDriven distribution based on distinct column values. ``` .\FastBCP.exe ` --connectiontype "oraodp" ` --server "localhost:1521/ORCLPDB1" ` --user "system" ` --password "password" ` --sourceschema "SYSTEM" ` --sourcetable "ORDERS" ` --directory "C:\temp" ` --fileoutput "oracle_orders_dd.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "DataDriven" ` --distributekeycolumn "order_status" ` --paralleldegree 10 ` --merge "False" ` --runid "oraodp_to_csv_parallel10_datadriven" ``` ## Export to Parquet[​](#export-to-parquet "Direct link to Export to Parquet") Export Oracle data to Parquet format. **Single-threaded:** ``` .\FastBCP.exe ` --connectiontype "oraodp" ` --server "localhost:1521/ORCLPDB1" ` --user "system" ` --password "password" ` --sourceschema "SYSTEM" ` --sourcetable "ORDERS" ` --directory "C:\temp" ` --fileoutput "oracle_orders.parquet" ` --parallelmethod "None" ``` **Parallel with Rowid:** ``` .\FastBCP.exe ` --connectiontype "oraodp" ` --server "localhost:1521/ORCLPDB1" ` --user "system" ` --password "password" ` --sourceschema "SYSTEM" ` --sourcetable "ORDERS" ` --directory "C:\temp" ` --fileoutput "oracle_orders.parquet" ` --parallelmethod "Rowid" ` --paralleldegree 10 ` --merge "False" ``` ## OLEDB Connection Examples[​](#oledb-connection-examples "Direct link to OLEDB Connection Examples") Using Oracle OLEDB Provider for connections. **Single-threaded:** ``` .\FastBCP.exe ` --connectiontype "oledb" ` --provider "OraOLEDB.Oracle" ` --server "localhost:1521/ORCLPDB1" ` --user "system" ` --password "password" ` --query "SELECT * FROM SYSTEM.ORDERS WHERE ROWNUM <= 10000" ` --directory "C:\temp" ` --fileoutput "oracle_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` **Parallel Random:** ``` .\FastBCP.exe ` --connectiontype "oledb" ` --provider "OraOLEDB.Oracle" ` --server "localhost:1521/ORCLPDB1" ` --user "system" ` --password "password" ` --query "SELECT * FROM SYSTEM.ORDERS" ` --directory "C:\temp" ` --fileoutput "oracle_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "order_id" ` --paralleldegree 6 ` --merge "False" ``` **Parallel DataDriven:** ``` .\FastBCP.exe ` --connectiontype "oledb" ` --provider "OraOLEDB.Oracle" ` --server "localhost:1521/ORCLPDB1" ` --user "system" ` --password "password" ` --query "SELECT * FROM SYSTEM.ORDERS" ` --directory "C:\temp" ` --fileoutput "oracle_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "DataDriven" ` --distributekeycolumn "order_status" ` --paralleldegree 6 ` --merge "False" ``` ## ADBC Examples[​](#adbc-examples "Direct link to ADBC Examples") The `adbc_oracle` connection type uses the Arpe.io ADBC FastDriver for ultra-fast, Arrow-native exports. **Output is Parquet-only**, and the `Rowid` parallel method is also supported — see [Connection Parameters](/1.2/documentation/cli/connection_parameters.md#connection-type) and [Parallel Parameters](/1.2/documentation/cli/parallel_parameters.md#parallel-method) for details. ``` ./FastBCP \ --connectiontype "adbc_oracle" \ --server "localhost:1521/orclpdb1" \ --user "MIG_EXPRESS" \ --password "FastPassword" \ --sourceschema "TPCH10" \ --sourcetable "LINEITEM" \ --directory "./" \ --fileoutput "{sourcetable}.parquet" \ --method "None" ``` tip Build your command with the [Wizard](/latest/wizard.md) --- # Other Databases Examples for exporting data from Clickhouse, SAP HANA, and Netezza databases. ## Clickhouse[​](#clickhouse "Direct link to Clickhouse") Export data from Clickhouse database. **Single-threaded export:** ``` .\FastBCP.exe ` --connectiontype "clickhouse" ` --server "localhost" ` --port "9000" ` --database "default" ` --user "default" ` --password "password" ` --query "SELECT * FROM orders LIMIT 1000" ` --directory "C:\temp" ` --fileoutput "clickhouse_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` **Parallel export with Random method:** ``` .\FastBCP.exe ` --connectiontype "clickhouse" ` --server "localhost" ` --port "9000" ` --database "default" ` --user "default" ` --password "password" ` --sourceschema "default" ` --sourcetable "orders" ` --directory "C:\temp" ` --fileoutput "clickhouse_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "order_id" ` --paralleldegree 8 ` --merge "False" ``` ## SAP HANA[​](#sap-hana "Direct link to SAP HANA") Export data from SAP HANA database using two connection types. ### HANA Connection Type[​](#hana-connection-type "Direct link to HANA Connection Type") Standard HANA connection for general exports. **Single-threaded export:** ``` .\FastBCP.exe ` --connectiontype "hana" ` --server "hanaserver:30015" ` --user "SYSTEM" ` --password "password" ` --query "SELECT * FROM ORDERS WHERE ORDER_DATE >= '2024-01-01'" ` --directory "C:\temp" ` --fileoutput "hana_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` **Parallel export with Random method:** ``` .\FastBCP.exe ` --connectiontype "hana" ` --server "hanaserver:30015" ` --user "SYSTEM" ` --password "password" ` --sourceschema "SYSTEM" ` --sourcetable "ORDERS" ` --directory "C:\temp" ` --fileoutput "hana_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "ORDER_ID" ` --paralleldegree 8 ` --merge "False" ``` ### HANA Export Connection Type[​](#hana-export-connection-type "Direct link to HANA Export Connection Type") Optimized HANA connection using native EXPORT functionality for faster bulk exports. HANA Export The `hanaexport` connection type uses SAP HANA's native EXPORT statement for optimized bulk data transfer. This is recommended for large datasets. **Single-threaded export:** ``` .\FastBCP.exe ` --connectiontype "hanaexport" ` --server "hanaserver:30015" ` --user "SYSTEM" ` --password "password" ` --query "SELECT * FROM ORDERS WHERE ORDER_DATE >= '2024-01-01'" ` --directory "C:\temp" ` --fileoutput "hana_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` **Parallel export with Random method:** ``` .\FastBCP.exe ` --connectiontype "hanaexport" ` --server "hanaserver:30015" ` --user "SYSTEM" ` --password "password" ` --sourceschema "SYSTEM" ` --sourcetable "ORDERS" ` --directory "C:\temp" ` --fileoutput "hana_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "ORDER_ID" ` --paralleldegree 8 ` --merge "False" ``` ## Netezza[​](#netezza "Direct link to Netezza") Export data from Netezza database using OLEDB provider. **Single-threaded export:** ``` .\FastBCP.exe ` --connectiontype "oledb" ` --provider "NZOLEDB" ` --server "netezza_server" ` --database "SYSTEM" ` --user "admin" ` --password "password" ` --query "SELECT * FROM orders" ` --directory "C:\temp" ` --fileoutput "netezza_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` **Parallel export with Random method:** ``` .\FastBCP.exe ` --connectiontype "oledb" ` --provider "NZOLEDB" ` --server "netezza_server" ` --database "SYSTEM" ` --user "admin" ` --password "password" ` --query "SELECT * FROM orders" ` --directory "C:\temp" ` --fileoutput "netezza_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "order_id" ` --paralleldegree 6 ` --merge "False" ``` **Parallel export with DataDriven method:** ``` .\FastBCP.exe ` --connectiontype "oledb" ` --provider "NZOLEDB" ` --server "netezza_server" ` --database "SYSTEM" ` --user "admin" ` --password "password" ` --query "SELECT * FROM orders" ` --directory "C:\temp" ` --fileoutput "netezza_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "DataDriven" ` --distributekeycolumn "region" ` --paralleldegree 6 ` --merge "False" ``` tip Build your command with the [Wizard](/latest/wizard.md) --- # Output Formats Examples demonstrating different output formats supported by FastBCP. ## CSV Format[​](#csv-format "Direct link to CSV Format") Standard comma/delimiter-separated values format. ### Basic CSV Export[​](#basic-csv-export "Direct link to Basic CSV Export") ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Sales" ` --directory "C:\temp" ` --fileoutput "sales.csv" ` --decimalseparator "." ` --delimiter "," ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` ### CSV with Custom Delimiter[​](#csv-with-custom-delimiter "Direct link to CSV with Custom Delimiter") Using pipe delimiter for better data separation: ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Sales" ` --directory "C:\temp" ` --fileoutput "sales.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "sale_id" ` --paralleldegree 8 ` --merge "False" ``` ### CSV with European Format[​](#csv-with-european-format "Direct link to CSV with European Format") Using comma as decimal separator (common in European countries): ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Sales" ` --directory "C:\temp" ` --fileoutput "sales_european.csv" ` --decimalseparator "," ` --delimiter ";" ` --dateformat "dd/MM/yyyy HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "sale_id" ` --paralleldegree 8 ` --merge "False" ``` ## Parquet Format[​](#parquet-format "Direct link to Parquet Format") Columnar storage format optimized for analytical queries. ### Basic Parquet Export[​](#basic-parquet-export "Direct link to Basic Parquet Export") ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Sales" ` --directory "C:\temp" ` --fileoutput "sales.parquet" ` --parallelmethod "None" ``` ### Parallel Parquet Export[​](#parallel-parquet-export "Direct link to Parallel Parquet Export") Maximize performance with parallel execution: ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Sales" ` --directory "C:\temp" ` --fileoutput "sales.parquet" ` --parallelmethod "RangeId" ` --distributekeycolumn "sale_id" ` --paralleldegree 12 ` --merge "False" ``` ### Parquet with PostgreSQL[​](#parquet-with-postgresql "Direct link to Parquet with PostgreSQL") ``` .\FastBCP.exe ` --connectiontype "pgcopy" ` --server "localhost" ` --port "5432" ` --database "salesdb" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "sales" ` --directory "C:\temp" ` --fileoutput "pg_sales.parquet" ` --parallelmethod "Ctid" ` --paralleldegree 10 ` --merge "False" ``` ### Parquet with Oracle[​](#parquet-with-oracle "Direct link to Parquet with Oracle") ``` .\FastBCP.exe ` --connectiontype "oraodp" ` --server "localhost:1521/ORCLPDB1" ` --user "system" ` --password "password" ` --sourceschema "SYSTEM" ` --sourcetable "SALES" ` --directory "C:\temp" ` --fileoutput "oracle_sales.parquet" ` --parallelmethod "Rowid" ` --paralleldegree 8 ` --merge "False" ``` ## Excel Format[​](#excel-format "Direct link to Excel Format") Export data to Microsoft Excel format (.xlsx). Excel Format Excel exports automatically format data for spreadsheet applications. Large datasets may be split across multiple sheets if they exceed Excel's row limits. ### Basic Excel Export[​](#basic-excel-export "Direct link to Basic Excel Export") ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Sales" ` --directory "C:\temp" ` --fileoutput "sales.xlsx" ` --parallelmethod "None" ``` ### Parallel Excel Export[​](#parallel-excel-export "Direct link to Parallel Excel Export") ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Sales" ` --directory "C:\temp" ` --fileoutput "sales.xlsx" ` --parallelmethod "RangeId" ` --distributekeycolumn "sale_id" ` --paralleldegree 6 ` --merge "False" ``` ### Excel with Custom Query[​](#excel-with-custom-query "Direct link to Excel with Custom Query") Export filtered data to Excel: ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --query "SELECT * FROM dbo.Sales WHERE sale_date >= '2024-01-01' AND sale_date < '2025-01-01'" ` --directory "C:\temp" ` --fileoutput "sales_2024.xlsx" ` --parallelmethod "Ntile" ` --distributekeycolumn "sale_id" ` --paralleldegree 4 ` --merge "False" ``` tip Build your command with the [Wizard](/latest/wizard.md) --- # PostgreSQL Examples Comprehensive examples for exporting data from PostgreSQL using native connectors (pgsql, pgcopy). ## Connection Types[​](#connection-types "Direct link to Connection Types") PostgreSQL exports support three connection types: * **pgsql**: Standard PostgreSQL protocol * **pgcopy**: PostgreSQL COPY protocol (fastest for bulk exports) * **adbc\_pgsql**: ADBC FastDriver — ultra-fast, Parquet-only export (see [ADBC Examples](#adbc-examples)) ADBC Support The `adbc_pgsql` connection type uses the Arpe.io ADBC FastDriver for ultra-fast, Arrow-native Parquet exports. Output is Parquet-only — see the [ADBC Examples](#adbc-examples) section below. ## Single-threaded Export[​](#single-threaded-export "Direct link to Single-threaded Export") Simple export without parallelization. * Standard Protocol * COPY Protocol ``` .\FastBCP.exe ` --connectiontype "pgsql" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --query "SELECT * FROM lineitem LIMIT 1000" ` --directory "C:\temp" ` --fileoutput "pg_lineitem.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` ``` .\FastBCP.exe ` --connectiontype "pgcopy" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --query "SELECT * FROM lineitem LIMIT 1000" ` --directory "C:\temp" ` --fileoutput "pg_lineitem.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` ## Parallel Export - Random Method[​](#parallel-export---random-method "Direct link to Parallel Export - Random Method") Export using Random distribution with modulo operation. * Standard Protocol * COPY Protocol ``` .\FastBCP.exe ` --connectiontype "pgsql" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --query "SELECT * FROM lineitem" ` --directory "C:\temp" ` --fileoutput "pg_lineitem_random.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "l_linenumber" ` --paralleldegree 8 ` --merge "False" ` --runid "pgsql_to_csv_parallel8_random" ``` ``` .\FastBCP.exe ` --connectiontype "pgcopy" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --query "SELECT * FROM lineitem" ` --directory "C:\temp" ` --fileoutput "pg_lineitem_random.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "l_linenumber" ` --paralleldegree 8 ` --merge "False" ` --runid "pgcopy_to_csv_parallel8_random" ``` ## Parallel Export - DataDriven Method[​](#parallel-export---datadriven-method "Direct link to Parallel Export - DataDriven Method") Export using DataDriven distribution based on distinct column values. * Standard Protocol * COPY Protocol ``` .\FastBCP.exe ` --connectiontype "pgsql" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "lineitem" ` --directory "C:\temp" ` --fileoutput "pg_lineitem_dd.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "DataDriven" ` --distributekeycolumn "l_shipmode" ` --paralleldegree 10 ` --merge "False" ` --runid "pgsql_to_csv_parallel10_datadriven" ``` ``` .\FastBCP.exe ` --connectiontype "pgcopy" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "lineitem" ` --directory "C:\temp" ` --fileoutput "pg_lineitem_dd.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "DataDriven" ` --distributekeycolumn "l_shipmode" ` --paralleldegree 10 ` --merge "False" ` --runid "pgcopy_to_csv_parallel10_datadriven" ``` ## Parallel Export - Ntile Method[​](#parallel-export---ntile-method "Direct link to Parallel Export - Ntile Method") Export using Ntile for evenly distributed chunks. * Standard Protocol * COPY Protocol **Full table:** ``` .\FastBCP.exe ` --connectiontype "pgsql" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "lineitem" ` --directory "C:\temp" ` --fileoutput "pg_lineitem_ntile.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Ntile" ` --distributekeycolumn "l_orderkey" ` --paralleldegree 12 ` --merge "False" ` --runid "pgsql_to_csv_parallel12_ntile" ``` **With query filter:** ``` .\FastBCP.exe ` --connectiontype "pgsql" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --query "SELECT * FROM lineitem WHERE l_shipdate BETWEEN '1995-01-01' AND '1995-12-31'" ` --directory "C:\temp" ` --fileoutput "pg_lineitem_ntile.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Ntile" ` --distributekeycolumn "l_orderkey" ` --paralleldegree 12 ` --merge "False" ` --runid "pgsql_to_csv_parallel12_ntile_filtered" ``` **Full table:** ``` .\FastBCP.exe ` --connectiontype "pgcopy" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "lineitem" ` --directory "C:\temp" ` --fileoutput "pg_lineitem_ntile.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Ntile" ` --distributekeycolumn "l_orderkey" ` --paralleldegree 12 ` --merge "False" ` --runid "pgcopy_to_csv_parallel12_ntile" ``` **With query filter:** ``` .\FastBCP.exe ` --connectiontype "pgcopy" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --query "SELECT * FROM lineitem WHERE l_shipdate BETWEEN '1995-01-01' AND '1995-12-31'" ` --directory "C:\temp" ` --fileoutput "pg_lineitem_ntile.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Ntile" ` --distributekeycolumn "l_orderkey" ` --paralleldegree 12 ` --merge "False" ` --runid "pgcopy_to_csv_parallel12_ntile_filtered" ``` ## Parallel Export - Ctid Method[​](#parallel-export---ctid-method "Direct link to Parallel Export - Ctid Method") PostgreSQL-specific parallel export using physical row identifier (ctid). PostgreSQL-Specific The Ctid method is unique to PostgreSQL and uses the physical row identifier for parallel data distribution. This is very efficient for full table exports. * Standard Protocol * COPY Protocol ``` .\FastBCP.exe ` --connectiontype "pgsql" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "lineitem" ` --directory "C:\temp" ` --fileoutput "pg_lineitem_ctid.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Ctid" ` --paralleldegree 8 ` --merge "False" ` --runid "pgsql_to_csv_parallel8_ctid" ``` ``` .\FastBCP.exe ` --connectiontype "pgcopy" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "lineitem" ` --directory "C:\temp" ` --fileoutput "pg_lineitem_ctid.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Ctid" ` --paralleldegree 8 ` --merge "False" ` --runid "pgcopy_to_csv_parallel8_ctid" ``` ## Export to Parquet[​](#export-to-parquet "Direct link to Export to Parquet") Export PostgreSQL data to Parquet format. * Standard Protocol * COPY Protocol **Single-threaded:** ``` .\FastBCP.exe ` --connectiontype "pgsql" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "lineitem" ` --directory "C:\temp" ` --fileoutput "pg_lineitem.parquet" ` --parallelmethod "None" ``` **Parallel with Ctid:** ``` .\FastBCP.exe ` --connectiontype "pgsql" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "lineitem" ` --directory "C:\temp" ` --fileoutput "pg_lineitem.parquet" ` --parallelmethod "Ctid" ` --paralleldegree 10 ` --merge "False" ``` **Single-threaded:** ``` .\FastBCP.exe ` --connectiontype "pgcopy" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "lineitem" ` --directory "C:\temp" ` --fileoutput "pg_lineitem.parquet" ` --parallelmethod "None" ``` **Parallel with Ctid:** ``` .\FastBCP.exe ` --connectiontype "pgcopy" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "lineitem" ` --directory "C:\temp" ` --fileoutput "pg_lineitem.parquet" ` --parallelmethod "Ctid" ` --paralleldegree 10 ` --merge "False" ``` ## ODBC Connection[​](#odbc-connection "Direct link to ODBC Connection") Using ODBC DSN for PostgreSQL connection. **Single-threaded:** ``` .\FastBCP.exe ` --connectiontype "odbc" ` --dsn "PostgreSQL_DSN" ` --directory "C:\temp" ` --fileoutput "pg_test.csv" ` --query "SELECT * FROM public.test_table" ` --parallelmethod "None" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ``` **Parallel Random:** ``` .\FastBCP.exe ` --connectiontype "odbc" ` --dsn "PostgreSQL_DSN" ` --directory "C:\temp" ` --fileoutput "pg_test.csv" ` --query "SELECT * FROM public.test_table" ` --parallelmethod "Random" ` --distributekeycolumn "id" ` --paralleldegree 6 ` --merge "False" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ``` **Parallel DataDriven:** ``` .\FastBCP.exe ` --connectiontype "odbc" ` --dsn "PostgreSQL_DSN" ` --directory "C:\temp" ` --fileoutput "pg_test.csv" ` --query "SELECT * FROM public.test_table" ` --parallelmethod "DataDriven" ` --distributekeycolumn "category" ` --paralleldegree 6 ` --merge "False" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ``` ## ADBC Examples[​](#adbc-examples "Direct link to ADBC Examples") The `adbc_pgsql` connection type uses the Arpe.io ADBC FastDriver for ultra-fast, Arrow-native exports. **Output is Parquet-only** — see [Connection Parameters](/1.2/documentation/cli/connection_parameters.md#connection-type) for details. ``` ./FastBCP \ --connectiontype "adbc_pgsql" \ --server "localhost:5432" \ --user "pytabextract_pguser" \ --password "FastPassword" \ --database "tpch" \ --sourceschema "tpch10" \ --sourcetable "lineitem" \ --directory "./" \ --fileoutput "{sourcetable}.parquet" \ --method "None" ``` tip Build your command with the [Wizard](/latest/wizard.md) --- # SQL Server Examples Comprehensive examples for exporting data from SQL Server (MSSQL, OLEDB, ODBC). ADBC Support SQL Server also supports the `adbc_mssql` connection type, powered by the Arpe.io ADBC FastDriver for ultra-fast, Arrow-native Parquet exports. Output is Parquet-only — see the [ADBC Examples](#adbc-examples) section below. ## Single-threaded Export[​](#single-threaded-export "Direct link to Single-threaded Export") Simple export without parallelization for smaller datasets. ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "FASTExportData" ` --trusted ` --query "SELECT top 1000 * FROM dbo.TEST_71_1M_12m" ` --directory "C:\temp" ` --fileoutput "TEST1000.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` ## Parallel Export - Random Method[​](#parallel-export---random-method "Direct link to Parallel Export - Random Method") Export using Random distribution based on modulo operation. * Windows Authentication * SQL Authentication ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "FASTExportData" ` --trusted ` --query "SELECT * FROM dbo.TEST_71_1M_12m" ` --directory "C:\temp" ` --fileoutput "TEST_71c_1Mr.csv" ` --decimalseparator "," ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "ID_ARTICLE" ` --paralleldegree 8 ` --merge "False" ` --runid "mssql_to_csv_parallel8_random" ``` ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "FASTExportData" ` --user "FastUser" ` --password "FastPassword" ` --query "SELECT * FROM dbo.TEST_71_1M_12m" ` --directory "C:\temp" ` --fileoutput "TEST_71c_1Mr.csv" ` --decimalseparator "," ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "ID_ARTICLE" ` --paralleldegree 8 ` --merge "False" ` --runid "mssql_to_csv_parallel8_random" ``` ## Parallel Export - RangeId Method[​](#parallel-export---rangeid-method "Direct link to Parallel Export - RangeId Method") Export using RangeId distribution for evenly distributed integer keys. **Using table name:** ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "tpch10_collation_bin2" ` --trusted ` --sourceschema "dbo" ` --sourcetable "orders" ` --directory "D:\temp" ` --fileoutput "mssql_orders.csv" ` --decimalseparator "," ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "RangeId" ` --distributekeycolumn "o_orderkey" ` --paralleldegree -2 ` --merge "False" ` --runid "mssql_to_csv_parallel-2_rangeid" ``` **Using query with filter:** ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "tpch10_collation_bin2" ` --trusted ` --query "select * from orders WHERE o_orderdate between '19950101' and '19951231'" ` --directory "D:\temp" ` --fileoutput "mssql_orders.csv" ` --decimalseparator "," ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "RangeId" ` --distributekeycolumn "o_orderkey" ` --paralleldegree -2 ` --merge "False" ` --runid "mssql_to_csv_parallel-2_rangeid_using_query" ``` ## Parallel Export - Ntile Method[​](#parallel-export---ntile-method "Direct link to Parallel Export - Ntile Method") Export using Ntile distribution for evenly distributed chunks. **Full table export:** ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "tpch10_collation_bin2" ` --trusted ` --sourceschema "dbo" ` --sourcetable "orders" ` --directory "D:\temp" ` --fileoutput "mssql_orders.csv" ` --decimalseparator "," ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Ntile" ` --distributekeycolumn "o_orderkey" ` --paralleldegree 12 ` --merge "False" ` --runid "mssql_to_csv_parallel12_Ntile" ``` **Filtered export with date column:** ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "tpch10_collation_bin2" ` --trusted ` --query "select * from orders WHERE o_orderdate between '19950101' and '19951231'" ` --directory "D:\temp" ` --fileoutput "mssql_orders.csv" ` --decimalseparator "," ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Ntile" ` --distributekeycolumn "o_orderdate" ` --paralleldegree 12 ` --merge "False" ` --runid "mssql_to_csv_parallel12_Ntile_using_query" ``` ## Parallel Export - DataDriven Method[​](#parallel-export---datadriven-method "Direct link to Parallel Export - DataDriven Method") Export using DataDriven distribution based on distinct values of a column. **Using partition function:** ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "tpch10_collation_bin2" ` --directory "D:\temp" ` --fileoutput "mssql_orders.csv" ` --trusted ` --sourceschema "dbo" ` --sourcetable "orders_part" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "DataDriven" ` --distributekeycolumn "`$partition.PF_DATE(o_orderdate)" ` --merge "False" ` --paralleldegree 10 ``` ## Export to Parquet[​](#export-to-parquet "Direct link to Export to Parquet") Export SQL Server data to Parquet format. **Single-threaded:** ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "faker" ` --trusted ` --sourceschema "dbo" ` --sourcetable "faker_s1000" ` --directory "D:\temp" ` --fileoutput "mssql_faker_s1000.parquet" ` --parallelmethod "None" ` --runid "mssql_to_parquet_NoParallel" ``` **Parallel with RangeId:** ``` .\FastBCP.exe ` --connectiontype "mssql" ` --trusted ` --server "localhost" ` --database "tpch10_collation_bin2" ` --directory "D:\temp" ` --fileoutput "mssql_orders.parquet" ` --parallelmethod "RangeId" ` --distributekeycolumn "o_orderkey" ` --paralleldegree 7 ` --sourceschema "dbo" ` --sourcetable "orders" ` --merge "False" ``` **Parallel with Ntile and query:** ``` .\FastBCP.exe ` --connectiontype "mssql" ` --trusted ` --server "localhost" ` --database "tpch10_collation_bin2" ` --directory "D:\temp" ` --fileoutput "mssql_orders_1995.parquet" ` --parallelmethod "Ntile" ` --distributekeycolumn "o_orderkey" ` --paralleldegree 7 ` --query "select * from dbo.orders where o_orderdate between '1995-01-01' and '1995-12-31'" ` --merge "False" ``` ## OLEDB Connection[​](#oledb-connection "Direct link to OLEDB Connection") Alternative connection method using OLEDB provider. **Single-threaded:** ``` $query="SELECT top 10000 * FROM FASTExportData.dbo.TEST_71_1M_12m" $target="localhost" .\FastBCP.exe ` --connectiontype "oledb" ` --provider "MSOLEDBSQL" ` --server $target ` --directory "C:\temp" ` --fileoutput "TEST.CSV" ` --paralleldegree 1 ` --trusted ` --query $query ` --parallelmethod "None" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ``` **Parallel Random with Windows Auth:** ``` .\FastBCP.exe ` --connectiontype "oledb" ` --provider "MSOLEDBSQL" ` --server $target ` --directory "C:\temp" ` --fileoutput "TEST.CSV" ` --paralleldegree 6 ` --trusted ` --query $query ` --parallelmethod "Random" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --distributekeycolumn "ID_ARTICLE" ` --merge "False" ``` **Parallel Random with SQL Auth:** ``` .\FastBCP.exe ` --connectiontype "oledb" ` --provider "MSOLEDBSQL" ` --server $target ` --directory "C:\temp" ` --fileoutput "TEST.CSV" ` --paralleldegree 6 ` --user "FastUser" ` --password "FastPassword" ` --query $query ` --parallelmethod "Random" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --distributekeycolumn "ID_ARTICLE" ` --merge "False" ``` **Parallel DataDriven:** ``` .\FastBCP.exe ` --connectiontype "oledb" ` --provider "MSOLEDBSQL" ` --server $target ` --directory "C:\temp" ` --fileoutput "TEST.CSV" ` --paralleldegree 6 ` --trusted ` --query $query ` --parallelmethod "DataDriven" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --distributekeycolumn "ID_DECOUPE_GEO" ` --merge "False" ``` ## ODBC Connection[​](#odbc-connection "Direct link to ODBC Connection") Using ODBC DSN for connection. **Single-threaded:** ``` .\FastBCP.exe ` --connectiontype "odbc" ` --dsn "DSN4FastBCP" ` --directory "C:\temp" ` --fileoutput "TEST.CSV" ` --paralleldegree 1 ` --trusted ` --query "SELECT * FROM [TEST_71_1M_12m]" ` --parallelmethod "None" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ``` **Parallel Random with Windows Auth:** ``` .\FastBCP.exe ` --connectiontype "odbc" ` --dsn "DSN4FastBCP" ` --directory "C:\temp" ` --fileoutput "TEST.CSV" ` --paralleldegree 6 ` --trusted ` --query "SELECT * FROM [TEST_71_1M_12m]" ` --parallelmethod "Random" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --distributekeycolumn "ID_ARTICLE" ` --merge "False" ``` **Parallel Random with SQL Auth:** ``` .\FastBCP.exe ` --connectiontype "odbc" ` --dsn "DSN4FastBCP" ` --directory "C:\temp" ` --fileoutput "TEST.CSV" ` --paralleldegree 6 ` --user "FastUser" ` --password "FastPassword" ` --query "SELECT * FROM [TEST_71_1M_12m]" ` --parallelmethod "Random" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --distributekeycolumn "ID_ARTICLE" ` --merge "False" ``` **Parallel DataDriven:** ``` .\FastBCP.exe ` --connectiontype "odbc" ` --dsn "DSN4FastBCP" ` --directory "C:\temp" ` --fileoutput "TEST.CSV" ` --paralleldegree 6 ` --trusted ` --query "SELECT * FROM [TEST_71_1M_12m]" ` --parallelmethod "DataDriven" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --distributekeycolumn "ID_GEO" ` --merge "False" ``` ## ADBC Examples[​](#adbc-examples "Direct link to ADBC Examples") The `adbc_mssql` connection type uses the Arpe.io ADBC FastDriver for ultra-fast, Arrow-native exports. **Output is Parquet-only** — see [Connection Parameters](/1.2/documentation/cli/connection_parameters.md#connection-type) for details. **Single-threaded export:** ``` ./FastBCP \ --connectiontype "adbc_mssql" \ --server "localhost,1433" \ --database "tpch" \ --user "migadmin" \ --password "FastPassword" \ --sourceschema "tpch10" \ --sourcetable "lineitem" \ --directory "./" \ --fileoutput "{sourcetable}.parquet" \ --method "None" ``` **Parallel export with RangeId and license file:** ``` .\FastBCP.exe ` --connectiontype "adbc_mssql" ` --server "localhost" ` --trusted ` --database "TPCH_SF100_NOBACKUP" ` --sourceschema "dbo" ` --sourcetable "lineitem_ci" ` --fileoutput "{sourcetable}.parquet" ` --directory "B:\export\{sourcetable}\" ` --parquetcompression "None" ` --parallelmethod "RangeId" ` --distributekeycolumn "l_orderkey" ` --degree 32 ` --runid "1.2.0" ` --licence "C:\Sources\FastBCP\FastBCP_AetP.lic" ``` tip Build your command with the [Wizard](/latest/wizard.md) --- # Configuration Examples Here are sample configuration files for different logging scenarios: ## FastBCP\_Settings.json : Sinks on Console + Files (Windows path style) + MSSQL[​](#fastbcp_settingsjson---sinks-on-console--files-windows-path-style--mssql "Direct link to FastBCP_Settings.json : Sinks on Console + Files (Windows path style) + MSSQL") For logs with Console + Files stored on Windows machine + MSSQL sinks: ``` { "ConnectionStrings": { "MS_FastBCPLogs": "Server=localhost;Database=FastBCPLogs;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\\FastBCP_.json", "retainedFileCountLimit": 10, "rollingInterval": "Day", "rollOnFileSizeLimit": true } }, { "Name": "MSSqlServer", "Args": { "connectionString": "MS_FastBCPLogs", "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": "FastBCP" } } } ``` ## FastBCP\_Settings\_Linux\_Console\_Files.json[​](#fastbcp_settings_linux_console_filesjson "Direct link to FastBCP_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/FastBCP_.json", "retainedFileCountLimit": 10, "rollingInterval": "Day", "rollOnFileSizeLimit": true } } ], "Enrich": [ "FromLogContext", "WithMachineName", "WithProcessId", "WithThreadId" ], "Properties": { "Application": "FastBCP" } } } ``` ## FastBCP\_Settings\_Map\_for\_Windows.json[​](#fastbcp_settings_map_for_windowsjson "Direct link to FastBCP_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}\\FastBCP-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": "FastBCP" } } } ``` ## FastBCP\_Settings\_Map\_for\_Linux\_and\_Container.json[​](#fastbcp_settings_map_for_linux_and_containerjson "Direct link to FastBCP_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}/FastBCP-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": "FastBCP" } } } ``` ## FastBCP\_Settings\_Log\_to\_PGSQL.json : Console + PostgreSQL log database[​](#fastbcp_settings_log_to_pgsqljson--console--postgresql-log-database "Direct link to FastBCP_Settings_Log_to_PGSQL.json : Console + PostgreSQL log database") ``` { "ConnectionStrings": { "PG_FastBCPLogs": "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_FastBCPLogs", "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": "FastBCP" } } } ``` ## FastBCP\_Settings\_OpenTelemetry.json[​](#fastbcp_settings_opentelemetryjson "Direct link to FastBCP_Settings_OpenTelemetry.json") For Console with trace correlation and OpenTelemetry log export (e.g., to [Jaeger](https://www.jaegertracing.io/)): ``` { "Serilog": { "MinimumLevel": { "Default": "Debug", "Override": { "Microsoft": "Warning", "System": "Warning" } }, "Properties": { "LogDirectory": "logs" }, "Enrich": [ "FromLogContext", "WithEnvironmentUserName", "WithProcessId", "WithThreadId", "WithMachineName", "fulltargetname" ], "WriteTo": [ { "Name": "Console", "Args": { "restrictedToMinimumLevel": "Information", "outputTemplate": "{Timestamp:yyyy-MM-ddTHH:mm:ss.fff zzz} -|- {Application} -|- {Level:u12} -|- {fulltargetname} -|- TraceId={TraceId} SpanId={SpanId} -|- {Message}{NewLine}{Exception}", "theme": "Serilog.Sinks.SystemConsole.Themes.SystemConsoleTheme::Literate, Serilog.Sinks.Console" } }, { "Name": "OpenTelemetry", "Args": { "Endpoint": "http://localhost:4317", "Protocol": "Grpc", "ResourceAttributes": { "service.name": "FastBCP", "deployment.environment": "local-test" } } } ] } } ``` Usage with the `--traceparent` parameter to correlate with an upstream caller: ``` ./FastBCP \ --connectiontype mssql \ --server localhost \ --database "tpch10" \ --trusted \ --query "SELECT * FROM dbo.orders" \ --directory "/data/temp" \ --fileoutput "orders.csv" \ --traceparent "00-abcdef1234567890abcdef1234567890-1234567890abcdef-01" \ --settingsfile "/config/FastBCP_Settings_OpenTelemetry.json" ``` **Result in Jaeger UI:** ![FastBCP OpenTelemetry result in Jaeger UI](/assets/images/FastBCP_OpenTelemetry_result_sample-729a1de4f4ccde92a0856f3f4e8b9468.jpg) --- # Log Database FastBCP 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 `FastBCP_settings.json` * You can specify a custom settings file using the `--settingsfile` parameter Information **Log table is created automatically if not exists but it is not indexed.** Up to you to choose you indexed column(s) you prefer to index. We Advice you to index event\_timestamp column and run\_id Information No internal purge of the log table, it is up to you to decide when and how filter the log table Complete configuration examples for both MSSQL and PostgreSQL are available in the [Configuration Examples](/1.2/documentation/logging/examples.md#fastbcp_settingsjson-for-windows) page. Information **In case the database is not reachable, FastBCP will fail and will refuse to continue.** If you want to continue without logging in the database, you can rename the `FastBCP_settings.json` file to something else (like `FastBCP_settings.json.save`) and FastBCP 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 ***FastBCP\_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}/FastBCP-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**: [FastBCP\_Settings\_Map\_for\_Windows.json](/1.2/documentation/logging/examples.md#fastbcp_settings_map_for_windowsjson) * **Linux/Container**: [FastBCP\_Settings\_Map\_for\_Linux\_and\_Container.json](/1.2/documentation/logging/examples.md#fastbcp_settings_map_for_linux_and_containerjson) --- # Log Levels FastBCP 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 | | **Critical** | Severe errors causing termination | Fatal application errors | ## Configuration[​](#configuration "Direct link to Configuration") You can also configure the log level in the `FastBCP_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\\FastBCP_.json", "rollingInterval": "Day" } } ] } } ``` --- # OpenTelemetry FastBCP supports [OpenTelemetry](https://opentelemetry.io/) for distributed tracing and log correlation. This allows you to correlate FastBCP operations with upstream callers (orchestrators, APIs, pipelines) and export structured logs to any OpenTelemetry-compatible backend such as [Jaeger](https://www.jaegertracing.io/), [Zipkin](https://zipkin.io/), or [Grafana Tempo](https://grafana.com/oss/tempo/). ## The `--traceparent` Parameter[​](#the---traceparent-parameter "Direct link to the---traceparent-parameter") The `--traceparent` parameter accepts a [W3C Trace Context](https://www.w3.org/TR/trace-context/) traceparent identifier. When provided, FastBCP uses this trace context to link its internal spans and logs to the calling system's trace, enabling end-to-end distributed tracing. **Syntax:** * Long form only: `--traceparent ""` **Format:** The traceparent value follows the W3C Trace Context specification: ``` {version}-{trace-id}-{parent-id}-{trace-flags} ``` | Field | Format | Description | | --------------- | ------------- | --------------------------------------------- | | **version** | 2 hex digits | Version of the trace context (currently `00`) | | **trace-id** | 32 hex digits | Globally unique trace identifier | | **parent-id** | 16 hex digits | Identifier of the calling span | | **trace-flags** | 2 hex digits | Trace flags (e.g., `01` for sampled) | **Example:** * Windows * Linux ``` .\FastBCP.exe ` ... --traceparent "00-abcdef1234567890abcdef1234567890-1234567890abcdef-01" ` ... ``` ``` ./FastBCP \ ... --traceparent "00-abcdef1234567890abcdef1234567890-1234567890abcdef-01" \ ... ``` Tips Pass the traceparent from your orchestrator (Airflow, Kestra, CI/CD pipeline, or any OpenTelemetry-instrumented caller) so that FastBCP operations appear as child spans in your distributed traces. ## Configuring the OpenTelemetry Endpoint[​](#configuring-the-opentelemetry-endpoint "Direct link to Configuring the OpenTelemetry Endpoint") FastBCP uses the Serilog OpenTelemetry sink to export logs. You can configure the endpoint using either **environment variables** or a **`FastBCP_Settings.json`** file. ### Using Environment Variables[​](#using-environment-variables "Direct link to Using Environment Variables") Set the `OTEL_EXPORTER_OTLP_ENDPOINT` environment variable to point to your OpenTelemetry collector: * Windows * Linux ``` $env:OTEL_EXPORTER_OTLP_ENDPOINT = "http://localhost:4317" ``` ``` export OTEL_EXPORTER_OTLP_ENDPOINT="http://localhost:4317" ``` ### Using `FastBCP_Settings.json`[​](#using-fastbcp_settingsjson "Direct link to using-fastbcp_settingsjson") Add the OpenTelemetry sink to the `WriteTo` section of your `FastBCP_Settings.json` file. This gives you full control over the protocol, endpoint, and resource attributes. ``` { "Serilog": { "MinimumLevel": { "Default": "Debug", "Override": { "Microsoft": "Warning", "System": "Warning" } }, "Properties": { "LogDirectory": "logs" }, "Enrich": [ "FromLogContext", "WithEnvironmentUserName", "WithProcessId", "WithThreadId", "WithMachineName", "fulltargetname" ], "WriteTo": [ { "Name": "Console", "Args": { "restrictedToMinimumLevel": "Information", "outputTemplate": "{Timestamp:yyyy-MM-ddTHH:mm:ss.fff zzz} -|- {Application} -|- {Level:u12} -|- {fulltargetname} -|- TraceId={TraceId} SpanId={SpanId} -|- {Message}{NewLine}{Exception}", "theme": "Serilog.Sinks.SystemConsole.Themes.SystemConsoleTheme::Literate, Serilog.Sinks.Console" } }, { "Name": "OpenTelemetry", "Args": { "Endpoint": "http://localhost:4317", "Protocol": "Grpc", "ResourceAttributes": { "service.name": "FastBCP", "deployment.environment": "local-test" } } } ] } } ``` **Key settings in the OpenTelemetry sink:** | Setting | Description | | ---------------------- | ----------------------------------------------------------------------------- | | **Endpoint** | URL of your OpenTelemetry collector (default: `http://localhost:4317`) | | **Protocol** | Transport protocol: `Grpc` (default) or `HttpProtobuf` | | **ResourceAttributes** | Key-value pairs attached to every log entry (e.g., service name, environment) | Information The `TraceId` and `SpanId` fields in the console output template allow you to see trace correlation directly in the console logs, even without an OpenTelemetry backend. note When both an environment variable and a `FastBCP_Settings.json` configuration are present, the settings file takes precedence for the OpenTelemetry sink configuration. --- # Logging Overview ## Parameter Logs targets using FastBCP\_settings.json[​](#parameter-logs-targets-using-fastbcp_settingsjson "Direct link to Parameter Logs targets using FastBCP_settings.json") In FastBCP can log informations in 3 modes : * **[Console](/1.2/documentation/logging/logs-level.md)** * **[Database (MSSQL and PostgreSQL Only)](/1.2/documentation/logging/log-database.md)** * **[File (or Map)](/1.2/documentation/logging/log-files-names-mapping-using-variables.md)** FastBCP also supports **[OpenTelemetry](/1.2/documentation/logging/OpenTelemetry.md)** for distributed tracing and log export to any OpenTelemetry-compatible backend. Tips You can use several targets (sinks) at the same time. You can adapt what and where you want to log using the `FastBCP_settings.json` file. By default if no custom path is provided, FastBCP looks for the settings file in : * the current directory (the working directory) * the same directory where the FastBCP executable is located (the executable directory). If this file is not present, FastBCP will use the console log only. You can specify a custom path to the settings file using the `-f` or `--settingsfile` parameter. * Windows * Linux ``` .\FastBCP.exe ` --connectiontype mssql ` --server localhost ` --database "tpch10_collation_bin2" ` --trusted ` --query "SELECT * FROM dbo.orders" ` --directory "D:\temp" ` --fileoutput "mssql_orders.csv" ` --parallelmethod Ntile ` --distributekeycolumn "o_orderkey" ` --paralleldegree 7 ` --settingsfile "D:\logs\config\FastBCP_settings.json" ``` ``` ./FastBCP \ --connectiontype mssql \ --server localhost \ --database "tpch10_collation_bin2" \ --trusted \ --query "SELECT * FROM dbo.orders" \ --directory "/data/temp" \ --fileoutput "mssql_orders.csv" \ --parallelmethod Ntile \ --distributekeycolumn "o_orderkey" \ --paralleldegree 7 \ --settingsfile "/etc/fastbcp/FastBCP_settings.json" ``` Some settings files samples can be found in the [Configuration Examples](/1.2/documentation/logging/examples.md) page. --- # Installation ## Instructions[​](#instructions "Direct link to Instructions") * Windows * Linux * Docker/MacOS To start using FastBCP, first **[request a trial](https://arpe.io/get-trial?product=FastBCP)** to download the latest version. Once downloaded, unzip FastBCP to a directory of your choice. ``` Expand-Archive -Path .\FastBCP.zip -DestinationPath .\FastBCP ``` You can verify the installation by checking the version: ``` .\FastBCP.exe --version ``` To start using FastBCP, first **[request a trial](https://arpe.io/get-trial?product=FastBCP)** to download the latest version. Once downloaded, unzip FastBCP to a directory of your choice. ``` unzip FastBCP.zip -d FastBCP ``` On **Linux**, you need to give execution rights to the FastBCP binary: ``` chmod +x FastBCP ```
You can verify the installation by checking the version: ``` ./FastBCP --version ``` FastBCP is available as a Docker image on **[Docker Hub](https://hub.docker.com/repository/docker/arpeio/fastbcp/general)**. Pull the latest version: ``` docker pull arpeio/fastbcp ``` Or pull a specific version: ``` docker pull arpeio/fastbcp:v0.0.0 ``` You can verify the installation by checking the version: ``` docker run --rm arpeio/fastbcp:latest --version ```
**You are now ready to run FastBCP.** License Information After the trial period you will need a valid license. By default, FastBCP will try to find a `FastBCP.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 FastBCP : | 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 in order to use it with ODBC or OLEDB connection type. --- # Apache Airflow [Apache Airflow](https://airflow.apache.org/) is a powerful open-source platform for developing, scheduling, and monitoring batch-oriented workflows. FastBCP 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") FastBCP provides an official Docker image available on Docker Hub: **Image:** `arpeio/fastbcp:latest`
**Repository:** ## Prerequisites[​](#prerequisites "Direct link to Prerequisites") ### Install Docker Provider[​](#install-docker-provider "Direct link to Install Docker Provider") To use FastBCP 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. FastBCP integration requires connections for your source database and cloud storage. ### 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:** `host.docker.internal` (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) AWS Connection (for S3 Export)[​](#b-aws-connection-for-s3-export "Direct link to B) AWS Connection (for S3 Export)") Create an AWS connection to pass cloud credentials to the container: 1. Navigate to **Admin** → **Connections** in the Airflow UI 2. Click **+** to create a new connection 3. In the **Connection Type** dropdown, select **Amazon Web Services** 4. Configure the connection: **Connection Settings:** * **Connection Id:** `aws_fastbcp` (or your preferred name) * **Connection Type:** `Amazon Web Services` (select this from the dropdown) * **AWS Access Key ID:** Your AWS access key (in the Login field) * **AWS Secret Access Key:** Your AWS secret key (in the Password field) * **Extra:** `{"region_name":"eu-west-1"}` (or your preferred region) tip Airflow AWS providers commonly use `region_name` in Extra JSON. Alternatively, you can use `{"region":"eu-west-1"}` or `{"aws_default_region":"eu-west-1"}`. ## 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 FastBCP 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., `fastbcp_orders_mssql_to_s3.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 _mssql_parts(conn_id: str): """ Extract MSSQL connection details from Airflow connection. Expected Airflow connection (using ODBC): - Conn Id: mssql_tpch10 (conn_type: odbc) - Host: host.docker.internal - Port: 11433 - Login/Password: FastLogin / FastPassword - Extra JSON: {"database":"tpch10"} """ c = BaseHook.get_connection(conn_id) host = c.host port = c.port user = c.login pwd = c.password # For ODBC MSSQL, the database is typically stored in Extra JSON # (because the UI may not expose a dedicated "Database" field). db = c.extra_dejson.get("database") or c.schema if not db: raise ValueError( f"Connection '{conn_id}': missing database. Put it in Extra JSON " f'{{"database":"tpch10"}} (recommended for ODBC).' ) return host, port, user, pwd, db def _aws_env(conn_id: str): """ Extract AWS credentials from Airflow connection and map to container env vars. Expected Airflow AWS connection: - Conn Id: aws_fastbcp - Conn Type: Amazon Web Services - Login -> AWS_ACCESS_KEY_ID - Password -> AWS_SECRET_ACCESS_KEY - Extra -> {"region_name":"eu-west-1"} (or your region) Returns a dictionary with: - AWS_ACCESS_KEY_ID - AWS_SECRET_ACCESS_KEY - AWS_DEFAULT_REGION """ c = BaseHook.get_connection(conn_id) # Keys can be in login/password or in Extra JSON access_key = c.login or c.extra_dejson.get("aws_access_key_id") secret_key = c.password or c.extra_dejson.get("aws_secret_access_key") # Airflow AWS providers commonly use "region_name" in Extra JSON region = ( c.extra_dejson.get("region_name") or c.extra_dejson.get("region") or c.extra_dejson.get("aws_default_region") ) missing = [ k for k, v in { "AWS_ACCESS_KEY_ID": access_key, "AWS_SECRET_ACCESS_KEY": secret_key, "AWS_DEFAULT_REGION": region, }.items() if not v ] if missing: raise ValueError( f"Connection '{conn_id}': missing AWS fields: {missing}. " f"Set login/password and add Extra.region_name (or region)." ) return { "AWS_ACCESS_KEY_ID": access_key, "AWS_SECRET_ACCESS_KEY": secret_key, "AWS_DEFAULT_REGION": region, } with DAG( dag_id="fastbcp_export_orders_parquet_to_s3", start_date=datetime(2025, 1, 1), schedule=None, catchup=False, tags=["fastbcp", "mssql", "s3", "docker"], ) as dag: mssql_host, mssql_port, mssql_user, mssql_pwd, mssql_db = _mssql_parts("mssql_tpch10") aws_env = _aws_env("aws_fastbcp") DockerOperator( task_id="export_orders_parquet_to_s3", image="arpeio/fastbcp: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, environment=aws_env, command=[ "--connectiontype", "mssql", "--server", f"{mssql_host},{mssql_port}", "--user", mssql_user, "--password", mssql_pwd, "--database", mssql_db, "--sourceschema", "dbo", "--sourcetable", "orders", "--fileoutput", "orders.parquet", "--directory", "s3://fastbcp-export/orders/parquet", "--parallelmethod", "Ntile", "--paralleldegree", "12", "--distributekeycolumn", "o_orderkey", "--merge", "false", "--nobanner", ], network_mode="bridge", ) ``` **Key Parameters:** * `image`: Specifies the FastBCP Docker image * `docker_url`: Docker daemon endpoint * `environment`: Dictionary of environment variables (AWS credentials in this case) * `command`: List of FastBCP CLI arguments * `auto_remove`: Automatically remove the container after successful execution ### Helper Functions Explained[​](#helper-functions-explained "Direct link to Helper Functions Explained") The DAG includes two utility functions: #### `_mssql_parts(conn_id)`[​](#_mssql_partsconn_id "Direct link to _mssql_partsconn_id") Extracts connection details from an Airflow ODBC connection. This function: * Retrieves host, port, username, and password * Extracts the database name from the Extra JSON field * Returns all components needed to build the FastBCP connection string #### `_aws_env(conn_id)`[​](#_aws_envconn_id "Direct link to _aws_envconn_id") Extracts AWS credentials from an Airflow AWS connection and maps them to the environment variables expected by FastBCP: * `AWS_ACCESS_KEY_ID` * `AWS_SECRET_ACCESS_KEY` * `AWS_DEFAULT_REGION` This function supports multiple Extra JSON formats for flexibility. ## Logging[​](#logging "Direct link to Logging") All FastBCP 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., `fastbcp_export_orders_parquet_to_s3`) 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: * FastBCP 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 16:15:37] INFO - Settings file not found in the working directory nor in the executable directory [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.882 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- The "FastBCP_Settings.json" file does not exist. Using default settings. Console Only with loglevel=Information [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.892 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- FastBCP Trial – will expires on "2026‑03‑27" (24 day(s) left). [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.892 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Starting [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- FastBCP Version : "0.29.2.0" Architecture : "X64" - Framework : ".NET 8.0.24" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Internal Trace ID : "5ccea857-1538-4a28-8b1c-cfe5c51fbd43" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Internal Run ID : "5ccea857-1538-4a28-8b1c-cfe5c51fbd43" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- OS : "Debian GNU/Linux 13 (trixie)" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Connection Type : "mssql" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Source SqlInstance : "sql22,1433" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Source Database : "tpch" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Source Schema : "tpch10" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Source Table : "orders" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Trusted Connection : False [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- User : "migadmin" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Output File : "orders.parquet" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Output Directory : /data/parquet [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Degree : 12 [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Distribute Method : "Ntile" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Distribute Column : "o_orderkey" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Decimal Separator : "," [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Delimiter : "|" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Use quotes : False [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Date format: "yyyy-MM-dd" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Encoding : "UTF-8" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- No Header : False [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Timestamped : False [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Boolean Format : "automatic" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Cloud Profile : "" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Application Intent : "ReadOnly" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.906 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- file extension is ".parquet" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.909 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Encoding used : Unicode (UTF-8) - 65001 - utf-8 [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.965 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- 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=FastBCP;Application Intent=ReadOnly" [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.086 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- 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 16:15:38] INFO - 2026-03-02T15:15:38.110 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Get DataTypes with header end : Elapsed=6 ms [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Data Segments Computation Completed in 260 ms [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Distribute Column Type : "Int32" [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 0 : 1 : 1 - 5000001 or "o_orderkey" is null [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 1 : 2 : 5000002 - 10000002 [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 2 : 3 : 10000003 - 15000003 [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 3 : 4 : 15000004 - 20000004 [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 4 : 5 : 20000005 - 25000005 [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 5 : 6 : 25000006 - 30000006 [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 6 : 7 : 30000007 - 35000007 [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 7 : 8 : 35000032 - 40000032 [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 8 : 9 : 40000033 - 45000033 [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 9 : 10 : 45000034 - 50000034 [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 10 : 11 : 50000035 - 55000035 [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 11 : 12 : 55000036 - 60000000 [2026-03-02 16:15:46] INFO - 2026-03-02T15:15:46.611 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 002 for o_orderkey between 10000003 and 15000003 into /data/parquet/orders_chunk_002.parquet : 1250001 rows x 9 columns in 8234ms [2026-03-02 16:15:46] INFO - 2026-03-02T15:15:46.611 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 011 for o_orderkey between 55000036 and 60000000 into /data/parquet/orders_chunk_011.parquet : 1249989 rows x 9 columns in 8234ms [2026-03-02 16:15:46] INFO - 2026-03-02T15:15:46.790 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 003 for o_orderkey between 15000004 and 20000004 into /data/parquet/orders_chunk_003.parquet : 1250001 rows x 9 columns in 8413ms [2026-03-02 16:15:46] INFO - 2026-03-02T15:15:46.797 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 005 for o_orderkey between 25000006 and 30000006 into /data/parquet/orders_chunk_005.parquet : 1250001 rows x 9 columns in 8420ms [2026-03-02 16:15:46] INFO - 2026-03-02T15:15:46.936 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 008 for o_orderkey between 40000033 and 45000033 into /data/parquet/orders_chunk_008.parquet : 1250001 rows x 9 columns in 8559ms [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.139 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 010 for o_orderkey between 50000035 and 55000035 into /data/parquet/orders_chunk_010.parquet : 1250001 rows x 9 columns in 8763ms [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.154 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 000 for o_orderkey between 1 and 5000001 into /data/parquet/orders_chunk_000.parquet : 1250001 rows x 9 columns in 8777ms [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.247 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 009 for o_orderkey between 45000034 and 50000034 into /data/parquet/orders_chunk_009.parquet : 1250001 rows x 9 columns in 8870ms [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.308 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 006 for o_orderkey between 30000007 and 35000007 into /data/parquet/orders_chunk_006.parquet : 1250001 rows x 9 columns in 8931ms [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.309 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 001 for o_orderkey between 5000002 and 10000002 into /data/parquet/orders_chunk_001.parquet : 1250001 rows x 9 columns in 8932ms [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.363 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 007 for o_orderkey between 35000032 and 40000032 into /data/parquet/orders_chunk_007.parquet : 1250001 rows x 9 columns in 8986ms [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.366 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 004 for o_orderkey between 20000005 and 25000005 into /data/parquet/orders_chunk_004.parquet : 1250001 rows x 9 columns in 8989ms [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- files generation end : Elapsed=9257 ms - maxdop=12 [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total data rows : 15000000 [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total data columns : 9 [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total cells : 135000000 [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Throughput rows : 1568531 rows/s [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Throughput cells : 14116787 cells/s [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total time : Elapsed=9563 ms [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total data rows : 15000000 [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total data columns : 9 [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total cells : 135000000 [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Final Throughput rows : 1568482 rows/s [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Final Throughput cells : 14116346 cells/s [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Completed Load [2026-03-02 16:15:47] INFO - Task instance in success state [2026-03-02 16:15:47] INFO - Previous state of the Task instance: TaskInstanceState.RUNNING [2026-03-02 16:15:47] INFO - Task operator: ``` --- # Docker Minimal, production-ready container image to run FastBCP, a high-performance bulk copy 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/FastBCP` * **Repository**: [FastBCP-Image on GitHub](https://github.com/arpe-io/FastBCP-Image) * **DockerHub**: [arpeio/fastbcp](https://hub.docker.com/repository/docker/arpeio/fastbcp/general) * Published automatically via GitHub Actions for each new release and weekly security updates ## Prerequisites[​](#prerequisites "Direct link to Prerequisites") * Docker 24+ (or Podman) * FastBCP Linux x64 ≥ 0.28.0 binary (for build only) * Optional: `FastBCP_Settings.json` to mount/copy into `/config` for custom logging settings ## Using the Prebuilt Image from DockerHub[​](#using-the-prebuilt-image-from-dockerhub "Direct link to Using the Prebuilt Image from DockerHub") You can use a prebuilt image from DockerHub that already includes the FastBCP binary. You must provide your own license at runtime. ### Available Tags[​](#available-tags "Direct link to Available Tags") * **Version-specific tags** are aligned with FastBCP releases (e.g., `v0.28.3`) * **`latest` tag** always points to the most recent FastBCP version ### Automatic Updates[​](#automatic-updates "Direct link to Automatic Updates") * **New releases**: Images are automatically built when new FastBCP versions are released * **Security updates**: The latest version of each minor branch (e.g., latest v0.27.x, v0.28.x, v0.29.x) is automatically rebuilt weekly (every Monday) with the latest base image and security patches * This ensures that all actively used versions remain secure without breaking compatibility * Example: If you use `v0.28.8` (latest of 0.28.x branch), it gets security updates even after `v0.29.0` is released ### Pull the Image[​](#pull-the-image "Direct link to Pull the Image") ``` # Latest version docker pull arpeio/fastbcp:latest # Specific version docker pull arpeio/fastbcp:v0.28.3 ``` ### Basic Commands[​](#basic-commands "Direct link to Basic Commands") ``` # Get command line help docker run --rm arpeio/fastbcp:latest # Check version docker run --rm arpeio/fastbcp:latest --version ``` ### License Requirement[​](#license-requirement "Direct link to License Requirement") Since version 0.28.0, pass the license content directly via `--license "…"`. ``` export licenseContent=$(cat ./FastBCP.lic) # Use $licenseContent in your docker run commands docker run --rm arpeio/fastbcp: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. ## Usage Examples[​](#usage-examples "Direct link to Usage Examples") The Docker image uses the FastBCP binary as its entrypoint, so you can run it directly with parameters as defined in the [FastBCP documentation](/latest/.md). ### Example 1: SQL Server → Parquet on S3[​](#example-1-sql-server--parquet-on-s3 "Direct link to Example 1: SQL Server → Parquet on S3") ``` export licenseContent=$(cat ./FastBCP.lic) docker run --rm \ -e AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID} \ -e AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY} \ -e AWS_REGION=${AWS_REGION} \ arpeio/fastbcp:latest \ --connectiontype "mssql" \ --server "host.docker.internal,1433" \ --user "FastUser" \ --password "FastPassword" \ --database "tpch_test" \ --query "SELECT * FROM dbo.orders WHERE year(o_orderdate)=1998" \ --fileoutput "orders.parquet" \ --directory "s3://arpeioftoutput/dockertest/" \ --paralleldegree 12 \ --parallelmethod "Ntile" \ --distributekeycolumn "o_orderkey" \ --merge false \ --license "$licenseContent" ``` ### Example 2: SQL Server → CSV with Custom Logging[​](#example-2-sql-server--csv-with-custom-logging "Direct link to Example 2: SQL Server → CSV with Custom Logging") ``` export licenseContent=$(cat ./FastBCP.lic) docker run --rm \ -v fastbcp-config:/config \ -v fastbcp-data:/data \ -v fastbcp-logs:/logs \ arpeio/fastbcp:latest \ --settingsfile "/config/FastBCP_Settings_Logs_To_Files.json" \ --connectiontype "mssql" \ --server "host.docker.internal,1433" \ --user "FastUser" \ --password "FastPassword" \ --database "tpch_test" \ --query "SELECT * FROM dbo.orders WHERE year(o_orderdate)=1998" \ --fileoutput "orders.csv" \ --directory "/data/orders/csv" \ --delimiter "|" \ --decimalseparator "." \ --dateformat "yyyy-MM-dd HH:mm:ss" \ --paralleldegree 12 \ --parallelmethod "Ntile" \ --distributekeycolumn "o_orderkey" \ --merge false \ --license "$licenseContent" ``` ### Example 3: PostgreSQL → Parquet on Azure Data Lake Storage (ADLS)[​](#example-3-postgresql--parquet-on-azure-data-lake-storage-adls "Direct link to Example 3: PostgreSQL → Parquet on Azure Data Lake Storage (ADLS)") ``` export licenseContent=$(cat ./FastBCP.lic) export adlscontainer="arpeioadlseu" docker run --rm \ -e AZURE_CLIENT_ID=${AZURE_CLIENT_ID} \ -e AZURE_TENANT_ID=${AZURE_TENANT_ID} \ -e AZURE_CLIENT_SECRET=${AZURE_CLIENT_SECRET} \ arpeio/fastbcp:latest \ --connectiontype "pgcopy" \ --server "host.docker.internal:15432" \ --user "FastUser" \ --password "FastPassword" \ --database "tpch" \ --sourceschema "tpch_10" \ --sourcetable "orders" \ --query "SELECT * FROM tpch_10.orders WHERE o_orderdate >= '1998-01-01' AND o_orderdate < '1999-01-01'" \ --fileoutput "orders.parquet" \ --directory "abfss://${adlscontainer}.dfs.core.windows.net/fastbcpoutput/testdfs/orders" \ --paralleldegree -2 \ --parallelmethod "Ctid" \ --license "$licenseContent" ``` ### Example 4: Oracle → Parquet on Google Cloud Storage (GCS)[​](#example-4-oracle--parquet-on-google-cloud-storage-gcs "Direct link to Example 4: Oracle → Parquet on Google Cloud Storage (GCS)") ``` export licenseContent=$(cat ./FastBCP.lic) export gcsbucket="arpeio-gcs-bucket" export GOOGLE_APPLICATION_CREDENTIALS_JSON=$(cat ./gcp-credentials.json) docker run --rm \ -e GOOGLE_APPLICATION_CREDENTIALS="${GOOGLE_APPLICATION_CREDENTIALS_JSON}" \ arpeio/fastbcp:latest \ --connectiontype "oraodp" \ --server "host.docker.internal:1521/FREEPDB1" \ --user "TPCH_IN" \ --password "TPCH_IN" \ --database "FREEPDB1" \ --sourceschema "TPCH_IN" \ --sourcetable "ORDERS" \ --fileoutput "orders.parquet" \ --directory "gs://${gcsbucket}/fastbcpoutput/testgs/orders" \ --parallelmethod "Rowid" \ --paralleldegree -2 \ --license "$licenseContent" ``` ## Volumes[​](#volumes "Direct link to Volumes") The Docker image declares several volumes to organize data and configuration: ``` VOLUME ["/config", "/data", "/work", "/logs"] ``` ### Volume Configuration and Access Modes[​](#volume-configuration-and-access-modes "Direct link to Volume Configuration and Access Modes") | **Volume** | **Purpose** | **Access Mode** | **Notes** | | ---------- | ------------------------------------------------------------------- | --------------------- | ----------------------------------------------- | | `/config` | Contains user-provided configuration files (e.g., Serilog settings) | Read-only / Read-many | Shared across multiple containers; not modified | | `/data` | Input/output data directory | 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 FastBCP Logging[​](#configuring-fastbcp-logging "Direct link to Configuring FastBCP Logging") info Available starting from version v0.28.3 FastBCP supports custom logging configuration through an external Serilog settings file in JSON format. This allows you to control how and where logs are written — to the console, to files, or dynamically per run. You can download an example logging settings file directly from GitHub: [FastBCP\_Settings\_Logs\_To\_Files.json](https://raw.githubusercontent.com/aetperf/FastBCP-Image/main/FastBCP_Settings_Logs_To_Files.json) Custom settings files must be mounted into the container under the `/config` directory. ### 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") The following configuration is recommended for most production or Airflow environments. It writes: * Logs to the console for real-time visibility * Run summary logs to `/airflow/xcom/return.json` for Airflow integration * Per-run logs under `/logs`, automatically named with `{LogTimestamp}` and `{TraceId}` ``` { "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": "FastBCP" } } } ``` Important Notes * If a target directory (such as `/logs` or `/airflow/xcom`) does not exist, FastBCP 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") You can use the following placeholders to dynamically generate log file names or directories: | **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") Your Serilog configuration file (for example, `FastBCP_Settings_Logs_To_Files.json`) must be placed in `/config`, either by mounting a local directory or by using a Docker named volume. Example with named volumes: ``` # First, copy your config file to a volume location cp ~/FastBCP_Settings_Logs_To_Files.json /volumes/fastbcp-config/ # Then run FastBCP with mounted volumes docker run --rm \ -v fastbcp-config:/config \ -v fastbcp-data:/data \ -v fastbcp-logs:/logs \ arpeio/fastbcp:latest \ --settingsfile "/config/FastBCP_Settings_Logs_To_Files.json" \ --connectiontype "mssql" \ --server "host.docker.internal,1433" \ --user "FastUser" \ --password "FastPassword" \ --database "tpch_test" \ --query "SELECT * FROM dbo.orders" \ --fileoutput "orders.csv" \ --directory "/data" \ --paralleldegree 12 \ --parallelmethod "Ntile" \ --distributekeycolumn "o_orderkey" \ --merge false \ --license "$licenseContent" ``` If the `--settingsfile` argument is not provided, FastBCP will use its built-in default logging configuration. --- # Kestra [Kestra](https://kestra.io/) is a powerful open-source orchestration platform that can be used to automate and schedule FastBCP data export workflows. FastBCP can be seamlessly integrated into Kestra flows using its Docker image. ## Docker Image[​](#docker-image "Direct link to Docker Image") FastBCP provides an official Docker image available on Docker Hub: **Image:** `arpeio/fastbcp:latest`
**Repository:** ## Integration with Docker Run Plugin[​](#integration-with-docker-run-plugin "Direct link to Integration with Docker Run Plugin") The [`io.kestra.plugin.docker.Run`](https://kestra.io/plugins/plugin-docker/io.kestra.plugin.docker.run) plugin provides a direct way to execute FastBCP commands in a Docker container. This is the recommended method for integrating FastBCP with Kestra. ### Basic Example[​](#basic-example "Direct link to Basic Example") ``` id: fastbcp_export_orders namespace: arpe.io tasks: - id: export_orders_parquet type: io.kestra.plugin.docker.Run containerImage: arpeio/fastbcp:latest host: "tcp://host.docker.internal:2375" commands: - --connectiontype - mssql - --server - "host.docker.internal,11433" - --user - FastLogin - --password - FastPassword - --database - tpch10 - --sourceschema - dbo - --sourcetable - orders - --fileoutput - orders.parquet - --directory - /data/export - --parallelmethod - Ntile - --paralleldegree - "12" - --distributekeycolumn - o_orderkey - --nobanner ``` **Key Parameters:** * `containerImage`: Specifies the FastBCP Docker image * `host`: Docker daemon endpoint (required for Docker Run plugin) * `commands`: Array of FastBCP CLI arguments ## Environment Variables for Cloud Storage[​](#environment-variables-for-cloud-storage "Direct link to Environment Variables for Cloud Storage") When exporting data to cloud storage (AWS S3, Azure Blob, Google Cloud Storage), you can pass cloud credentials using environment variables (see [Cloud Connectivity](/1.2/documentation/cloud-connectivity/overview.md) for more details). ### Example with AWS S3[​](#example-with-aws-s3 "Direct link to Example with AWS S3") ``` id: fastbcp_export_to_s3 namespace: arpe.io tasks: - id: export_orders_to_s3 type: io.kestra.plugin.docker.Run containerImage: arpeio/fastbcp:latest host: "tcp://host.docker.internal:2375" env: AWS_ACCESS_KEY_ID: "AKIAIOSFODNN7EXAMPLE" AWS_SECRET_ACCESS_KEY: "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY" AWS_DEFAULT_REGION: "us-east-1" commands: - --connectiontype - mssql - --server - "host.docker.internal,11433" - --user - FastLogin - --password - FastPassword - --database - tpch10 - --sourceschema - dbo - --sourcetable - orders - --fileoutput - orders.parquet - --directory - s3://my-bucket/exports/orders - --parallelmethod - Ntile - --paralleldegree - "12" - --distributekeycolumn - o_orderkey - --merge - "false" - --nobanner ``` ## 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, connection strings, and cloud credentials, 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: * `FASTBCP_MSSQL_USER` * `FASTBCP_MSSQL_PASSWORD` * `FASTBCP_AWS_ACCESS_KEY_ID` * `FASTBCP_AWS_SECRET_ACCESS_KEY` * `FASTBCP_AWS_DEFAULT_REGION` ### Example with Secrets[​](#example-with-secrets "Direct link to Example with Secrets") ``` id: fastbcp_export_orders_s3_secret namespace: arpe.io tasks: - id: export_orders_parquet_to_s3 type: io.kestra.plugin.docker.Run containerImage: arpeio/fastbcp:latest host: "tcp://host.docker.internal:2375" env: AWS_ACCESS_KEY_ID: "{{ secret('FASTBCP_AWS_ACCESS_KEY_ID') }}" AWS_SECRET_ACCESS_KEY: "{{ secret('FASTBCP_AWS_SECRET_ACCESS_KEY') }}" AWS_DEFAULT_REGION: "{{ secret('FASTBCP_AWS_DEFAULT_REGION') }}" commands: - --connectiontype - mssql - --server - "host.docker.internal,11433" - --user - "{{ secret('FASTBCP_MSSQL_USER') }}" - --password - "{{ secret('FASTBCP_MSSQL_PASSWORD') }}" - --database - tpch10 - --sourceschema - dbo - --sourcetable - orders - --fileoutput - orders.parquet - --directory - s3://fastbcp-export/orders/parquet - --parallelmethod - Ntile - --paralleldegree - "12" - --distributekeycolumn - o_orderkey - --merge - "false" - --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 FastBCP 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 export process, including configuration parameters, connection details, data export progress, and performance metrics. ### Example Log Output[​](#example-log-output "Direct link to Example Log Output") ``` 2026-03-02T15:15:37.882 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- The "FastBCP_Settings.json" file does not exist. Using default settings. Console Only with loglevel=Information 2026-03-02 16:15:37.8922026-03-02T15:15:37.892 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- FastBCP Trial – will expires on "2026‑03‑27" (24 day(s) left). 2026-03-02 16:15:37.8922026-03-02T15:15:37.892 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Starting 2026-03-02 16:15:37.8932026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- FastBCP Version : "0.29.2.0" Architecture : "X64" - Framework : ".NET 8.0.24" 2026-03-02 16:15:37.8932026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Internal Trace ID : "5ccea857-1538-4a28-8b1c-cfe5c51fbd43" 2026-03-02 16:15:37.8932026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Internal Run ID : "5ccea857-1538-4a28-8b1c-cfe5c51fbd43" 2026-03-02 16:15:37.8932026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- OS : "Debian GNU/Linux 13 (trixie)" 2026-03-02 16:15:37.8932026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Connection Type : "mssql" 2026-03-02 16:15:37.8932026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Source SqlInstance : "sql22,1433" 2026-03-02 16:15:37.8932026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Source Database : "tpch" 2026-03-02 16:15:37.8932026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Source Schema : "tpch10" 2026-03-02 16:15:37.8932026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Source Table : "orders" 2026-03-02 16:15:37.8932026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Trusted Connection : False 2026-03-02 16:15:37.8932026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- User : "migadmin" 2026-03-02 16:15:37.8932026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Output File : "orders.parquet" 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Output Directory : /data/parquet 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Degree : 12 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Distribute Method : "Ntile" 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Distribute Column : "o_orderkey" 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Decimal Separator : "," 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Delimiter : "|" 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Use quotes : False 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Date format: "yyyy-MM-dd" 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Encoding : "UTF-8" 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- No Header : False 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Timestamped : False 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Boolean Format : "automatic" 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Cloud Profile : "" 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Application Intent : "ReadOnly" 2026-03-02 16:15:37.9062026-03-02T15:15:37.906 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- file extension is ".parquet" 2026-03-02 16:15:37.9092026-03-02T15:15:37.909 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Encoding used : Unicode (UTF-8) - 65001 - utf-8 2026-03-02 16:15:37.9652026-03-02T15:15:37.965 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- 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=FastBCP;Application Intent=ReadOnly" 2026-03-02 16:15:38.0862026-03-02T15:15:38.086 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- 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 16:15:38.1102026-03-02T15:15:38.110 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Get DataTypes with header end : Elapsed=6 ms 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Data Segments Computation Completed in 260 ms 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Distribute Column Type : "Int32" 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 0 : 1 : 1 - 5000001 or "o_orderkey" is null 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 1 : 2 : 5000002 - 10000002 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 2 : 3 : 10000003 - 15000003 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 3 : 4 : 15000004 - 20000004 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 4 : 5 : 20000005 - 25000005 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 5 : 6 : 25000006 - 30000006 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 6 : 7 : 30000007 - 35000007 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 7 : 8 : 35000032 - 40000032 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 8 : 9 : 40000033 - 45000033 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 9 : 10 : 45000034 - 50000034 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 10 : 11 : 50000035 - 55000035 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 11 : 12 : 55000036 - 60000000 2026-03-02 16:15:46.6112026-03-02T15:15:46.611 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 002 for o_orderkey between 10000003 and 15000003 into /data/parquet/orders_chunk_002.parquet : 1250001 rows x 9 columns in 8234ms 2026-03-02 16:15:46.6112026-03-02T15:15:46.611 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 011 for o_orderkey between 55000036 and 60000000 into /data/parquet/orders_chunk_011.parquet : 1249989 rows x 9 columns in 8234ms 2026-03-02 16:15:46.7902026-03-02T15:15:46.790 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 003 for o_orderkey between 15000004 and 20000004 into /data/parquet/orders_chunk_003.parquet : 1250001 rows x 9 columns in 8413ms 2026-03-02 16:15:46.7972026-03-02T15:15:46.797 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 005 for o_orderkey between 25000006 and 30000006 into /data/parquet/orders_chunk_005.parquet : 1250001 rows x 9 columns in 8420ms 2026-03-02 16:15:46.9362026-03-02T15:15:46.936 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 008 for o_orderkey between 40000033 and 45000033 into /data/parquet/orders_chunk_008.parquet : 1250001 rows x 9 columns in 8559ms 2026-03-02 16:15:47.1392026-03-02T15:15:47.139 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 010 for o_orderkey between 50000035 and 55000035 into /data/parquet/orders_chunk_010.parquet : 1250001 rows x 9 columns in 8763ms 2026-03-02 16:15:47.1542026-03-02T15:15:47.154 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 000 for o_orderkey between 1 and 5000001 into /data/parquet/orders_chunk_000.parquet : 1250001 rows x 9 columns in 8777ms 2026-03-02 16:15:47.2472026-03-02T15:15:47.247 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 009 for o_orderkey between 45000034 and 50000034 into /data/parquet/orders_chunk_009.parquet : 1250001 rows x 9 columns in 8870ms 2026-03-02 16:15:47.3082026-03-02T15:15:47.308 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 006 for o_orderkey between 30000007 and 35000007 into /data/parquet/orders_chunk_006.parquet : 1250001 rows x 9 columns in 8931ms 2026-03-02 16:15:47.3092026-03-02T15:15:47.309 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 001 for o_orderkey between 5000002 and 10000002 into /data/parquet/orders_chunk_001.parquet : 1250001 rows x 9 columns in 8932ms 2026-03-02 16:15:47.3632026-03-02T15:15:47.363 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 007 for o_orderkey between 35000032 and 40000032 into /data/parquet/orders_chunk_007.parquet : 1250001 rows x 9 columns in 8986ms 2026-03-02 16:15:47.3662026-03-02T15:15:47.366 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 004 for o_orderkey between 20000005 and 25000005 into /data/parquet/orders_chunk_004.parquet : 1250001 rows x 9 columns in 8989ms 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- files generation end : Elapsed=9257 ms - maxdop=12 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total data rows : 15000000 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total data columns : 9 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total cells : 135000000 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Throughput rows : 1568531 rows/s 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Throughput cells : 14116787 cells/s 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total time : Elapsed=9563 ms 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total data rows : 15000000 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total data columns : 9 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total cells : 135000000 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Final Throughput rows : 1568482 rows/s 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Final Throughput cells : 14116346 cells/s 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Completed Load ``` --- # PostgreSQL The **pg\_fastbcp** extension allows you to run the FastBCP tool directly from an SQL function, enabling fast data export from databases to various formats (CSV, Parquet) and cloud storage directly from PostgreSQL. ## Extension Overview[​](#extension-overview "Direct link to Extension Overview") * **Repository**: [arpe-io/pg\_fastbcp](https://github.com/arpe-io/pg_fastbcp) * **License**: MIT * **Latest version**: v0.30.0 * **Platforms**: Linux (Debian/Ubuntu) and Windows ![pg\_fastbcp Demo](/assets/images/pg_fastbcp-e5e0b5519f8de77a14a8f8cba33d251c.gif) ## Features[​](#features "Direct link to Features") * **Native PostgreSQL Integration**: Execute FastBCP commands directly from SQL * **Secure Password Management**: Built-in encryption for sensitive credentials * **Detailed Result Return**: Get export statistics and performance metrics as SQL results * **Cross-Platform**: Available for both Linux and Windows environments * **Flexible Configuration**: Support for all FastBCP parameters * **Multiple Output Formats**: Export to CSV, Parquet, or directly to cloud storage (AWS S3, Azure Blob, Google Cloud Storage, OneLake) ## Prerequisites[​](#prerequisites "Direct link to Prerequisites") * PostgreSQL 15, 16, 17, or 18 * Sudo/Administrator privileges to install the extension * Valid FastBCP license (request a [trial license](https://arpe.io/get-trial?product=FastBCP)) * FastBCP 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 `FastBCP` 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\_fastbcp releases page](https://github.com/arpe-io/pg_fastbcp/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_fastbcp.so` * `pg_fastbcp.control` * `pg_fastbcp--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_fastbcp.so /usr/lib/postgresql//lib/ sudo cp pg_fastbcp.control pg_fastbcp--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 FastBCP binary sudo chmod +x /path/to/FastBCP sudo chown postgres:postgres /path/to/FastBCP sudo chmod 750 /path/to/FastBCP # 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_fastbcp.dll` * `pg_fastbcp.control` * `pg_fastbcp--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_fastbcp.dll` file into the `lib` folder 4. Copy the `pg_fastbcp.control` and `pg_fastbcp--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 `FastBCP.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_fastbcp CASCADE; ``` ### Create the extension[​](#create-the-extension "Direct link to Create the extension") ``` CREATE EXTENSION pg_fastbcp CASCADE; ``` ## Functions[​](#functions "Direct link to Functions") ### pg\_fastbcp\_encrypt[​](#pg_fastbcp_encrypt "Direct link to pg_fastbcp_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_RunFastBcp_secure` function will automatically decrypt any values passed to its `password` argument. **Syntax:** ``` pg_fastbcp_encrypt(text_to_encrypt text) RETURNS text ``` **Example:** ``` SELECT pg_fastbcp_encrypt('MySecurePassword'); -- Returns: A base64-encoded encrypted string, e.g., "PgP...base64encodedstring==" ``` ### xp\_RunFastBcp\_secure[​](#xp_runfastbcp_secure "Direct link to xp_RunFastBcp_secure") This is the main function to execute the FastBCP tool. It takes various parameters to configure the data export operation. Password arguments (`password`) will be automatically decrypted. **Syntax:** ``` xp_RunFastBcp_secure( connectiontype text DEFAULT NULL, sourceconnectstring text DEFAULT NULL, dsn text DEFAULT NULL, provider text DEFAULT NULL, server text DEFAULT NULL, user_ text DEFAULT NULL, password text DEFAULT NULL, trusted boolean DEFAULT NULL, database_name text DEFAULT NULL, applicationintent text DEFAULT NULL, fileinput text DEFAULT NULL, query text DEFAULT NULL, sourceschema text DEFAULT NULL, sourcetable text DEFAULT NULL, fileoutput text DEFAULT NULL, directory text DEFAULT NULL, timestamped boolean DEFAULT NULL, encoding text DEFAULT NULL, delimiter text DEFAULT NULL, usequotes boolean DEFAULT NULL, dateformat text DEFAULT NULL, decimalseparator text DEFAULT NULL, boolformat text DEFAULT NULL, noheader boolean DEFAULT NULL, parquetcompression text DEFAULT NULL, cloudprofile text DEFAULT NULL, parallelmethod text DEFAULT NULL, paralleldegree integer DEFAULT NULL, distributekeycolumn text DEFAULT NULL, datadrivenquery text DEFAULT NULL, merge boolean DEFAULT NULL, loglevel text DEFAULT NULL, runid text DEFAULT NULL, settingsfile text DEFAULT NULL, config text DEFAULT NULL, nobanner boolean DEFAULT NULL, license text DEFAULT NULL, fastbcp_path text DEFAULT NULL ) RETURNS TABLE ( exit_code integer, output text, total_rows bigint, total_columns integer, total_time bigint ) ``` ## Usage Examples[​](#usage-examples "Direct link to Usage Examples") ### Linux Example - PostgreSQL to CSV[​](#linux-example---postgresql-to-csv "Direct link to Linux Example - PostgreSQL to CSV") Export data from PostgreSQL to CSV files: ``` SELECT * FROM xp_RunFastBcp_secure( connectiontype := 'pgsql', server := 'localhost:5432', user_ := 'postgres', password := pg_fastbcp_encrypt('MyActualPassword'), database_name := 'tpch', sourceschema := 'tpch_1', sourcetable := 'orders', fileoutput := 'orders.csv', directory := '/tmp/export', paralleldegree := 4, parallelmethod := 'Ntile', distributekeycolumn := 'o_orderkey', noheader := false, delimiter := ',', license := '/tmp/FastBCP_linux-x64_v0.30.0/FastBCP.lic', loglevel := 'information', nobanner := false, fastbcp_path := '/tmp/FastBCP_linux-x64_v0.30.0' ); ``` ## 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 FastBCP process. | | `output` | text | The full log output from the FastBCP tool. | | `total_rows` | bigint | The total number of rows transferred. | | `total_columns` | integer | The total number of columns transferred. | | `total_time` | bigint | The total execution time in milliseconds. | ## Output[​](#output "Direct link to Output") You can view the full FastBCP output using the `output` column returned by the function. ## Resources[​](#resources "Direct link to Resources") * [pg\_fastbcp GitHub Repository](https://github.com/arpe-io/pg_fastbcp) * [FastBCP Documentation](https://fastbcp-docs.arpe.io/1.2/integration/postgresql-integration) * [Get a Trial License](https://arpe.io/get-trial?product=FastBCP) * [Report Issues](https://github.com/arpe-io/pg_fastbcp/issues) --- # Release Notes 0.32 ## New Features[​](#new-features "Direct link to New Features") ### OpenTelemetry Support[​](#opentelemetry-support "Direct link to OpenTelemetry Support") FastBCP now supports [OpenTelemetry](https://opentelemetry.io/) for distributed tracing and log correlation. **New parameter:** * `--traceparent`: Accept a [W3C Trace Context](https://www.w3.org/TR/trace-context/) traceparent identifier from an external caller, enabling end-to-end trace correlation across distributed systems. **OpenTelemetry log export:** * Logs can be exported to any OpenTelemetry-compatible collector (e.g., Jaeger, Zipkin, Grafana Tempo) via the Serilog OpenTelemetry sink. * Configuration through environment variables or the `FastBCP_Settings.json` file. See the [OpenTelemetry logging documentation](/1.2/documentation/logging/OpenTelemetry.md) for setup details and examples. ### Gzip Compression[​](#gzip-compression "Direct link to Gzip Compression") **Streamed gzip compression** is now possible by adding `.gz` to file extension. For csv, tsv and json only. * use `--fileoutput file.csv.gz` ### BREAKING CHANGE[​](#breaking-change "Direct link to BREAKING CHANGE") * `--merge` default is Switched from `true` to `false` ### Others[​](#others "Direct link to Others") * Better datatypes coverage for csv and json --- # Release Notes 1.0 ## What's Changed[​](#whats-changed "Direct link to What's Changed") ### ADBC Parquet Export - 2x Faster Performance[​](#adbc-parquet-export---2x-faster-performance "Direct link to ADBC Parquet Export - 2x Faster Performance") FastBCP now supports ADBC (Arrow Database Connectivity) for Parquet exports via the `--connectiontype adbc_mssql` connector, powered by ArrowTDS. **Performance improvements:** * 2x faster Parquet generation compared to traditional methods * Native columnar data format (Arrow) eliminates conversion overhead * Optimized for SQL Server data types **Usage:** ``` fastbcp --server myserver.database.windows.net \ --database MyDatabase \ --query "SELECT * FROM Sales.Orders" \ --connectiontype adbc_mssql \ --fileoutput "orders.parquet" ``` See [Connection Parameters documentation](/1.2/documentation/cli/connection_parameters.md#connection-type) for more details. ### Buffered Cloud Uploads[​](#buffered-cloud-uploads "Direct link to Buffered Cloud Uploads") New environment variables enable buffered cloud uploads for significantly improved Azure Data Lake Storage and OneLake performance. **New environment variables:** * `FASTBCP_CLOUD_ISBUFFERED`: When `True`, ADLS/OneLake writes are buffered to a local temp file, then uploaded in parallel. When `False`, data is streamed directly to the cloud. * `FASTBCP_TMPPATH`: Base directory for temporary files created during buffered cloud uploads. Default: System temp (`%TEMP%` / `$TMPDIR`). * `FASTBCP_CLOUD_MAXUPLOADTHREAD_PER_STREAM`: Maximum number of parallel upload threads per cloud stream. Default: `8` if `parallelmethod=None`, `2` otherwise. * `FASTBCP_UID_STRING_CASING`: Controls UID-to-string casing. Values: `lower` or `upper`. Default: `lower` (RFC 4122). **Example — Buffered cloud uploads:** ``` # Enable buffered uploads for Azure $env:FASTBCP_CLOUD_ISBUFFERED = "True" $env:FASTBCP_TMPPATH = "D:\temp\fastbcp" fastbcp --server myserver --database MyDB --sourceschema Sales --sourcetable Orders ` --fileoutput "abfss://container@storage.dfs.core.windows.net/orders.parquet" ``` **Example — UID string casing (PowerShell):** ``` # Output UIDs in uppercase $env:FASTBCP_UID_STRING_CASING = "upper" fastbcp --server myserver --database MyDB --sourcetable MyTable --fileoutput "output.parquet" ``` **Example — UID string casing (Linux):** ``` # Output UIDs in uppercase export FASTBCP_UID_STRING_CASING=upper fastbcp --server myserver --database MyDB --sourcetable MyTable --fileoutput "output.parquet" ``` See the [Environment Variables](/1.2/documentation/environment-variables/overview.md) documentation for detailed configuration. ### Move to .NET 10[​](#move-to-net-10 "Direct link to Move to .NET 10") FastBCP now runs on .NET 10: * Performance improvements in runtime and GC * Enhanced security and stability * Continued long-term support * Compatibility: Windows, Linux, macOS (x64, ARM64) ### Improved SBOM Generation[​](#improved-sbom-generation "Direct link to Improved SBOM Generation") Enhanced Software Bill of Materials (SBOM) generation for better supply chain security and compliance. ### SLSA Build Provenance[​](#slsa-build-provenance "Direct link to SLSA Build Provenance") Added SLSA (Supply-chain Levels for Software Artifacts) build provenance in CI for enhanced supply chain security and compliance. ### Early Cleanup of Temp Files[​](#early-cleanup-of-temp-files "Direct link to Early Cleanup of Temp Files") When uploading to cloud storage, temporary files are now cleaned up earlier in the process to reduce disk space requirements. ## ArrowTDS ARPE.IO Driver[​](#arrowtds-arpeio-driver "Direct link to ArrowTDS ARPE.IO Driver") FastBCP 1.0 includes the ArrowTDS ARPE.IO driver for high-performance ADBC connectivity. **Key features:** * TDS 7.4 protocol compatibility * Native Arrow columnar format support * Optimized for SQL Server 2012 and later --- # Release Notes 1.1 ## What's Changed[​](#whats-changed "Direct link to What's Changed") ### ADBC PostgreSQL — Arpe.io ADBC FastDriver[​](#adbc-postgresql--arpeio-adbc-fastdriver "Direct link to ADBC PostgreSQL — Arpe.io ADBC FastDriver") FastBCP now supports ADBC for PostgreSQL via the `--connectiontype adbc_pgsql` connector, powered by the new ADBC Arrow\_FEBE drivers (Arpe.io ADBC FastDriver). **Key highlights:** * Ultra-fast Parquet exports from PostgreSQL * Native Arrow columnar format eliminates conversion overhead * Same high-performance ADBC approach as the existing `adbc_mssql` connector **Usage:** ``` fastbcp --server pg-server:5432 \ --database MyDatabase \ --query "SELECT * FROM public.orders" \ --connectiontype adbc_pgsql \ --fileoutput "orders.parquet" ``` See [Connection Parameters documentation](/1.2/documentation/cli/connection_parameters.md#connection-type) for more details. ### \[Breaking] New Default Date Format[​](#breaking-new-default-date-format "Direct link to \[Breaking] New Default Date Format") The default `--dateformat` value for CSV, JSON, and XLSX outputs has changed from `yyyy-MM-dd` to `yyyy-MM-dd HH:mm:sszzz`. **Auto-adaptive behavior:** The format automatically adapts based on the column type: * **Date-only** columns remain formatted as `yyyy-MM-dd` * **Timestamp/DateTime** columns are formatted as `yyyy-MM-dd HH:mm:ss` even if a timezone token (`zzz`) is in the format string * **DateTimeOffset** columns include the full timezone offset This change also fixes date-only format handling and adds timezone support for CSV date formatting. **Migration:** If your pipeline depends on the previous default (`yyyy-MM-dd`), explicitly set `--dateformat "yyyy-MM-dd"` in your command. ### New Boolean Format Values[​](#new-boolean-format-values "Direct link to New Boolean Format Values") The `--boolformat` parameter now supports additional formats: | Format | Example output | | ------------ | --------------- | | `True/False` | `True`, `False` | | `yes/no` | `yes`, `no` | | `y/n` | `y`, `n` | These are in addition to the existing `true/false`, `t/f`, and `1/0` formats. **Example:** ``` fastbcp --server myserver \ --database MyDatabase \ --query "SELECT * FROM products" \ --fileoutput "products.csv" \ --boolformat "True/False" ``` ### Environment Variables Guardrails[​](#environment-variables-guardrails "Direct link to Environment Variables Guardrails") Security hardening of environment variable handling (internal improvement), with no user-facing impact. --- # Release Notes 1.2 ## What's Changed[​](#whats-changed "Direct link to What's Changed") ### ADBC Oracle — Arpe.io ADBC FastDriver[​](#adbc-oracle--arpeio-adbc-fastdriver "Direct link to ADBC Oracle — Arpe.io ADBC FastDriver") FastBCP now supports ADBC for Oracle via the `--connectiontype adbc_oracle` connector, powered by the new ADBC Arrow\_TTC driver (Arpe.io ADBC FastDriver). It speaks Oracle's TNS/TTC wire protocol natively — no Oracle Client / Instant Client required. **Key highlights:** * Ultra-fast Parquet exports from Oracle * Native Arrow columnar format eliminates conversion overhead * Same high-performance ADBC approach as the existing `adbc_mssql` and `adbc_pgsql` connectors * EZConnect source syntax (`host[:port]/service`) * Supports the `Rowid` parallel method for parallel extraction, in addition to `oraodp` * Parquet is the only supported output format for this connector See [Connection Parameters documentation](/1.2/documentation/cli/connection_parameters.md#connection-type) for more details. ### New Environment Variables[​](#new-environment-variables "Direct link to New Environment Variables") Added three new environment variables: * `FASTBCP_ADBC_BATCHCELLS`: controls the size (in cells, i.e. rows × columns) of the Arrow record batches fetched by the ADBC connectors (`adbc_mssql`, `adbc_pgsql`). **Default:** `500000` (500,000 cells). Sizing by cell count keeps batch memory usage predictable across tables of different widths. See the [FASTBCP\_ADBC\_BATCHCELLS documentation](/1.2/documentation/environment-variables/fastbcp-adbc-batchcells.md) for details. * `FASTBCP_SYSTEMINFO_COLLECT`: collects system information (CPU, memory, OS, etc.) while a run is in progress. **Disabled by default.** See the [FASTBCP\_SYSTEMINFO\_COLLECT documentation](/1.2/documentation/environment-variables/fastbcp-systeminfo-collect.md) for details. * `FASTBCP_PERFORMANCE_COLLECT`: collects performance information (CPU usage, memory usage, etc.) while a run is in progress. **Disabled by default.** See the [FASTBCP\_PERFORMANCE\_COLLECT documentation](/1.2/documentation/environment-variables/fastbcp-performance-collect.md) for details. To enable system and performance diagnostics collection: * Windows * Linux ``` $env:FASTBCP_SYSTEMINFO_COLLECT = $True $env:FASTBCP_PERFORMANCE_COLLECT = $True ``` ``` export FASTBCP_SYSTEMINFO_COLLECT=True export FASTBCP_PERFORMANCE_COLLECT=True ``` ## Bug Fixes[​](#bug-fixes "Direct link to Bug Fixes") ### ODBC with DSN — Login/Password Authentication[​](#odbc-with-dsn--loginpassword-authentication "Direct link to ODBC with DSN — Login/Password Authentication") Fixed an issue where the `odbc` connection type with a DSN (`--dsn`) only worked with integrated (Windows/trusted) authentication. Providing explicit `--user` / `--password` credentials had no effect and the connection silently fell back to integrated authentication. DSN connections now correctly authenticate with the supplied login/password. ### ADBC MSSQL — Column Limit Raised[​](#adbc-mssql--column-limit-raised "Direct link to ADBC MSSQL — Column Limit Raised") Fixed a limitation in the `adbc_mssql` connector that restricted exports to tables with fewer than 256 columns. The limit has been raised to support standard tables with up to 1024 columns. --- # Sitemap ## [Installation](/1.2/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](/1.2/.md) * CLI Reference * [Authentication](/1.2/documentation/cli/authentication.md) * [Connection Parameters](/1.2/documentation/cli/connection_parameters.md) * [Source Info](/1.2/documentation/cli/source_info.md) * [Output Info](/1.2/documentation/cli/output_info.md) * [CSV Formatting](/1.2/documentation/cli/csv_formatting.md) * [Parquet Formatting](/1.2/documentation/cli/parquet_formatting.md) * [Cloud Options](/1.2/documentation/cli/cloud_options.md) * [Parallel Parameters](/1.2/documentation/cli/parallel_parameters.md) * [Advanced Parameters](/1.2/documentation/cli/advanced_parameters.md) * [License](/1.2/documentation/cli/license.md) * Environment Variables * [Overview](/1.2/documentation/environment-variables/overview.md) * [FASTBCP\_CLOUD\_ISBUFFERED](/1.2/documentation/environment-variables/fastbcp-cloud-isbuffered.md) * [FASTBCP\_TMPPATH](/1.2/documentation/environment-variables/fastbcp-tmppath.md) * [FASTBCP\_CLOUD\_MAXUPLOADTHREAD\_PER\_STREAM](/1.2/documentation/environment-variables/fastbcp-cloud-maxuploadthread-per-stream.md) * [FASTBCP\_RGSIZE](/1.2/documentation/environment-variables/fastbcp-rgsize.md) * [FASTBCP\_UID\_STRING\_CASING](/1.2/documentation/environment-variables/fastbcp-uid-string-casing.md) * [FASTBCP\_DATEFORMAT](/1.2/documentation/environment-variables/fastbcp-dateformat.md) * [FASTBCP\_ADBC\_BATCHCELLS](/1.2/documentation/environment-variables/fastbcp-adbc-batchcells.md) * [FASTBCP\_SYSTEMINFO\_COLLECT](/1.2/documentation/environment-variables/fastbcp-systeminfo-collect.md) * [FASTBCP\_PERFORMANCE\_COLLECT](/1.2/documentation/environment-variables/fastbcp-performance-collect.md) * Cloud Connectivity * [Overview](/1.2/documentation/cloud-connectivity/overview.md) * [AWS S3](/1.2/documentation/cloud-connectivity/aws-s3.md) * [Azure](/1.2/documentation/cloud-connectivity/azure.md) * [Google Cloud Storage](/1.2/documentation/cloud-connectivity/google-cloud.md) * [OneLake](/1.2/documentation/cloud-connectivity/onelake.md) * Logging * [Overview](/1.2/documentation/logging/Overview.md) * [Logs Level](/1.2/documentation/logging/logs-level.md) * [Log Database](/1.2/documentation/logging/log-database.md) * [Log Files Names Mapping using variables](/1.2/documentation/logging/log-files-names-mapping-using-variables.md) * [OpenTelemetry](/1.2/documentation/logging/OpenTelemetry.md) * [Examples](/1.2/documentation/logging/examples.md) * Examples * [SQL Server Examples](/1.2/documentation/examples/sql-server.md) * [PostgreSQL Examples](/1.2/documentation/examples/postgresql.md) * [MySQL Examples](/1.2/documentation/examples/mysql.md) * [Oracle Examples](/1.2/documentation/examples/oracle.md) * [DB2 Examples](/1.2/documentation/examples/db2.md) * [Other Databases](/1.2/documentation/examples/other-databases.md) * [Output Formats](/1.2/documentation/examples/output-formats.md) * [Cloud Storage](/1.2/documentation/examples/cloud-storage.md) * [Advanced Scenarios](/1.2/documentation/examples/advanced-scenarios.md) * Compatibility * [Sources & Platforms](/1.2/documentation/compatibility/sources_platforms.md) * [Operating Systems](/1.2/documentation/compatibility/operating_systems.md) ## Datatypes Conversion[​](#datatypes-conversion "Direct link to Datatypes Conversion") * [Overview](/1.2/datatypes-conversion/overview.md) * SQL Server * [mssql](/1.2/datatypes-conversion/mssql/parquet.md) * [adbc\_mssql](/1.2/datatypes-conversion/mssql/adbc-parquet.md) * MySQL * [mysql](/1.2/datatypes-conversion/mysql/parquet.md) * Oracle * [oraodp](/1.2/datatypes-conversion/oracle/parquet.md) * [adbc\_oraodp](/1.2/datatypes-conversion/oracle/adbc-parquet.md) * PostgreSQL * [pgsql](/1.2/datatypes-conversion/postgresql/parquet.md) * [pgcopy](/1.2/datatypes-conversion/postgresql-copy/parquet.md) * [adbc\_pgsql](/1.2/datatypes-conversion/postgresql/adbc-parquet.md) * SAP HANA * [hana](/1.2/datatypes-conversion/saphana/parquet.md) * Teradata * [teradata](/1.2/datatypes-conversion/teradata/parquet.md) ## Integration[​](#integration "Direct link to Integration") * [Docker](/1.2/integration/docker-integration.md) * [Kestra](/1.2/integration/kestra-integration.md) * [Airflow](/1.2/integration/airflow-integration.md) * [PostgreSQL](/1.2/integration/postgresql-integration.md) ## Release Notes[​](#release-notes "Direct link to Release Notes") * [Release Notes 1.2](/1.2/release-notes/release-notes-1.2.md) * [Release Notes 1.1](/1.2/release-notes/release-notes-1.1.md) * [Release Notes 1.0](/1.2/release-notes/release-notes-1.0.md) * [Release Notes 0.32](/1.2/release-notes/release-notes-0.32.md) ## AI Integrations[​](#ai-integrations "Direct link to AI Integrations") * [FastBCP Agent Skill](/1.2/ai/agent-skills.md) ## [Sitemap](/1.2/sitemap.md)[​](#sitemap-1 "Direct link to sitemap-1") --- # FastBCP Command Wizard Expand All\[ ] ### PlatformWindows Windows ![Linux](/img/tux.svg)Linux ### Connection ParametersMS SQL Server Connection Type? : ADBC (High Performance) MS SQL Server (Arpe.io ADBC FastDriver) PostgreSQL (Arpe.io ADBC FastDriver) Oracle (Arpe.io ADBC FastDriver) Standard Drivers ClickHouse MS SQL Server MySQL Netezza ODBC OLEDB Oracle (ODP) PostgreSQL (pgcopy) PostgreSQL (pgsql) SAP HANA Teradata | Provider? : | SQLOLEDB | | ------------------------ | ----------------------------- | | Server? : | mss-server,1433 | | Source Connect String? : | Server=myserver;Database=mydb | | DSN? : | MyDSN | | Trusted? : | \[ ] | | User? : | username | | Password? : | password | | Database? : | mydb | | Application Intent? : | ReadOnlyReadWrite | ### Source Query / Table ### Output Options ### Format Options ### Parquet Options ### Cloud Options ### Parallel Parameters ### Advanced Parameters ### License ### Generated Command Multi-line\[x] generate config sharecopy ``` ``` --- # Getting Started with FastBCP If you haven't installed FastBCP yet, please check the [Installation](/1.3/installation.md) section first. You can also build your first FastBCP command using our interactive [Command Builder Wizard](/latest/wizard.md). [FastBCP Tutorial](https://www.youtube.com/embed/Tpmc6NrTtuM) --- # FastBCP Agent Skill arpe.io publishes official agent skills in the [arpe-io/arpeio-skills](https://github.com/arpe-io/arpeio-skills) GitHub repository. The [`fastbcp`](https://github.com/arpe-io/arpeio-skills/tree/main/plugins/fastbcp/skills/fastbcp) skill teaches your AI agent how to build, explain and troubleshoot FastBCP commands: which parameters exist, which options fit together, which parallel method to choose, and which mistakes to avoid. The same repository also has skills for FastTransfer, MigratorXpress, LakeXpress and the arpe.io ADBC drivers. ## Claude Code[​](#claude-code "Direct link to Claude Code") Install the skill as a plugin from the arpe.io marketplace: ``` /plugin install fastbcp --marketplace arpe-io/arpeio-skills ``` Or in two steps: ``` /plugin marketplace add arpe-io/arpeio-skills /plugin install fastbcp@arpe-io ``` Then just ask, for example: *"Export dbo.Orders from SQL Server to Parquet on S3 with FastBCP, in parallel"*. To get the latest version of the skill later: ``` /plugin marketplace update arpe-io /plugin update fastbcp@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/fastbcp/skills/fastbcp / ``` For agents without skill support, paste the content of [`SKILL.md`](https://github.com/arpe-io/arpeio-skills/blob/main/plugins/fastbcp/skills/fastbcp/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 FastBCP version its facts were checked against. Before building a command, it asks the agent to check the installed version (`FastBCP --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 produces a wrong command, open an issue at [github.com/arpe-io/arpeio-skills/issues](https://github.com/arpe-io/arpeio-skills/issues) with the FastBCP version, the prompt you gave, and the command the agent produced (with passwords and licence text removed). --- # SQL Server (ADBC) → Parquet Datatypes conversion mapping when exporting from **SQL Server** using the ADBC connector (`--connectiontype adbc_mssql`) to **Parquet** format. Platform availability The ADBC FastDriver connectors (`adbc_mssql`, `adbc_pgsql`) are available on **Windows x64** and **Linux x64** only. They are **not** supported on **Linux ARM64**. info The ADBC connector does not map every type the way the standard [`mssql`](/1.3/datatypes-conversion/mssql/parquet.md) driver does. Compare both pages before switching. | | | | --------------- | ------------------------ | | **Source** | SQL Server (adbc\_mssql) | | **Format** | Parquet | | **FastBCP** | 1.3.0.0 | | **Test Status** | PARTIAL (30/31 Nullable) | Failed Types The following datatype is **not supported** with this connector: * `SQL_VARIANT` — export fails ## Parquet Schema: testdatatypes\_nullable[​](#parquet-schema-testdatatypes_nullable "Direct link to Parquet Schema: testdatatypes_nullable") | name | physical\_type | converted\_type | logical\_type | | --------------------- | ----------------------- | ----------------- | --------------------------------------------- | | col\_bigint | INT64 | — | — | | col\_int | INT32 | — | — | | col\_smallint | INT32 | INT\_16 | IntType(bitWidth=16, isSigned=1) | | col\_tinyint | INT32 | UINT\_8 | IntType(bitWidth=8, isSigned=0) | | col\_bit | BOOLEAN | — | — | | col\_decimal | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=2, precision=18) | | col\_numeric | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=2, precision=18) | | col\_money | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=4, precision=19) | | col\_smallmoney | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=4, precision=10) | | col\_float | DOUBLE | — | — | | col\_real | FLOAT | — | — | | col\_date | INT32 | DATE | DateType() | | col\_time | INT64 | — | TimeType(isAdjustedToUTC=0, unit=NANOS) | | col\_datetime | INT64 | TIMESTAMP\_MILLIS | TimestampType(isAdjustedToUTC=0, unit=MILLIS) | | col\_datetime2 | INT64 | — | TimestampType(isAdjustedToUTC=0, unit=NANOS) | | col\_datetimeoffset | INT64 | — | TimestampType(isAdjustedToUTC=1, unit=NANOS) | | col\_smalldatetime | INT64 | TIMESTAMP\_MILLIS | TimestampType(isAdjustedToUTC=0, unit=MILLIS) | | col\_char | BYTE\_ARRAY | UTF8 | StringType() | | col\_varchar | BYTE\_ARRAY | UTF8 | StringType() | | col\_nchar | BYTE\_ARRAY | UTF8 | StringType() | | col\_nvarchar | BYTE\_ARRAY | UTF8 | StringType() | | col\_text | BYTE\_ARRAY | UTF8 | StringType() | | col\_ntext | BYTE\_ARRAY | UTF8 | StringType() | | col\_binary | BYTE\_ARRAY | — | — | | col\_varbinary | BYTE\_ARRAY | — | — | | col\_image | BYTE\_ARRAY | — | — | | col\_uniqueidentifier | BYTE\_ARRAY | UTF8 | StringType() | | col\_xml | BYTE\_ARRAY | UTF8 | StringType() | | col\_geography | BYTE\_ARRAY | — | — | | col\_geometry | BYTE\_ARRAY | — | — | --- # SQL Server → Parquet Datatypes conversion mapping when exporting from **SQL Server** (`--connectiontype mssql`) to **Parquet** format. | | | | --------------- | ------------------ | | **Source** | SQL Server (mssql) | | **Format** | Parquet | | **FastBCP** | 1.3.0.0 | | **Test Status** | PASS (Nullable) | ## Parquet Schema: testdatatypes\_nullable[​](#parquet-schema-testdatatypes_nullable "Direct link to Parquet Schema: testdatatypes_nullable") | name | physical\_type | converted\_type | logical\_type | | --------------------- | ----------------------- | ----------------- | ---------------------------------------- | | col\_bigint | INT64 | INT\_64 | IntType(bitWidth=64, isSigned=1) | | col\_int | INT32 | INT\_32 | IntType(bitWidth=32, isSigned=1) | | col\_smallint | INT32 | INT\_16 | IntType(bitWidth=16, isSigned=1) | | col\_tinyint | INT32 | UINT\_8 | IntType(bitWidth=8, isSigned=0) | | col\_bit | BOOLEAN | — | — | | col\_decimal | INT64 | DECIMAL | DecimalType(scale=2, precision=18) | | col\_numeric | INT64 | DECIMAL | DecimalType(scale=2, precision=18) | | col\_money | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=4, precision=19) | | col\_smallmoney | INT64 | DECIMAL | DecimalType(scale=4, precision=10) | | col\_float | DOUBLE | — | — | | col\_real | FLOAT | — | — | | col\_date | INT32 | DATE | — | | col\_time | INT64 | — | TimeType(isAdjustedToUTC=0, unit=MICROS) | | col\_datetime | INT64 | TIMESTAMP\_MILLIS | — | | col\_datetime2 | INT64 | TIMESTAMP\_MILLIS | — | | col\_datetimeoffset | BYTE\_ARRAY | UTF8 | StringType() | | col\_smalldatetime | INT64 | TIMESTAMP\_MILLIS | — | | col\_char | BYTE\_ARRAY | UTF8 | StringType() | | col\_varchar | BYTE\_ARRAY | UTF8 | StringType() | | col\_nchar | BYTE\_ARRAY | UTF8 | StringType() | | col\_nvarchar | BYTE\_ARRAY | UTF8 | StringType() | | col\_text | BYTE\_ARRAY | UTF8 | StringType() | | col\_ntext | BYTE\_ARRAY | UTF8 | StringType() | | col\_binary | BYTE\_ARRAY | — | — | | col\_varbinary | BYTE\_ARRAY | — | — | | col\_image | BYTE\_ARRAY | — | — | | col\_uniqueidentifier | BYTE\_ARRAY | UTF8 | StringType() | | col\_xml | BYTE\_ARRAY | UTF8 | StringType() | | col\_sql\_variant | BYTE\_ARRAY | UTF8 | StringType() | | col\_geography | BYTE\_ARRAY | UTF8 | StringType() | | col\_geometry | BYTE\_ARRAY | UTF8 | StringType() | --- # MySQL → Parquet Datatypes conversion mapping when exporting from **MySQL** (`--connectiontype mysql`) to **Parquet** format. | | | | --------------- | --------------- | | **Source** | MySQL (mysql) | | **Format** | Parquet | | **FastBCP** | 1.3.0.0 | | **Test Status** | PASS (Nullable) | ## Parquet Schema: testdatatypes\_nullable[​](#parquet-schema-testdatatypes_nullable "Direct link to Parquet Schema: testdatatypes_nullable") | name | physical\_type | converted\_type | logical\_type | | --------------- | -------------- | ----------------- | ---------------------------------- | | col\_bigint | INT64 | INT\_64 | IntType(bitWidth=64, isSigned=1) | | col\_int | INT32 | INT\_32 | IntType(bitWidth=32, isSigned=1) | | col\_mediumint | INT32 | INT\_32 | IntType(bitWidth=32, isSigned=1) | | col\_smallint | INT32 | INT\_16 | IntType(bitWidth=16, isSigned=1) | | col\_tinyint | BYTE\_ARRAY | UTF8 | StringType() | | col\_bit | BYTE\_ARRAY | UTF8 | StringType() | | col\_decimal | INT64 | DECIMAL | DecimalType(scale=2, precision=18) | | col\_float | FLOAT | — | — | | col\_double | DOUBLE | — | — | | col\_date | INT64 | TIMESTAMP\_MILLIS | — | | col\_time | BYTE\_ARRAY | UTF8 | StringType() | | col\_datetime | INT64 | TIMESTAMP\_MILLIS | — | | col\_timestamp | INT64 | TIMESTAMP\_MILLIS | — | | col\_year | INT32 | INT\_32 | IntType(bitWidth=32, isSigned=1) | | col\_char | BYTE\_ARRAY | UTF8 | StringType() | | col\_varchar | BYTE\_ARRAY | UTF8 | StringType() | | col\_tinytext | BYTE\_ARRAY | UTF8 | StringType() | | col\_text | BYTE\_ARRAY | UTF8 | StringType() | | col\_mediumtext | BYTE\_ARRAY | UTF8 | StringType() | | col\_longtext | BYTE\_ARRAY | UTF8 | StringType() | | col\_binary | BYTE\_ARRAY | — | — | | col\_varbinary | BYTE\_ARRAY | — | — | | col\_tinyblob | BYTE\_ARRAY | — | — | | col\_blob | BYTE\_ARRAY | — | — | | col\_mediumblob | BYTE\_ARRAY | — | — | | col\_longblob | BYTE\_ARRAY | — | — | | col\_enum | BYTE\_ARRAY | UTF8 | StringType() | | col\_set | BYTE\_ARRAY | UTF8 | StringType() | | col\_json | BYTE\_ARRAY | UTF8 | StringType() | | col\_geometry | BYTE\_ARRAY | — | — | | col\_point | BYTE\_ARRAY | — | — | | col\_linestring | BYTE\_ARRAY | — | — | | col\_polygon | BYTE\_ARRAY | — | — | --- # Oracle (ADBC) → Parquet Datatypes conversion mapping when exporting from **Oracle** using the ADBC connector (`--connectiontype adbc_oracle`) to **Parquet** format. Platform availability The ADBC FastDriver connectors are available on **Windows x64** and **Linux x64** only. They are **not** supported on **Linux ARM64**. info The ADBC connector does not map every type the way the standard [`oraodp`](/1.3/datatypes-conversion/oracle/parquet.md) driver does. Compare both pages before switching. | | | | --------------- | ------------------------ | | **Source** | Oracle (adbc\_oracle) | | **Format** | Parquet | | **FastBCP** | 1.3.0.0 | | **Test Status** | PARTIAL (21/25 Nullable) | Failed Types The following datatypes are **not supported** with this connector: * `ROWID` — export fails * `UROWID` — export fails * `XMLTYPE` — export fails * `BFILE` — export fails ## Parquet Schema: testdatatypes\_nullable[​](#parquet-schema-testdatatypes_nullable "Direct link to Parquet Schema: testdatatypes_nullable") | name | physical\_type | converted\_type | logical\_type | | ------------------- | ----------------------- | ----------------- | --------------------------------------------- | | COL\_NUMBER | BYTE\_ARRAY | UTF8 | StringType() | | COL\_NUMBER10 | INT64 | — | — | | COL\_NUMBER18\_2 | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=2, precision=18) | | COL\_FLOAT | BYTE\_ARRAY | UTF8 | StringType() | | COL\_BINARY\_FLOAT | FLOAT | — | — | | COL\_BINARY\_DOUBLE | DOUBLE | — | — | | COL\_CHAR | BYTE\_ARRAY | UTF8 | StringType() | | COL\_VARCHAR2 | BYTE\_ARRAY | UTF8 | StringType() | | COL\_NCHAR | BYTE\_ARRAY | UTF8 | StringType() | | COL\_NVARCHAR2 | BYTE\_ARRAY | UTF8 | StringType() | | COL\_CLOB | BYTE\_ARRAY | UTF8 | StringType() | | COL\_NCLOB | BYTE\_ARRAY | UTF8 | StringType() | | COL\_BLOB | BYTE\_ARRAY | — | — | | COL\_RAW | BYTE\_ARRAY | — | — | | COL\_LONG\_RAW | BYTE\_ARRAY | — | — | | COL\_DATE | INT64 | TIMESTAMP\_MILLIS | TimestampType(isAdjustedToUTC=0, unit=MILLIS) | | COL\_TIMESTAMP | INT64 | TIMESTAMP\_MICROS | TimestampType(isAdjustedToUTC=0, unit=MICROS) | | COL\_TIMESTAMP\_TZ | INT64 | TIMESTAMP\_MICROS | TimestampType(isAdjustedToUTC=1, unit=MICROS) | | COL\_TIMESTAMP\_LTZ | INT64 | TIMESTAMP\_MICROS | TimestampType(isAdjustedToUTC=1, unit=MICROS) | | COL\_INTERVAL\_YM | INT64 | — | — | | COL\_INTERVAL\_DS | BYTE\_ARRAY | UTF8 | StringType() | --- # Oracle → Parquet Datatypes conversion mapping when exporting from **Oracle** (`--connectiontype oraodp`) to **Parquet** format. | | | | --------------- | --------------- | | **Source** | Oracle (oraodp) | | **Format** | Parquet | | **FastBCP** | 1.3.0.0 | | **Test Status** | PASS (Nullable) | ## Parquet Schema: testdatatypes\_nullable[​](#parquet-schema-testdatatypes_nullable "Direct link to Parquet Schema: testdatatypes_nullable") | name | physical\_type | converted\_type | logical\_type | | ------------------- | ----------------------- | ----------------- | ----------------------------------- | | COL\_NUMBER | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=18, precision=38) | | COL\_NUMBER10 | INT64 | INT\_64 | IntType(bitWidth=64, isSigned=1) | | COL\_NUMBER18\_2 | INT64 | DECIMAL | DecimalType(scale=2, precision=18) | | COL\_FLOAT | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=18, precision=38) | | COL\_BINARY\_FLOAT | FLOAT | — | — | | COL\_BINARY\_DOUBLE | DOUBLE | — | — | | COL\_CHAR | BYTE\_ARRAY | UTF8 | StringType() | | COL\_VARCHAR2 | BYTE\_ARRAY | UTF8 | StringType() | | COL\_NCHAR | BYTE\_ARRAY | UTF8 | StringType() | | COL\_NVARCHAR2 | BYTE\_ARRAY | UTF8 | StringType() | | COL\_CLOB | BYTE\_ARRAY | UTF8 | StringType() | | COL\_NCLOB | BYTE\_ARRAY | UTF8 | StringType() | | COL\_BLOB | BYTE\_ARRAY | — | — | | COL\_RAW | BYTE\_ARRAY | — | — | | COL\_LONG\_RAW | BYTE\_ARRAY | — | — | | COL\_DATE | INT64 | TIMESTAMP\_MILLIS | — | | COL\_TIMESTAMP | INT64 | TIMESTAMP\_MILLIS | — | | COL\_TIMESTAMP\_TZ | BYTE\_ARRAY | UTF8 | StringType() | | COL\_TIMESTAMP\_LTZ | INT64 | TIMESTAMP\_MILLIS | — | | COL\_INTERVAL\_YM | INT64 | INT\_64 | IntType(bitWidth=64, isSigned=1) | | COL\_INTERVAL\_DS | BYTE\_ARRAY | UTF8 | StringType() | | COL\_ROWID | BYTE\_ARRAY | UTF8 | StringType() | | COL\_UROWID | BYTE\_ARRAY | UTF8 | StringType() | | COL\_XMLTYPE | BYTE\_ARRAY | UTF8 | StringType() | | COL\_BFILE | BYTE\_ARRAY | — | — | --- # Datatypes Conversion When FastBCP exports a table, every native source column type is mapped to a type in the target output format. This section documents the **exact mappings** FastBCP produces. These pages are not a specification: each one is the Parquet schema read back from a real export of a test table covering all of the source's native datatypes. ## Supported Sources[​](#supported-sources "Direct link to Supported Sources") Sources are grouped by database system. A system can be read through several connection types (`--connectiontype`), and each one has its own page because the mappings it produces can differ — `pgcopy` produces exactly the same mappings as `pgsql`, while the ADBC connectors differ from their standard counterparts on several types. | Database | Connection Types | | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | SQL Server | [`mssql`](/1.3/datatypes-conversion/mssql/parquet.md) · [`adbc_mssql`](/1.3/datatypes-conversion/mssql/adbc-parquet.md) | | MySQL | [`mysql`](/1.3/datatypes-conversion/mysql/parquet.md) | | Oracle | [`oraodp`](/1.3/datatypes-conversion/oracle/parquet.md) · [`adbc_oracle`](/1.3/datatypes-conversion/oracle/adbc-parquet.md) | | PostgreSQL | [`pgsql`](/1.3/datatypes-conversion/postgresql/parquet.md) · [`pgcopy`](/1.3/datatypes-conversion/postgresql-copy/parquet.md) · [`adbc_pgsql`](/1.3/datatypes-conversion/postgresql/adbc-parquet.md) | | SAP HANA | [`hana`](/1.3/datatypes-conversion/saphana/parquet.md) | | Teradata | [`teradata`](/1.3/datatypes-conversion/teradata/parquet.md) | Parquet is the only output format documented here. ## How to Read a Page[​](#how-to-read-a-page "Direct link to How to Read a Page") Each page opens with a summary of the export it documents — source, output format, the FastBCP build used and the test status — followed by the Parquet schema produced from the **`testdatatypes_nullable`** table, in which every column accepts `NULL`. | Column | Description | | ------------------- | ------------------------------------------------------------------------------------------------------------------------- | | **name** | The column name in the source table | | **physical\_type** | The Parquet physical storage type: `BOOLEAN`, `INT32`, `INT64`, `FLOAT`, `DOUBLE`, `BYTE_ARRAY` or `FIXED_LEN_BYTE_ARRAY` | | **converted\_type** | The legacy Parquet annotation on top of it (`UTF8`, `DECIMAL`, `DATE`, `TIMESTAMP_MILLIS`, …) | | **logical\_type** | The modern Parquet annotation (`StringType()`, `DecimalType(scale=2, precision=18)`, `IntType(…)`, …) | A `—` means the column carries no annotation of that kind, so the physical type alone describes it. NOT NULL columns Declaring the source columns `NOT NULL` does not change the mapping. The only difference is the Parquet repetition level (REQUIRED instead of OPTIONAL), which these tables do not show. --- # PostgreSQL COPY → Parquet Datatypes conversion mapping when exporting from **PostgreSQL** using the COPY protocol (`--connectiontype pgcopy`) to **Parquet** format. info The COPY protocol variant produces the same type mappings as the standard PostgreSQL driver. See also [PostgreSQL (pgsql)](/1.3/datatypes-conversion/postgresql/parquet.md). | | | | --------------- | ------------------------ | | **Source** | PostgreSQL COPY (pgcopy) | | **Format** | Parquet | | **FastBCP** | 1.3.0.0 | | **Test Status** | PASS (Nullable) | ## Parquet Schema: testdatatypes\_nullable[​](#parquet-schema-testdatatypes_nullable "Direct link to Parquet Schema: testdatatypes_nullable") | name | physical\_type | converted\_type | logical\_type | | ---------------------- | ----------------------- | ----------------- | ---------------------------------------- | | col\_bigint | INT64 | INT\_64 | IntType(bitWidth=64, isSigned=1) | | col\_integer | INT32 | INT\_32 | IntType(bitWidth=32, isSigned=1) | | col\_smallint | INT32 | INT\_16 | IntType(bitWidth=16, isSigned=1) | | col\_boolean | BOOLEAN | — | — | | col\_numeric | INT64 | DECIMAL | DecimalType(scale=2, precision=18) | | col\_real | FLOAT | — | — | | col\_double\_precision | DOUBLE | — | — | | col\_money | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=4, precision=19) | | col\_date | INT32 | DATE | — | | col\_time | INT32 | TIME\_MILLIS | TimeType(isAdjustedToUTC=0, unit=MILLIS) | | col\_timestamp | INT64 | TIMESTAMP\_MILLIS | — | | col\_timestamptz | BYTE\_ARRAY | UTF8 | StringType() | | col\_interval | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | col\_char | BYTE\_ARRAY | UTF8 | StringType() | | col\_varchar | BYTE\_ARRAY | UTF8 | StringType() | | col\_text | BYTE\_ARRAY | UTF8 | StringType() | | col\_bytea | BYTE\_ARRAY | — | — | | col\_uuid | BYTE\_ARRAY | UTF8 | StringType() | | col\_json | BYTE\_ARRAY | UTF8 | StringType() | | col\_jsonb | BYTE\_ARRAY | — | — | | col\_xml | BYTE\_ARRAY | UTF8 | StringType() | | col\_inet | BYTE\_ARRAY | UTF8 | StringType() | | col\_cidr | BYTE\_ARRAY | UTF8 | StringType() | | col\_macaddr | BYTE\_ARRAY | UTF8 | StringType() | | col\_point | BYTE\_ARRAY | UTF8 | StringType() | | col\_line | BYTE\_ARRAY | UTF8 | StringType() | | col\_lseg | BYTE\_ARRAY | UTF8 | StringType() | | col\_box | BYTE\_ARRAY | UTF8 | StringType() | | col\_path | BYTE\_ARRAY | UTF8 | StringType() | | col\_polygon | BYTE\_ARRAY | UTF8 | StringType() | | col\_circle | BYTE\_ARRAY | UTF8 | StringType() | | col\_int4range | BYTE\_ARRAY | UTF8 | StringType() | | col\_int8range | BYTE\_ARRAY | UTF8 | StringType() | | col\_numrange | BYTE\_ARRAY | UTF8 | StringType() | | col\_tsrange | BYTE\_ARRAY | UTF8 | StringType() | | col\_tstzrange | BYTE\_ARRAY | UTF8 | StringType() | | col\_daterange | BYTE\_ARRAY | UTF8 | StringType() | | col\_bit | BYTE\_ARRAY | UTF8 | StringType() | | col\_bit\_varying | BYTE\_ARRAY | UTF8 | StringType() | | col\_oid | BYTE\_ARRAY | UTF8 | StringType() | | col\_int\_array | BYTE\_ARRAY | UTF8 | StringType() | --- # PostgreSQL (ADBC) → Parquet Datatypes conversion mapping when exporting from **PostgreSQL** using the ADBC connector (`--connectiontype adbc_pgsql`) to **Parquet** format. Platform availability The ADBC FastDriver connectors (`adbc_mssql`, `adbc_pgsql`) are available on **Windows x64** and **Linux x64** only. They are **not** supported on **Linux ARM64**. info The ADBC connector does not map every type the way the standard [`pgsql`](/1.3/datatypes-conversion/postgresql/parquet.md) driver does. Compare both pages before switching. | | | | --------------- | ------------------------ | | **Source** | PostgreSQL (adbc\_pgsql) | | **Format** | Parquet | | **FastBCP** | 1.3.0.0 | | **Test Status** | PARTIAL (40/41 Nullable) | Failed Types The following datatype is **not supported** with this connector: * `INTERVAL` — export fails ## Parquet Schema: testdatatypes\_nullable[​](#parquet-schema-testdatatypes_nullable "Direct link to Parquet Schema: testdatatypes_nullable") | name | physical\_type | converted\_type | logical\_type | | ---------------------- | ----------------------- | ----------------- | --------------------------------------------- | | col\_bigint | INT64 | — | — | | col\_integer | INT32 | — | — | | col\_smallint | INT32 | INT\_16 | IntType(bitWidth=16, isSigned=1) | | col\_boolean | BOOLEAN | — | — | | col\_numeric | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=2, precision=18) | | col\_real | FLOAT | — | — | | col\_double\_precision | DOUBLE | — | — | | col\_money | BYTE\_ARRAY | — | — | | col\_date | INT32 | DATE | DateType() | | col\_time | INT64 | — | TimeType(isAdjustedToUTC=0, unit=MICROS) | | col\_timestamp | INT64 | TIMESTAMP\_MICROS | TimestampType(isAdjustedToUTC=0, unit=MICROS) | | col\_timestamptz | INT64 | TIMESTAMP\_MICROS | TimestampType(isAdjustedToUTC=1, unit=MICROS) | | col\_char | BYTE\_ARRAY | UTF8 | StringType() | | col\_varchar | BYTE\_ARRAY | UTF8 | StringType() | | col\_text | BYTE\_ARRAY | UTF8 | StringType() | | col\_bytea | BYTE\_ARRAY | — | — | | col\_uuid | BYTE\_ARRAY | UTF8 | StringType() | | col\_json | BYTE\_ARRAY | UTF8 | StringType() | | col\_jsonb | BYTE\_ARRAY | UTF8 | StringType() | | col\_xml | BYTE\_ARRAY | UTF8 | StringType() | | col\_inet | BYTE\_ARRAY | UTF8 | StringType() | | col\_cidr | BYTE\_ARRAY | UTF8 | StringType() | | col\_macaddr | BYTE\_ARRAY | UTF8 | StringType() | | col\_point | BYTE\_ARRAY | — | — | | col\_line | BYTE\_ARRAY | — | — | | col\_lseg | BYTE\_ARRAY | — | — | | col\_box | BYTE\_ARRAY | — | — | | col\_path | BYTE\_ARRAY | — | — | | col\_polygon | BYTE\_ARRAY | — | — | | col\_circle | BYTE\_ARRAY | — | — | | col\_int4range | BYTE\_ARRAY | — | — | | col\_int8range | BYTE\_ARRAY | — | — | | col\_numrange | BYTE\_ARRAY | — | — | | col\_tsrange | BYTE\_ARRAY | — | — | | col\_tstzrange | BYTE\_ARRAY | — | — | | col\_daterange | BYTE\_ARRAY | — | — | | col\_bit | BYTE\_ARRAY | UTF8 | StringType() | | col\_bit\_varying | BYTE\_ARRAY | UTF8 | StringType() | | col\_oid | INT32 | — | — | | col\_int\_array | BYTE\_ARRAY | — | — | --- # PostgreSQL → Parquet Datatypes conversion mapping when exporting from **PostgreSQL** (`--connectiontype pgsql`) to **Parquet** format. info [PostgreSQL COPY](/1.3/datatypes-conversion/postgresql-copy/parquet.md) (`--connectiontype pgcopy`) produces identical type mappings. The [ADBC connector](/1.3/datatypes-conversion/postgresql/adbc-parquet.md) (`--connectiontype adbc_pgsql`) does not. | | | | --------------- | ------------------ | | **Source** | PostgreSQL (pgsql) | | **Format** | Parquet | | **FastBCP** | 1.3.0.0 | | **Test Status** | PASS (Nullable) | ## Parquet Schema: testdatatypes\_nullable[​](#parquet-schema-testdatatypes_nullable "Direct link to Parquet Schema: testdatatypes_nullable") | name | physical\_type | converted\_type | logical\_type | | ---------------------- | ----------------------- | ----------------- | ---------------------------------------- | | col\_bigint | INT64 | INT\_64 | IntType(bitWidth=64, isSigned=1) | | col\_integer | INT32 | INT\_32 | IntType(bitWidth=32, isSigned=1) | | col\_smallint | INT32 | INT\_16 | IntType(bitWidth=16, isSigned=1) | | col\_boolean | BOOLEAN | — | — | | col\_numeric | INT64 | DECIMAL | DecimalType(scale=2, precision=18) | | col\_real | FLOAT | — | — | | col\_double\_precision | DOUBLE | — | — | | col\_money | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=4, precision=19) | | col\_date | INT32 | DATE | — | | col\_time | INT32 | TIME\_MILLIS | TimeType(isAdjustedToUTC=0, unit=MILLIS) | | col\_timestamp | INT64 | TIMESTAMP\_MILLIS | — | | col\_timestamptz | BYTE\_ARRAY | UTF8 | StringType() | | col\_interval | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | col\_char | BYTE\_ARRAY | UTF8 | StringType() | | col\_varchar | BYTE\_ARRAY | UTF8 | StringType() | | col\_text | BYTE\_ARRAY | UTF8 | StringType() | | col\_bytea | BYTE\_ARRAY | — | — | | col\_uuid | BYTE\_ARRAY | UTF8 | StringType() | | col\_json | BYTE\_ARRAY | UTF8 | StringType() | | col\_jsonb | BYTE\_ARRAY | — | — | | col\_xml | BYTE\_ARRAY | UTF8 | StringType() | | col\_inet | BYTE\_ARRAY | UTF8 | StringType() | | col\_cidr | BYTE\_ARRAY | UTF8 | StringType() | | col\_macaddr | BYTE\_ARRAY | UTF8 | StringType() | | col\_point | BYTE\_ARRAY | UTF8 | StringType() | | col\_line | BYTE\_ARRAY | UTF8 | StringType() | | col\_lseg | BYTE\_ARRAY | UTF8 | StringType() | | col\_box | BYTE\_ARRAY | UTF8 | StringType() | | col\_path | BYTE\_ARRAY | UTF8 | StringType() | | col\_polygon | BYTE\_ARRAY | UTF8 | StringType() | | col\_circle | BYTE\_ARRAY | UTF8 | StringType() | | col\_int4range | BYTE\_ARRAY | UTF8 | StringType() | | col\_int8range | BYTE\_ARRAY | UTF8 | StringType() | | col\_numrange | BYTE\_ARRAY | UTF8 | StringType() | | col\_tsrange | BYTE\_ARRAY | UTF8 | StringType() | | col\_tstzrange | BYTE\_ARRAY | UTF8 | StringType() | | col\_daterange | BYTE\_ARRAY | UTF8 | StringType() | | col\_bit | BYTE\_ARRAY | UTF8 | StringType() | | col\_bit\_varying | BYTE\_ARRAY | UTF8 | StringType() | | col\_oid | BYTE\_ARRAY | UTF8 | StringType() | | col\_int\_array | BYTE\_ARRAY | UTF8 | StringType() | --- # SAP HANA → Parquet Datatypes conversion mapping when exporting from **SAP HANA** (`--connectiontype hana`) to **Parquet** format. | | | | --------------- | --------------- | | **Source** | SAP HANA (hana) | | **Format** | Parquet | | **FastBCP** | 1.3.0.0 | | **Test Status** | PASS (Nullable) | ## Parquet Schema: testdatatypes\_nullable[​](#parquet-schema-testdatatypes_nullable "Direct link to Parquet Schema: testdatatypes_nullable") | name | physical\_type | converted\_type | logical\_type | | ----------------- | -------------- | ----------------- | ---------------------------------- | | COL\_TINYINT | INT32 | UINT\_8 | IntType(bitWidth=8, isSigned=0) | | COL\_SMALLINT | INT32 | INT\_16 | IntType(bitWidth=16, isSigned=1) | | COL\_INTEGER | INT32 | INT\_32 | IntType(bitWidth=32, isSigned=1) | | COL\_BIGINT | INT64 | INT\_64 | IntType(bitWidth=64, isSigned=1) | | COL\_DECIMAL | INT64 | DECIMAL | DecimalType(scale=2, precision=18) | | COL\_SMALLDECIMAL | INT64 | DECIMAL | DecimalType(scale=0, precision=16) | | COL\_REAL | FLOAT | — | — | | COL\_DOUBLE | DOUBLE | — | — | | COL\_FLOAT | DOUBLE | — | — | | COL\_BOOLEAN | BOOLEAN | — | — | | COL\_DATE | INT64 | TIMESTAMP\_MILLIS | — | | COL\_TIME | BYTE\_ARRAY | UTF8 | StringType() | | COL\_TIMESTAMP | INT64 | TIMESTAMP\_MILLIS | — | | COL\_SECONDDATE | INT64 | TIMESTAMP\_MILLIS | — | | COL\_CHAR | BYTE\_ARRAY | UTF8 | StringType() | | COL\_VARCHAR | BYTE\_ARRAY | UTF8 | StringType() | | COL\_NCHAR | BYTE\_ARRAY | UTF8 | StringType() | | COL\_NVARCHAR | BYTE\_ARRAY | UTF8 | StringType() | | COL\_ALPHANUM | BYTE\_ARRAY | UTF8 | StringType() | | COL\_CLOB | BYTE\_ARRAY | UTF8 | StringType() | | COL\_NCLOB | BYTE\_ARRAY | UTF8 | StringType() | | COL\_BLOB | BYTE\_ARRAY | — | — | | COL\_BINARY | BYTE\_ARRAY | — | — | | COL\_VARBINARY | BYTE\_ARRAY | — | — | | COL\_ST\_GEOMETRY | BYTE\_ARRAY | — | — | | COL\_ST\_POINT | BYTE\_ARRAY | — | — | | COL\_SHORTTEXT | BYTE\_ARRAY | UTF8 | StringType() | --- # Teradata → Parquet Datatypes conversion mapping when exporting from **Teradata** (`--connectiontype teradata`) to **Parquet** format. | | | | --------------- | ------------------- | | **Source** | Teradata (teradata) | | **Format** | Parquet | | **FastBCP** | 1.3.0.0 | | **Test Status** | PASS (Nullable) | ## Parquet Schema: testdatatypes\_nullable[​](#parquet-schema-testdatatypes_nullable "Direct link to Parquet Schema: testdatatypes_nullable") | name | physical\_type | converted\_type | logical\_type | | ------------------------ | ----------------------- | ----------------- | ---------------------------------------- | | col\_byteint | INT32 | INT\_16 | IntType(bitWidth=16, isSigned=1) | | col\_smallint | INT32 | INT\_16 | IntType(bitWidth=16, isSigned=1) | | col\_integer | INT32 | INT\_32 | IntType(bitWidth=32, isSigned=1) | | col\_bigint | INT64 | INT\_64 | IntType(bitWidth=64, isSigned=1) | | col\_decimal18\_2 | INT64 | DECIMAL | DecimalType(scale=2, precision=18) | | col\_float | DOUBLE | — | — | | col\_number | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=18, precision=38) | | col\_number18\_2 | INT64 | DECIMAL | DecimalType(scale=2, precision=18) | | col\_date | INT32 | DATE | — | | col\_time | INT64 | — | TimeType(isAdjustedToUTC=0, unit=MICROS) | | col\_timestamp | INT64 | TIMESTAMP\_MILLIS | — | | col\_timestamp\_tz | BYTE\_ARRAY | UTF8 | StringType() | | tdintervalyear | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | tdintervalyeartomonth | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | tdintervalmonth | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | tdintervalday | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | tdintervaldaytohour | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | tdintervaldaytominute | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | tdintervaldaytosecond | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | tdintervalhour | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | tdintervalhourtominute | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | tdintervalhourtosecond | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | tdintervalminute | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | tdintervalminutetosecond | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | tdintervalsecond | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | col\_real | DOUBLE | — | — | | col\_double\_precision | DOUBLE | — | — | | col\_char | BYTE\_ARRAY | UTF8 | StringType() | | col\_varchar | BYTE\_ARRAY | UTF8 | StringType() | | col\_clob | BYTE\_ARRAY | UTF8 | StringType() | | col\_byte | BYTE\_ARRAY | — | — | | col\_varbyte | BYTE\_ARRAY | — | — | | col\_blob | BYTE\_ARRAY | — | — | | col\_period\_date | BYTE\_ARRAY | UTF8 | StringType() | | col\_period\_timestamp | BYTE\_ARRAY | UTF8 | StringType() | | col\_json | BYTE\_ARRAY | UTF8 | StringType() | | col\_xml | BYTE\_ARRAY | UTF8 | StringType() | | col\_st\_geometry | BYTE\_ARRAY | UTF8 | StringType() | --- # Advanced Parameters This section covers advanced configuration options for FastBCP. ## Run ID[​](#run-id "Direct link to Run ID") The Run ID parameter `--runid` is a unique identifier for the current export operation. It can be used for tracking, logging, and monitoring purposes. Information If not specified, FastBCP will generate a unique Run ID automatically. Tips If possible, inject the RunId provided by the caller (e.g., SSIS, Airflow, or any scheduler that supports a run identifier). This will greatly facilitate log correlation and troubleshooting. ``` ./FastBCP \ ... --runid "export-2024-01-09-001" \ ... ``` **Syntax:** * Long form only: `--runid ""` ## Log Level[​](#log-level "Direct link to Log Level") The Log Level parameter `--loglevel` controls the verbosity of logging output during export operations. **Available values:** * `Information` (default): Standard logging with key operation details * `Debug`: Verbose logging with detailed diagnostic information ``` ./FastBCP \ ... --loglevel "Debug" \ ... ``` **Syntax:** * Long form only: `--loglevel ""` note If a settings file is specified with `--settingsfile`, the log level defined in the settings file takes precedence unless overridden by the command-line parameter. Information See [Logging Overview](/1.3/documentation/logging/Overview.md) for detailed information about logging configuration and output. ## Settings File[​](#settings-file "Direct link to Settings File") The Settings File parameter `--settingsfile` allows you to store all FastBCP parameters in a configuration file, making it easier to manage complex exports and reuse configurations. ``` ./FastBCP \ ... --settingsfile "/path/to/config/export-config.json" \ ... ``` **Syntax:** * Long form only: `--settingsfile ""` Information See [Logging Overview](/1.3/documentation/logging/Overview.md) for examples of settings file configuration. ## Config File[​](#config-file "Direct link to Config File") The Config File parameter `--config` allows you to define all FastBCP parameters in a YAML configuration file. This provides a more structured and readable way to manage export configurations compared to JSON settings files. * Windows * Linux ``` .\FastBCP.exe --config samples\sample_mssql_to_csv.yaml ``` ``` ./FastBCP --config samples/sample_mssql_to_csv.yaml ``` **Syntax:** * Long form only: `--config ""` ### YAML Configuration Example[​](#yaml-configuration-example "Direct link to YAML Configuration Example") Here's a complete example of a YAML configuration file: ``` # FastBCP – MSSQL to CSV using RangeId parallel method # # Usage: # .\FastBCP.exe --config samples\sample_mssql_to_csv.yaml connection: type: mssql server: localhost database: tpch10_collation_bin2 trusted: true source: schema: dbo table: orders output: file: "mssql_orders_{startdate}.csv" directory: 'D:\temp\{database}\{schema}\{table}\full\' delimiter: "|" decimal_separator: "." date_format: "yyyy-MM-dd HH:mm:ss" encoding: UTF-8 performance: method: RangeId degree: -2 distribute_key_column: o_orderkey merge: false logging: run_id: mssql_to_csv_parallel-2_rangeid ``` Benefits of YAML Configuration * **Structured and readable**: YAML format is more human-friendly than JSON * **Comments support**: Add documentation directly in your configuration files * **Reusable configurations**: Version control your export settings * **Simplified command-line**: Reduce complex exports to a single `--config` parameter ## Traceparent[​](#traceparent "Direct link to Traceparent") The `--traceparent` parameter accepts a [W3C Trace Context](https://www.w3.org/TR/trace-context/) traceparent identifier from an external caller. This enables distributed trace correlation between FastBCP and upstream systems such as orchestrators, APIs, or CI/CD pipelines. Information See [OpenTelemetry](/1.3/documentation/logging/OpenTelemetry.md) for detailed information about configuring OpenTelemetry tracing and log export. ``` ./FastBCP \ ... --traceparent "00-abcdef1234567890abcdef1234567890-1234567890abcdef-01" \ ... ``` **Syntax:** * Long form only: `--traceparent ""` ## No Banner[​](#no-banner "Direct link to No Banner") Disable the FastBCP banner display in the command line output. This is useful for scripting or when you want cleaner output in automated processes. **Example:** ``` ./FastBCP \ ... --nobanner \ ... ``` **Syntax:** * Long form: `--nobanner` Clean Output Using `--nobanner` is recommended when running FastBCP 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 ``` .\FastBCP.exe ` --connectiontype "oraodp" ` --server "localhost:1521/OraService" ` --database "tpch" ` --user "FastUser" ` --password "FastPassword" ` --sourceschema "TPCH" ` --sourcetable "ORDERS" ` --directory "D:\temp" ` --fileoutput "orders.xlsx" ` --encoding "UTF-8" ` --parallelmethod RowId ` --paralleldegree 7 ` --merge false ` --loglevel "Debug" ` --runid "oracle_to_excel_parallel_rowid" ` --settingsfile "C:\config\oracle-export.json" ` --nobanner ``` ``` ./FastBCP \ --connectiontype "oraodp" \ --server "localhost:1521/OraService" \ --database "tpch" \ --user "FastUser" \ --password "FastPassword" \ --sourceschema "TPCH" \ --sourcetable "ORDERS" \ --directory "/temp" \ --fileoutput "orders.xlsx" \ --encoding "UTF-8" \ --parallelmethod RowId \ --paralleldegree 7 \ --merge false \ --loglevel "Debug" \ --runid "oracle_to_excel_parallel_rowid" \ --settingsfile "/config/oracle-export.json" \ --nobanner ``` This example: * Connects to an Oracle database using the RowId parallel method * Exports ORDERS table to Excel format with UTF-8 encoding * Uses 7 parallel threads with separate files (merge=false) * Enables Debug logging for detailed diagnostics * Uses a custom Run ID for tracking * Loads additional configuration from a settings file * Disables the banner for cleaner output --- # Authentication FastBCP supports two types of authentication methods depending on your database platform. ## Authentication Methods[​](#authentication-methods "Direct link to Authentication Methods") ### 1. Trusted Connection[​](#1-trusted-connection "Direct link to 1. Trusted Connection") Uses the current Windows user's credentials or the operating system authentication if allowed by the RDBMS. ``` .\FastBCP.exe ` ... --trusted ` ... ``` **Syntax:** * Short form: `-A` * Long form: `--trusted` Warning This method is only available if your RDBMS supports trusted/integrated authentication (e.g., SQL Server with Windows Authentication). ### 2. SQL Login with Username and Password[​](#2-sql-login-with-username-and-password "Direct link to 2. SQL Login with Username and Password") Standard database authentication with explicit credentials. ``` ./FastBCP ` ... --user "myuser" ` --password "mypassword" ` ... ``` **Syntax:** * Username: `-U "username"` or `--user "username"` * Password: `-X "password"` or `--password "password"` ### Alternative: Connection String Parameter[​](#alternative-connection-string-parameter "Direct link to Alternative: Connection String Parameter") You can also use the `--sourceconnectstring` parameter where you pass the user and password directly in the connection string. This parameter will be covered in detail in the [Connection Parameters](/1.3/documentation/cli/connection_parameters.md#source-connection-string) section. Password Security in Logs All passwords passed either through the `--password` parameter or within the `--sourceconnectstring` parameter 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 FASTBCP\_USER and FASTBCP\_PASSWORD for exemple or store the password in an encrypted file. Up to you to decrypt the file and it’s content before using it in a shell variable that will be used with FastBCP. --- # Cloud Options FastBCP supports direct exports to cloud storage platforms: AWS S3, Azure Blob Storage, Azure Data Lake Gen2, and Google Cloud Storage. For detailed cloud authentication setup and configuration, see the [Cloud Connectivity](/1.3/documentation/cloud-connectivity/overview.md) documentation. note FastBCP will use multi-part uploads for all cloud provider Warning Since FastBCP 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**. ## Supported Cloud Platforms[​](#supported-cloud-platforms "Direct link to Supported Cloud Platforms") To export data to a cloud storage service, use the URI scheme specific to your target destination with the `--directory` value | Platform | URI Scheme | Example | | ------------------------ | ------------ | ----------------------------------------------------------- | | **AWS S3** | `s3://` | `s3://my-bucket/data/` | | **Azure Blob** | `abs://` | `abs://myaccount.blob.core.windows.net/mycontainer/mydir/` | | **Azure Data Lake Gen2** | `abfss://` | `abfss://myaccount.dfs.core.windows.net/mycontainer/mydir/` | | **Google Cloud Storage** | `gs://` | `gs://my-bucket/data/` | | **S3-Compatible** | `s3://` | `s3://mybucket/export/` (MinIO, OVH, etc.) | | **OneLake** | `onelake://` | `onelake://MyWorSpace/MyLakeHouse/MyDir/` | ## Cloud Profile[​](#cloud-profile "Direct link to Cloud Profile") You can use the `--cloudprofile` parameter to specify which cloud credentials profile to use. ``` ./FastBCP \ ... --directory "s3://my-bucket/exports" \ --fileoutput "orders.parquet" \ --cloudprofile "production" \ ... ``` **Syntax:** * Long form: `--cloudprofile ` --- # Connection Parameters FastBCP requires connection information to access your database. This page covers all connection-related parameters. ## Connection Type[​](#connection-type "Direct link to Connection Type") Specify the type of database connection driver to use. This parameter determines how FastBCP connects to your database. ``` ./FastBCP \ ... --connectiontype mssql \ ... ``` **Syntax:** * Short form: `-C "connection_type"` * Long form: `--connectiontype "connection_type"` **Available Connection Types:** | Connection Type | Description | | --------------- | ------------------------------------------------------------------------------------------------------- | | `adbc_mssql` | Microsoft SQL Server via ADBC (Arpe.io ADBC FastDriver) - 2x faster for Parquet exports | | `adbc_pgsql` | PostgreSQL via ADBC (Arpe.io ADBC FastDriver) - ultra-fast Parquet exports | | `adbc_oracle` | Oracle via ADBC (Arpe.io ADBC FastDriver) - ultra-fast Parquet exports | | `adbc_netezza` | Netezza / IBM NPS via ADBC (embedded ArpeNetezza driver) - no NZdotNET needed, works with IBM Cloud NPS | | `clickhouse` | ClickHouse database | | `hana` | SAP HANA database | | `mssql` | Microsoft SQL Server (default) | | `mysql` | MySQL/MariaDB database | | `nzsql` | IBM Netezza | | `odbc` | Generic ODBC connection | | `oledb` | Generic OLE DB connection | | `oraodp` | Oracle Data Provider | | `pgcopy` | PostgreSQL with COPY protocol | | `pgsql` | PostgreSQL standard connection | | `teradata` | Teradata database | Platform availability The ADBC FastDriver connectors (`adbc_mssql`, `adbc_pgsql`, `adbc_oracle`, `adbc_netezza`) are available on **Windows x64** and **Linux x64** only. They are **not** supported on **Linux ARM64**. Parquet-only output ADBC connectors (`adbc_mssql`, `adbc_pgsql`, `adbc_oracle`, `adbc_netezza`) only support exporting to **Parquet** format. No other output format is supported with these connection types. ADBC end to end Since FastBCP 1.3, the ADBC connectors run fully on their ADBC driver: the metadata and planning step (row counts, column types, `Ntile`, `Random`, `Timepartition`, `DBPartition`, …) uses the same driver and the same connection string as the data step. No SqlClient, Npgsql, ODP.NET or NZdotNET is involved. ## DSN (Data Source Name)[​](#dsn-data-source-name "Direct link to DSN (Data Source Name)") If you have chosen an ODBC connection type, you must define the DSN with the `-N` or `--dsn` parameter, or alternatively define a connection string using `-g` or `--sourceconnectstring`. ``` ./FastBCP \ ... --connectiontype odbc \ --dsn "MyODBCDataSource" \ ... ``` **Syntax:** * Short form: `-N "DSN_name"` * Long form: `--dsn "DSN_name"` ## Provider[​](#provider "Direct link to Provider") If you have chosen an OLEDB connection type, you must define the OLEDB provider with the `-P` or `--provider` parameter. ``` ./FastBCP \ ... --connectiontype oledb \ --provider MSOLEDBSQL \ ... ``` ``` ./FastBCP \ ... --connectiontype oledb \ --provider NZOLEDB \ ... ``` **Syntax:** * Short form: `-P "provider_name"` * Long form: `--provider "provider_name"` ## Server[​](#server "Direct link to Server") Except if you have defined a connection string (`-g` or `--sourceconnectstring`), you must define a server (or could also be a TNS entry for Oracle). **Syntax:** * Short form: `-S "server"` * Long form: `--server "server"` ### Server Format Examples[​](#server-format-examples "Direct link to Server Format Examples") The server parameter accepts different formats depending on your database: **IP address or DNS name:** ``` ./FastBCP \ ... --server "myserver.mydomain.com" \ ... ``` **IP address or DNS name with port number:** ``` ./FastBCP \ ... --server "myserver.mydomain.com:2433" \ ... ``` or ``` ./FastBCP \ ... --server "myserver.mydomain.com,2433" \ ... ``` **IP address or DNS name with named instance:** ``` ./FastBCP \ ... --server "myserver.mydomain.com\myinstance" \ ... ``` **For Oracle - Easy Connect string:** ``` ./FastBCP \ ... --server "myserver.mydomain.com:1521/myinstance" \ ... ``` ## Trusted or User & Password[​](#trusted-or-user--password "Direct link to Trusted or User & Password") ### Trusted[​](#trusted "Direct link to Trusted") You can used a trusted (Windows or Kerberos Authentication) using the `--trusted` switch parameter. ``` ./FastBCP \ ... --server "myserver.mydomain.com\myinstance \ --trusted \ --database MySourceDB" \ ... ``` ### User and Password[​](#user-and-password "Direct link to User and Password") You can also provide a user and password the `--user` and `--password` can be used like this ``` ./FastBCP \ ... --server "myserver.mydomain.com\myinstance \ --user "FastUser" \ --password "FastPassword" \ --database MySourceDB" \ ... ``` ## 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 database. This connection string will override any other connection parameters and can be used if the other authentication mode are not enougth for your case You can use the connection string for any connection type. The connection string must be enclosed in double quotes. **Example:** ``` ./FastBCP \ ... --sourceconnectstring "Server=myserver;Database=mydb;User ID=FastUser;Password=FastPassword;Encrypt=True;TrustServerCertificate=True" ... ``` **Syntax:** * Short form: `-g "connection_string"` * Long form: `--sourceconnectstring "connection_string"` Passwords in logs Passwords are masked in logs and telemetry, including quoted passwords containing `;` (e.g. `Password="p;w=1"`). ### Connection Strings with ADBC Connectors[​](#connection-strings-with-adbc-connectors "Direct link to Connection Strings with ADBC Connectors") With the ADBC connection types (`adbc_mssql`, `adbc_pgsql`, `adbc_oracle`, `adbc_netezza`), `--sourceconnectstring` accepts: * The **native syntax** of the database (ADO.NET-style `Key=Value;` pairs), translated to the driver keys * Explicit **`adbc.*` / `arpeio.*` keys**, which win over translated keys * A **whole-connection** `uri` / `adbc..connection_string` Native keys with no driver equivalent (e.g. `Pooling=false`) are dropped with a warning. With a whole-connection `uri` / `connection_string`, native keys are dropped with a warning: put them inside the URI / connection string instead. A `Driver=` path in `--sourceconnectstring` is used for both the metadata and the data step. #### adbc\_netezza[​](#adbc_netezza "Direct link to adbc_netezza") Keys do not need the `adbc.arpenz.` prefix. All of the following are accepted: | Kind | Keys | | ----------------------- | ----------------------------------------------------------------------------------------------------------- | | Friendly / ADO.NET keys | `Server`, `Host`, `host:port`, `Port`, `Database`, `User ID`, `Password`, `SSL Mode`, `Application Name`, … | | Plain driver keys | `sslmode`, `tls_min_version`, `char_encoding`, `login_timeout`, … | | Whole connection | `uri`, `connection_string` | Keys the driver does not support (e.g. `propagate`, `Pooling`) are ignored, with a single warning. `Application Name` defaults to `FastBCP`. ``` ./FastBCP \ --connectiontype adbc_netezza \ --sourceconnectstring "Server=nps-host;Port=5480;Database=SALES;User ID=admin;Password=FastPassword;SSL Mode=require" \ ... ``` NPS 7.x NPS 7.x servers only offer TLS 1.0/1.1. Add `tls_min_version=1.0` to the connection string to connect to them. #### adbc\_pgsql[​](#adbc_pgsql "Direct link to adbc_pgsql") Like `-C pgsql`, `-C adbc_pgsql` honours `PGUSER`, `PGPASSWORD`, `PGPASSFILE` / `~/.pgpass` and `PGSSLROOTCERT` when `-U` / `-X` / `-g` do not provide them. A `NaN` in a `NUMERIC` column fails the read. Add `adbc.arpepgsql.numeric_special=null` to `--sourceconnectstring` to read it as `NULL` instead. #### adbc\_oracle[​](#adbc_oracle "Direct link to adbc_oracle") Like `-C oraodp`, `-C adbc_oracle` resolves TNS aliases through `tnsnames.ora` (looked up in `TNS_ADMIN`, then `$ORACLE_HOME/network/admin`), so `--server` can be a TNS alias. Network encryption and data integrity are negotiated with `encryption=accepted` and `data_integrity=accepted`, so the server decides, as with `-C oraodp`. Use the `FASTBCP_ADBC_ENCRYPTION` / `FASTBCP_ADBC_DATA_INTEGRITY` environment variables or explicit keys to override this. ## Database[​](#database "Direct link to Database") Optionally define a source database. **Example:** ``` ./FastBCP \ ... --database "AdventureWorks" \ ... ``` **Syntax:** * Short form: `-I "database_name"` * Long form: `--database "database_name"` ## Application Intent[​](#application-intent "Direct link to Application Intent") Specifies the application workload type when connecting to SQL Server. This parameter is only applicable for SQL Server (`mssql`, `adbc_mssql`) and OLEDB (`oledb`) connection types. With `adbc_mssql`, an `ApplicationIntent` key in `--sourceconnectstring` is also passed to the driver. **Syntax:** * Long form: `--applicationintent "ReadOnly|ReadWrite"` **Values:** * `ReadOnly` (default) - Declares the read-only workload type when connecting to a read-only replica in an Always On availability group * `ReadWrite` - Declares a read-write workload type (standard connection) **Example (Read-Only):** ``` ./FastBCP \ --connectiontype mssql \ --server "myserver.mydomain.com" \ --applicationintent ReadOnly \ --database "AdventureWorks" \ ... ``` **Example (Read-Write):** ``` ./FastBCP \ --connectiontype mssql \ --server "myserver.mydomain.com" \ --applicationintent ReadWrite \ --database "AdventureWorks" \ ... ``` info When using `ReadOnly`, the connection will be routed to a read-only replica if available in an Always On availability group configuration. This is useful for offloading reporting and export workloads from the primary replica. --- # CSV Formatting When exporting to CSV format (`.csv` extension), FastBCP provides extensive formatting options. ## Delimiter[​](#delimiter "Direct link to Delimiter") Use the `-d` or `--delimiter` parameter to specify the character(s) used to separate fields. ``` ./FastBCP \ ... --fileoutput "data.csv" \ --delimiter "," \ ... ``` **Syntax:** * Short form: `-d "delimiter"` * Long form: `--delimiter "delimiter"` **Default:** `,` (comma) ### Common Delimiters[​](#common-delimiters "Direct link to Common Delimiters") * Comma (CSV) * Tab (TSV) * Pipe * Semicolon ``` --delimiter "," ``` ``` --delimiter "\t" ``` ``` --delimiter "|" ``` ``` --delimiter ";" ``` ## Use Quotes[​](#use-quotes "Direct link to Use Quotes") Use the `-t` or `--quotes` switch to enclose string fields in double quotes. ``` ./FastBCP \ ... --fileoutput "products.csv" \ --quotes \ ... ``` **Syntax:** * Short form: `-t` * Long form: `--quotes` **Default:** Without quotes * Without --quotes * With --quotes ``` ProductID,ProductName,Description,Price 1,Widget A,Small widget,19.99 2,Widget B,Large widget,29.99 ``` ``` "ProductID","ProductName","Description","Price" "1","Widget A","Small widget","19.99" "2","Widget B","Large widget","29.99" ``` Information When `--quotes`, any double quotes (`"`) in the data are escaped with backslash (`\"`). ## Date Format[​](#date-format "Direct link to Date Format") Use the `-f` or `--dateformat` parameter to specify how dates and timestamps are formatted. ``` ./FastBCP \ ... --fileoutput "orders.csv" --dateformat "yyyy-MM-dd HH:mm:ss" \ ... ``` **Syntax:** * Short form: `-f "format"` * Long form: `--dateformat "format"` **Default:** `yyyy-MM-dd HH:mm:sszzz` Auto-adaptive formatting The date format is auto-adaptive based on the column type: * **Date-only** columns will always output as `yyyy-MM-dd` regardless of the format string * **Timestamp/DateTime** columns will output as `yyyy-MM-dd HH:mm:ss` even if a timezone token (`zzz`) is present in the format string * **DateTimeOffset** columns will include the timezone offset as specified ### Format Codes[​](#format-codes "Direct link to Format Codes") | Code | Description | Example | | ------ | ---------------- | -------- | | `yyyy` | 4-digit year | `2026` | | `MM` | Month (01-12) | `01` | | `dd` | Day (01-31) | `07` | | `HH` | Hour 24h (00-23) | `14` | | `mm` | Minute (00-59) | `30` | | `ss` | Second (00-59) | `22` | | `zzz` | UTC offset | `+02:00` | ## Decimal Separator[​](#decimal-separator "Direct link to Decimal Separator") Use the `-n` or `--decimalseparator` parameter to specify the decimal separator for numeric values. ``` ./FastBCP \ ... --fileoutput "products.csv" --decimalseparator "," ... ``` **Syntax:** * Short form: `-n "separator"` * Long form: `--decimalseparator "separator"` **Default:** `.` (period/dot) ## No Header[​](#no-header "Direct link to No Header") Use the `-h` or `--noheader` parameter to exclude column headers from the output. ``` ./FastBCP \ ... --fileoutput "customers.csv" \ --noheader \ ... ``` **Syntax:** * Short form: `-h` * Long form: `--noheader` - Without --noheader (default) - With --noheader ``` CustomerID,CustomerName,Email 1,John Doe,john@example.com 2,Jane Smith,jane@example.com ``` ``` 1,John Doe,john@example.com 2,Jane Smith,jane@example.com ``` ## Boolean Format[​](#boolean-format "Direct link to Boolean Format") Use the `-b` or `--boolformat` parameter to specify how boolean values are represented. ``` ./FastBCP \ ... --fileoutput "products.csv" \ --boolformat "1/0" \ ... ``` **Syntax:** * Short form: `-b "format"` * Long form: `--boolformat "format"` **Default:** `True/False` **Options:** * `true/false` * `True/False` (default) * `t/f` * `1/0` * `yes/no` * `y/n` **With `--boolformat "true/false"` (default):** ``` ProductID,ProductName,InStock,Discontinued 1,Widget A,true,false 2,Widget B,false,true ``` **With `--boolformat "1/0"`:** ``` ProductID,ProductName,InStock,Discontinued 1,Widget A,1,0 2,Widget B,0,1 ``` **With `--boolformat "yes/no"`:** ``` ProductID,ProductName,InStock,Discontinued 1,Widget A,yes,no 2,Widget B,no,yes ``` ## Complete Example[​](#complete-example "Direct link to Complete Example") * Windows * Linux ``` .\FastBCP.exe ` --connectiontype mssql ` --server "localhost" ` --database "AdventureWorks" ` --trusted ` --query "SELECT OrderID, OrderDate, CustomerName, TotalAmount, IsShipped FROM Sales.Orders WHERE OrderDate >= '2024-01-01'" ` --directory "C:\exports\sales" ` --fileoutput "orders_{startdate}.csv" ` --delimiter "," ` --quotes ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --decimalseparator "." ` --boolformat "1/0" ` --encoding "UTF-8" ``` ``` ./FastBCP \ --connectiontype mssql \ --server "localhost" \ --database "AdventureWorks" \ --trusted \ --query "SELECT OrderID, OrderDate, CustomerName, TotalAmount, IsShipped FROM Sales.Orders WHERE OrderDate >= '2024-01-01'" \ --directory "/exports/sales" \ --fileoutput "orders_{startdate}.csv" \ --delimiter "," \ --quotes \ --dateformat "yyyy-MM-dd HH:mm:ss" \ --decimalseparator "." \ --boolformat "1/0" \ --encoding "UTF-8" ``` **Output (orders\_20260107.csv):** ``` "OrderID","OrderDate","CustomerName","TotalAmount","IsShipped" "1001","2026-01-05 10:30:00","John Doe","299.99","1" "1002","2026-01-05 11:15:00","Jane Smith","149.50","0" "1003","2026-01-06 09:20:00","Bob Johnson","599.00","1" ``` tip For Excel compatibility, use `.xlsx` format instead: `--fileoutput "data.xlsx"` --- # License Configure how FastBCP 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 FastBCP license. By default, FastBCP will try to use the license file named `FastBCP.lic` in the same directory as the FastBCP executable. You can specify a custom license file using the `--license` parameter. ### License Sources[​](#license-sources "Direct link to License Sources") FastBCP 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 ``` .\FastBCP.exe ` ... --license "C:\licenses\FastBCP.lic" ` ... ``` ``` ./FastBCP \ ... --license "/path/to/licenses/FastBCP.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 ``` .\FastBCP.exe ` ... --license "https://licenseserve.yourdomain.lan/fastbcp.lic" ` ... ``` ``` ./FastBCP \ ... --license "https://licenseserve.yourdomain.lan/fastbcp.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:FASTBCP_LICENSE = "LICENSE_CONTENT_HERE" .\FastBCP.exe ` ... --license $env:FASTBCP_LICENSE ` ... # Using variable $license = Get-Content "C:\licenses\FastBCP.lic" -Raw .\FastBCP.exe ` ... --license $license ` ... ``` ``` # Using environment variable export FASTBCP_LICENSE="LICENSE_CONTENT_HERE" ./FastBCP \ ... --license "$FASTBCP_LICENSE" \ ... # Using variable license=$(cat /path/to/licenses/FastBCP.lic) ./FastBCP \ ... --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 parallel export: * Windows * Linux ``` .\FastBCP.exe ` --connectiontype pgsql ` --server "localhost:15432" ` --database "tpch10" ` --user "FastUser" ` --password "FastPassword" ` --query "SELECT * FROM dbo.orders" ` --directory "D:\temp" ` --fileoutput "pgsql_orders.parquet" ` --parallelmethod DataDriven ` --distributekeycolumn "YEAR(o_orderdate)" ` --paralleldegree 7 ` --merge false ` --runid "pgsql_to_parquet_parallel_datadriven" ` --license "//SharedUnc/licenses/fastbcp/fastbcp.lic" ``` ``` ./FastBCP \ --connectiontype pgsql \ --server "localhost:15432" \ --database "tpch10" \ --user "FastUser" \ --password "FastPassword" \ --query "SELECT * FROM dbo.orders" \ --directory "/temp" \ --fileoutput "pgsql_orders.parquet" \ --parallelmethod DataDriven \ --distributekeycolumn "YEAR(o_orderdate)" \ --paralleldegree 7 \ --merge false \ --runid "pgsql_to_parquet_parallel_datadriven" \ --license "//SharedUnc/licenses/fastbcp/fastbcp.lic" ``` This example: * Retrieves the license from a remote unc path * Connects to a PostgreSQL database * Exports orders data using DataDriven parallel method with 7 threads * Uses a YEAR expression on the distribute key column * Keeps distributed files separate (merge=false) --- # Output Info Configure where and how FastBCP saves exported data. ## Directory[​](#directory "Direct link to Directory") Use the `-D` or `--directory` parameter to specify where the output file(s) will be saved. ### Local Paths[​](#local-paths "Direct link to Local Paths") * Windows * Linux ``` .\FastBCP.exe \ ... --directory "C:\exports\sales\orders" \ ... ``` ``` ./FastBCP \ ... --directory "/exports/sales/orders" \ ... ``` ### UNC Paths[​](#unc-paths "Direct link to UNC Paths") For Windows network shares, you can use UNC paths: ``` .\FastBCP.exe \ ... --directory "\\server\share\exports\orders" \ ... ``` ### Cloud Paths[​](#cloud-paths "Direct link to Cloud Paths") FastBCP supports direct export to cloud storage: * AWS S3 * Azure Blob * Azure Data Lake Gen2 * Google Cloud Storage * S3-Compatible (MinIO, OVH) * OneLake ``` ./FastBCP \ ... --directory "s3://my-bucket/exports/orders" \ ... ``` ``` ./FastBCP \ ... --directory "abs://mystorageaccount.blob.core.windows.net/container/path" \ ... ``` ``` ./FastBCP \ ... --directory "abfss://mystorageaccount.dfs.core.windows.net/container/path/to/data" \ ... ``` ``` ./FastBCP \ ... --directory "gs://my-bucket/exports/orders" \ ... ``` ``` ./FastBCP \ ... --directory "s3://my-bucket/exports" \ ... ``` ``` ./FastBCP \ ... --directory "onelake://myworkspace.dfs.core.windows.net/lakehouse/path/to/data" \ ... ``` Information See [Cloud Options](/1.3/documentation/cli/cloud_options.md) for authentication and configuration details. **Syntax:** * Short form: `-D "path"` * Long form: `--directory "path"` ## Output File[​](#output-file "Direct link to Output File") Use the `-o` or `--fileoutput` parameter to specify the name of the output file. The file extension determines the output format. ``` ./FastBCP \ ... --fileoutput "orders.parquet" \ ... ``` **Syntax:** * Short form: `-o "filename"` * Long form: `--fileoutput "filename"` ### Supported Formats[​](#supported-formats "Direct link to Supported Formats") | Extension | Format | Description | | ---------- | ------------ | --------------------------------------------------- | | `.parquet` | Parquet | Columnar, compressed (recommended) | | `.csv` | CSV | Delimiter-separated values | | `.tsv` | TSV | Tab-separated values | | `.json` | JSON | JavaScript Object Notation | | `.bson` | BSON | Binary JSON | | `.xlsx` | Excel | Microsoft Excel format | | `.bin` | Binary | PostgreSQL COPY binary format | | `.csv.gz` | CSV Gzipped | Delimiter-separated values and compressed with Gzip | | `.tsv.gz` | TSV Gzipped | Tab delimited values and compressed with Gzip | | `.json.gz` | JSON Gzipped | JavaScript Object Notation with Gzip | ## Tokens[​](#tokens "Direct link to Tokens") Use tokens in `--directory` and `--fileoutput` parameters for dynamic paths and filenames. ``` ./FastBCP \ ... --directory "/exports/{sourcedatabase}/{sourceschema}" \ --fileoutput "{sourcetable}_{startdate}.parquet" \ ... ``` **Syntax:** Tokens are enclosed in curly braces `{token_name}` ### Available Tokens[​](#available-tokens "Direct link to Available Tokens") | Token | Description | Example Value | | ------------------------- | ---------------------------------- | ------------------------------------ | | `{sourcedatabase}` | Value from `--database` | `AdventureWorks` | | `{sourceschema}` | Value from `--sourceschema` | `Sales` | | `{sourcetable}` | Value from `--sourcetable` | `Orders` | | `{starttimestamp}` | Job start (yyyyMMddHHmmss) | `20260107143022` | | `{starttimestamp:FORMAT}` | Custom timestamp format | [See below](#timestamp-format-codes) | | `{startdate}` | Job start date (yyyyMMdd) | `20260107` | | `{starttime}` | Job start time (HHmmss) | `143022` | | `{starthour}` | Job start hour (HH) | `14` | | `{user}` | Username (from `--user` or system) | `dbuser` | | `{filetype}` | Output format extension | `parquet` | | `{datadrivencolumn}` | Data-driven split value | Varies | ### Timestamp Format Codes[​](#timestamp-format-codes "Direct link to Timestamp Format Codes") Use `{starttimestamp:FORMAT}` with custom format: | Format | Description | Example | | ------ | ---------------- | ------- | | `yyyy` | 4-digit year | `2026` | | `yy` | 2-digit year | `26` | | `MM` | Month (01-12) | `01` | | `dd` | Day (01-31) | `07` | | `HH` | Hour 24h (00-23) | `14` | | `mm` | Minute (00-59) | `30` | | `ss` | Second (00-59) | `22` | **Examples:** ``` # yyyyMMdd format ./FastBCP \ ... --fileoutput "orders_{starttimestamp:yyyyMMdd}.parquet" \ ... # yyyy-MM-dd format ./FastBCP \ ... --fileoutput "orders_{starttimestamp:yyyy-MM-dd}.parquet" \ ... # yyyyMMddHH format (hourly) ./FastBCP \ ... --fileoutput "logs_{starttimestamp:yyyyMMddHH}.parquet" \ ... ``` ## Timestamped Output[​](#timestamped-output "Direct link to Timestamped Output") Use the `-x` or `--timestamped` parameter to automatically add a timestamp to the filename. ``` ./FastBCP \ ... --fileoutput "orders.parquet" \ --timestamped \ ... ``` **Syntax:** * Short form: `-x` * Long form: `--timestamped` tip `--timestamped` automatically appends `_yyyyMMddHHmmss` to the filename. For more control over format and placement, use timestamp tokens instead. ## Encoding[​](#encoding "Direct link to Encoding") Use the `-e` or `--encoding` parameter to specify character encoding for text formats (CSV, JSON, TSV). ``` ./FastBCP \ ... --fileoutput "orders.csv" \ --encoding "UTF-8" \ ... ``` **Syntax:** * Short form: `-e "encoding"` * Long form: `--encoding "encoding"` **Default:** `UTF-8` note Encoding is not applicable to Parquet files (they use UTF-8 internally). --- # Parallel Parameters FastBCP 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 ``` .\FastBCP.exe ` ... --parallelmethod Ntile ` ... ``` ``` ./FastBCP \ ... --parallelmethod Ntile \ ... ``` **Syntax:** * Short form: `-m ` * Long form: `--parallelmethod ` ### Methods Comparison[​](#methods-comparison "Direct link to Methods Comparison") | Method | Parallel | Needs Distributed Column | Database Source Type | | --------------- | -------- | ------------------------ | --------------------------------------------------------------------------------- | | `None` | | | Any | | `Random` | | | Any | | `DataDriven` | | | Any | | `RangeId` | | | Any | | `Ntile` | | | Any | | `Ctid` | | | PostgreSQL (pgsql/pgcopy) | | `Physloc` | | | SQL Server (mssql) | | `Rowid` | | | Oracle (oraodp/adbc\_oracle) | | `NZDataSlice` | | | Netezza (nzsql/adbc\_netezza) | | `DBPartition` | | | SQL Server, PostgreSQL, Oracle, MySQL, Teradata (and their `adbc_*` counterparts) | | `Timepartition` | | | Any | ### Available Methods[​](#available-methods "Direct link to Available Methods") **None** - No parallel processing. Data is exported sequentially. **DataDriven** - Uses all values of a column (or a given list provided by `--datadrivenquery`) to split the export. If the number of values is greater than the degree of parallelism, throttling will be applied. tip You can use an expression in the distribute key column instead of a column name.
Example: `YEAR(o_orderdate)` **Ntile** - Uses the distributed column field and ntile values to retrieve evenly distributed chunks of data. Each parallel thread exports a portion based on a range built using the distributed column values. The uniqueness of the distributed column is not mandatory. **RangeId** - Uses the distributed column field and its min/max values to retrieve chunks of data. Each parallel thread exports a portion based on a range built using the distributed column values. **Random** - Requires a distribution column that must be an integer/bigint with many values (at least as many as the degree of parallelism). **Ctid** - Uses an internal hidden field to retrieve chunks of data. Each parallel thread exports a portion based on the CTID range. note PostgreSQL databases only (and some compatible PostgreSQL databases). **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. **Rowid** - Uses an internal hidden field to retrieve chunks of data. Each parallel thread exports a portion based on the ROWID range. note `RowId` parallel method is for Oracle databases only (`oraodp` and `adbc_oracle` connection types). **NZDataSlice** - Uses the native Netezza data slices to retrieve chunks of data. Each parallel thread exports a portion based on the data slice distribution. Slices go through a shared work queue: an idle thread takes the next waiting slice, which keeps all threads busy when slices are uneven. After the first failure, no new slice is started. note `NZDataSlice` parallel method is for Netezza databases only (`nzsql` and `adbc_netezza` connection types). **DBPartition** - Runs one extraction per native partition / subpartition of the source table. The largest partitions are scheduled first, based on the catalog row estimates. | Source | Partitioning used | | -------------------------------------------- | --------------------------------------------- | | SQL Server (`mssql`, `adbc_mssql`) | `$PARTITION` | | PostgreSQL (`pgsql`, `pgcopy`, `adbc_pgsql`) | Leaf tables | | Oracle (`oraodp`, `adbc_oracle`) | `PARTITION (...)` | | MySQL (`mysql`) | `PARTITION (...)` | | Teradata (`teradata`) | Row partitioning, single- and multi-level PPI | note `DBPartition` requires `--sourceschema` and `--sourcetable`; it does not need a distribute key column. It falls back to `None`, with a warning, when the table is not partitioned, has a single partition, or the source is not supported. tip The output file layout is controlled by the [`FASTBCP_DBPARTITION_TARGET_MODE`](/1.3/documentation/environment-variables/fastbcp-dbpartition-target-mode.md) environment variable: numbered chunks (`CHUNK`, default) or Hive-style directories named after each partition (`HIVE`). `--merge` works in both modes. **Timepartition** - Uses a date/datetime column to partition data into time-based chunks. Each parallel thread exports data for a specific time period (year, month, week, or day). The distributed key column must be specified in a special format: `(datecolumn, year, month)`, `(datecolumn, year, month, day)`, `(datecolumn, year)`, or `(datecolumn, year, week)`. tip This method is ideal for time-series data and allows efficient parallel export based on temporal ranges. ## Distribute Key Column[​](#distribute-key-column "Direct link to Distribute Key Column") Use the `-c` or `--distributekeycolumn` parameter to define the column (or computation) on the data source that will be used to split the data into several parts. FastBCP 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. Timepartition Special Format When using the `Timepartition` method, the distribute key column must be specified in a special format: * `(datecolumn, year, month)` - Partition by year and month * `(datecolumn, year, month, day)` - Partition by year, month, and day * `(datecolumn, year)` - Partition by year only * `(datecolumn, year, week)` - Partition by year and week Example: `--distributekeycolumn "(o_orderdate, year, month)"` * Windows * Linux ``` # Using a column name .\FastBCP.exe ` ... --distributekeycolumn order_date ` ... # Using an expression .\FastBCP.exe ` ... --distributekeycolumn "YEAR(order_date)" ` ... ``` ``` # Using a column name ./FastBCP \ ... --distributekeycolumn order_date \ ... # Using an expression ./FastBCP \ ... --distributekeycolumn "YEAR(order_date)" \ ... ``` **Syntax:** * Short form: `-c ` * Long form: `--distributekeycolumn ` ## Degree of Parallelism[​](#degree-of-parallelism "Direct link to Degree of Parallelism") Use the `-p` or `--paralleldegree` 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 .\FastBCP.exe ` ... --paralleldegree 8 ` ... # Auto-detect based on CPU cores .\FastBCP.exe ` ... --paralleldegree 0 ` ... # Use half of available cores .\FastBCP.exe ` ... --paralleldegree -2 ` ... ``` ``` # Use 8 parallel threads ./FastBCP \ ... --paralleldegree 8 \ ... # Auto-detect based on CPU cores ./FastBCP \ ... --paralleldegree 0 \ ... # Use half of available cores ./FastBCP \ ... --paralleldegree -2 \ ... ``` **Syntax:** * Short form: `-p ` * Long form: `--paralleldegree ` **Default:** `-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. * Windows * Linux ``` .\FastBCP.exe ` ... --datadrivenquery "SELECT tagname FROM tags" ` ... ``` ``` ./FastBCP \ ... --datadrivenquery "SELECT tagname FROM tags" \ ... ``` * Windows * Linux ``` .\FastBCP.exe ` ... --datadrivenquery "SELECT o_orderdate FROM dim_date where ref_date > getdate() - 30" ` ... ``` ``` ./FastBCP \ ... --datadrivenquery "SELECT o_orderdate FROM dim_date where ref_date > getdate() - 30" \ ... ``` **Syntax:** * Long form only: `--datadrivenquery ""` ## Merge (boolean)[​](#merge-boolean "Direct link to Merge (boolean)") Use the `-M` or `--merge` true/false to specify if the files generated by the parallel export should be merged into a single output file (`true`) or kept as separate files (`false`). Default `false` warning Current version allows valid merge for CSV and Parquet formats only. warning Merge is not available for cloud destinations: `--merge true` is forced to `false` (with a warning in the log) when `--directory` is a cloud URI. warning Merge is not supported with gzip compressed output (`.csv.gz`, `.tsv.gz`, `.json.gz`): FastBCP stops with an error. * Windows * Linux ``` # Merge files after parallel export .\FastBCP.exe ` ... --merge true ` ... # Keep distributed files (default) .\FastBCP.exe ` ... --merge false ` ... ``` ``` # Merge files after parallel export ./FastBCP \ ... --merge true \ ... # Keep distributed files (default) ./FastBCP \ ... --merge false \ ... ``` **Syntax:** * Short form: `-M` * Long form: `--merge` **Default:** `false` ## Complete Example[​](#complete-example "Direct link to Complete Example") Here's a complete example using parallel parameters with the DataDriven method: * Windows * Linux ``` .\FastBCP.exe ` --connectiontype "pgcopy" ` --server "localhost:15432" ` --database "tpch" ` --user "FastUser" ` --password "FastPassword" ` --query "with T1 AS (select *, to_char(o_orderdate, 'YYYYMM') o_ordermonth from tpch_10.orders) SELECT * FROM T1" ` --directory "D:\temp\tpch\orders\" ` --fileoutput "pgcopy_orders.parquet" ` --method "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" ` --paralleldegree 10 ` --merge "False" ` --runid "pgcopy_to_parquet_parallel12_DataDriven" ``` ``` ./FastBCP \ --connectiontype "pgcopy" \ --server "localhost:15432" \ --database "tpch" \ --user "FastUser" \ --password "FastPassword" \ --query "with T1 AS (select *, to_char(o_orderdate, 'YYYYMM') o_ordermonth from tpch_10.orders) SELECT * FROM T1" \ --directory "/data/export/tpch/orders/" \ --fileoutput "pgcopy_orders.parquet" \ --method "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" \ --paralleldegree 10 \ --merge "False" \ --runid "pgcopy_to_parquet_parallel12_DataDriven" ``` This example: * Connects to a PostgreSQL database on localhost:15432 * Exports data from the dbo.orders table * Uses the DataDriven distribution method * Distributes work based on the month of the order date using an expression * Use a custom query to generate month values to extract from a light query (instead of a `SELECT DISTINCT o_ordermonth` from the source query) * Uses 10 parallel threads (even if there is 12 month to export) * Keeps distributed files without merging (--merge false) * Assigns a custom Run ID for tracking ## Timepartition Example[​](#timepartition-example "Direct link to Timepartition Example") Here's an example using the Timepartition method to partition data based on a date column: * Windows * Linux ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "tpch_copy" ` --user "FastUser" ` --password "FastPassword" ` --sourceschema "tpch_10" ` --sourcetable "orders_date_sorted" ` --directory "D:\temp\TestPartition" ` --fileoutput "orders.csv" ` --decimalseparator "," ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --method "Timepartition" ` --distributekeycolumn "(o_orderdate,year,month)" ` --paralleldegree 16 ` --merge "False" ` --runid "mssql_to_csv_parallel8_timepartition" ``` ``` ./FastBCP \ --connectiontype "mssql" \ --server "localhost" \ --database "tpch_copy" \ --user "FastUser" \ --password "FastPassword" \ --sourceschema "tpch_10" \ --sourcetable "orders_date_sorted" \ --directory "/data/export/TestPartition" \ --fileoutput "orders.csv" \ --decimalseparator "," \ --delimiter "|" \ --dateformat "yyyy-MM-dd HH:mm:ss" \ --encoding "UTF-8" \ --method "Timepartition" \ --distributekeycolumn "(o_orderdate,year,month)" \ --paralleldegree 16 \ --merge "False" \ --runid "mssql_to_csv_parallel8_timepartition" ``` This example: * Connects to a SQL Server database on localhost * Exports data from the tpch\_10.orders\_date\_sorted table * Uses the Timepartition distribution method * Partitions data by year and month based on the o\_orderdate column * Uses 16 parallel threads * Keeps distributed files without merging * Assigns a custom Run ID for tracking ## DBPartition Example[​](#dbpartition-example "Direct link to DBPartition Example") Here's an example using the DBPartition method to export each partition of a partitioned table into a Hive-style directory: * Windows * Linux ``` $env:FASTBCP_DBPARTITION_TARGET_MODE = "HIVE" .\FastBCP.exe ` --connectiontype "pgsql" ` --server "localhost:5432" ` --database "tpch" ` --user "FastUser" ` --password "FastPassword" ` --sourceschema "tpch_10" ` --sourcetable "orders_partitioned" ` --method "DBPartition" ` --paralleldegree 8 ` --directory "D:\temp\orders" ` --fileoutput "orders.parquet" ` --merge "False" ` --runid "pgsql_to_parquet_dbpartition" ``` ``` export FASTBCP_DBPARTITION_TARGET_MODE=HIVE ./FastBCP \ --connectiontype "pgsql" \ --server "localhost:5432" \ --database "tpch" \ --user "FastUser" \ --password "FastPassword" \ --sourceschema "tpch_10" \ --sourcetable "orders_partitioned" \ --method "DBPartition" \ --paralleldegree 8 \ --directory "/data/export/orders" \ --fileoutput "orders.parquet" \ --merge "False" \ --runid "pgsql_to_parquet_dbpartition" ``` This example: * Connects to a PostgreSQL database on localhost:5432 * Exports the partitioned table `tpch_10.orders_partitioned`, one extraction per leaf table * Starts with the largest partitions and runs up to 8 of them in parallel * Writes each partition to `partition=/orders.parquet` (`HIVE` mode) * Keeps distributed files without merging --- # Parquet Formatting [Apache Parquet](https://parquet.apache.org/) is a columnar storage format optimized for analytics. FastBCP automatically uses Parquet format when the output file has a `.parquet` extension. ## Parquet Compression[​](#parquet-compression "Direct link to Parquet Compression") Use the `--parquetcompression` parameter to specify the parquet compression codec. ``` ./FastBCP \ ... --fileoutput "orders.parquet" \ --parquetcompression Snappy \ ... ``` **Syntax:** * Long form: `--parquetcompression ` **Default:** `Zstd` (faster and better compression ratio than others) **Available Algorithms:** * `None` - No compression * `Snappy` - Fast, small compression, classic * `Gzip` - Smaller files, slower * `Lzo` - Slower, medium compression (rarely used) * `Lz4` - Slower, moderate compression * `Zstd` - Best compression and Fast (default) tip The **Zstd** (default) is best for most cases. It provides the best compression ratio with moderate speed, ideal for cloud storage to minimize storage costs and transfer time. * So no need to set this parameter to use Zstd. ## Row Group Size Configuration[​](#row-group-size-configuration "Direct link to Row Group Size Configuration") Available since version 0.30.1 This feature is available starting from FastBCP version 0.30.1. You can control the Parquet row group size using the `FASTBCP_RGSIZE` environment variable. Row groups are the unit of parallelization in Parquet files, and their size can impact query performance and memory usage. **Environment Variable:** `FASTBCP_RGSIZE` **Default Value:** `max(2^18/sqrt(degree),64000)` **Usage:** * Windows * Linux ``` # Set the row group size to 500,000 rows $env:FASTBCP_RGSIZE = "500000" # Run FastBCP .\FastBCP.exe --connectiontype mssql --server "localhost" ... ``` ``` # Set the row group size to 500,000 rows export FASTBCP_RGSIZE=500000 # Run FastBCP ./FastBCP --connectiontype mssql --server "localhost" ... ``` ## Complete Example[​](#complete-example "Direct link to Complete Example") * Windows * Linux ``` $env:FASTBCP_RGSIZE = "500000" .\FastBCP.exe ` --connectiontype mssql ` --server "localhost" ` --database "sales" ` --trusted ` --query "SELECT * FROM orders WHERE OrderDate >= '2024-01-01'" ` --directory "C:\exports" ` --fileoutput "orders.parquet" ` --parquetcompression Snappy ``` ``` export FASTBCP_RGSIZE=500000 ./FastBCP \ --connectiontype mssql \ --server "localhost" \ --database "sales" \ --trusted \ --query "SELECT * FROM orders WHERE OrderDate >= '2024-01-01'" \ --directory "/exports" \ --fileoutput "orders.parquet" \ --parquetcompression Snappy ``` --- # Source Info FastBCP offers multiple ways to define your data source for extraction. You can use a query, an input file, or specify schema and table names directly. ## Query[​](#query "Direct link to Query") Use the `-q` or `--query` parameter to specify your extraction as a SELECT statement. ``` ./FastBCP \ ... --query "SELECT * FROM Sales.Orders WHERE OrderDate >= '2024-01-01'" \ ... ``` **Syntax:** * Short form: `-q "SELECT_statement"` * Long form: `--query "SELECT_statement"` ## Input File[​](#input-file "Direct link to Input File") Use the `-F` or `--fileinput` parameter to specify an input file that contains only one query. ``` ./FastBCP \ ... --fileinput "/sources/sql/queries/my_extraction.sql" \ ... ``` **Syntax:** * Short form: `-F "file_path"` * Long form: `--fileinput "file_path"` Warning The query in the input file must not end with a semicolon (`;`). ## Source Schema[​](#source-schema "Direct link to Source Schema") If no query or input file is used, you can specify the source schema with the `-s` or `--sourceschema` parameter. Combined with the source table, this will extract data from `sourceschema.sourcetable`. ``` ./FastBCP \ ... --sourceschema "Sales" \ --sourcetable "Orders" \ ... ``` **Syntax:** * Short form: `-s "schema_name"` * Long form: `--sourceschema "schema_name"` Information This field is mandatory if some parallel method is used. See **[Advanced Parameters](/1.3/documentation/cli/advanced_parameters.md)** section for more details. ## Source Table[​](#source-table "Direct link to Source Table") If no query or input file is used, you can specify the source table with the `-T` or `--sourcetable` parameter. Combined with the source schema, this will extract data from `sourceschema.sourcetable`. ``` ./FastBCP \ ... --sourceschema "Sales" \ --sourcetable "Orders" \ ... ``` **Syntax:** * Short form: `-T "table_name"` * Long form: `--sourcetable "table_name"` Information This field is mandatory if some parallel method is used. See **[Advanced Parameters](/1.3/documentation/cli/advanced_parameters.md)** section for more details. Warning if you use the placeholder `{sourceschema}` and `{sourcetable}` in the `--directory` or `--fileoutput` (See **[Output Info](/1.3/documentation/cli/output_info.md)**) then you must set the `--sourceschema `and the `--sourcetable `even you use `--query `or `--inputfile` --- # AWS S3 Configuration Complete guide for configuring AWS S3 connectivity with FastBCP. ## Authentication Methods[​](#authentication-methods "Direct link to Authentication Methods") FastBCP 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 FastBCP:** ``` # Use default profile ./FastBCP \ ... --directory "s3://my-bucket/exports" \ --fileoutput "data.parquet" \ ... # Use production profile ./FastBCP \ ... --directory "s3://prod-bucket/exports" \ --cloudprofile "production" \ --fileoutput "data.parquet" \ ... # Use development profile ./FastBCP \ ... --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 FastBCP .\FastBCP.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 FastBCP ./FastBCP \ ... --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 FastBCP 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 FastBCP:** ``` { "Version": "2012-10-17", "Statement": [ { "Sid": "FastBCPRequired", "Comment": "REQUIRED - actual operations performed by FastBCP (multipart upload)", "Effect": "Allow", "Action": [ "s3:PutObject", "s3:AbortMultipartUpload" ], "Resource": "arn:aws:s3:::MY-BUCKET/exports/*" }, { "Sid": "FastBCPOptionalConvenience", "Comment": "OPTIONAL - operational convenience, not required by the code", "Effect": "Allow", "Action": [ "s3:GetObject", "s3:ListBucket" ], "Resource": [ "arn:aws:s3:::MY-BUCKET/exports/*", "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 ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "orders" ` --directory "s3://my-bucket/exports/{sourcetable}" ` --fileoutput "{sourcetable}.parquet" ``` ``` ./FastBCP \ --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 ``` .\FastBCP.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" ``` ``` ./FastBCP \ --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 ``` .\FastBCP.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 ``` ``` ./FastBCP \ --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") FastBCP 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/*" } } } ] } ``` ## Server-Side Encryption with AWS KMS (SSE-KMS)[​](#server-side-encryption-with-aws-kms-sse-kms "Direct link to Server-Side Encryption with AWS KMS (SSE-KMS)") FastBCP can write to buckets encrypted with SSE-KMS. Encryption is done by S3 on the server side, so FastBCP never calls AWS KMS directly: S3 calls KMS on behalf of the identity that uploads the files. Encryption can come from: * **Bucket default encryption:** the bucket is configured with SSE-KMS as its default encryption, and S3 encrypts every new object with the configured key. Nothing needs to be set on the FastBCP side. * **App-driven encryption:** the upload request itself asks for SSE-KMS (and optionally a specific KMS key). The required permissions are the same. ### KMS Permissions[​](#kms-permissions "Direct link to KMS Permissions") FastBCP uploads files with S3 multipart uploads. With SSE-KMS, a multipart upload needs both `kms:GenerateDataKey` and `kms:Decrypt` on the KMS key, in addition to the S3 permissions above. | Key type | What to configure | | ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | **AWS managed key** (`aws/s3`) | Nothing more: its key policy already lets any principal of the account use it through S3. It cannot be used across accounts. | | **Customer managed key** | Allow `kms:GenerateDataKey` and `kms:Decrypt` in the IAM policy of the identity running FastBCP **and** make sure the key policy allows that identity (or delegates to IAM policies). | **Example IAM policy for a customer managed key:** ``` { "Version": "2012-10-17", "Statement": [ { "Sid": "FastBCPS3Upload", "Effect": "Allow", "Action": [ "s3:PutObject", "s3:AbortMultipartUpload" ], "Resource": "arn:aws:s3:::MY-BUCKET/exports/*" }, { "Sid": "FastBCPKmsForSSE", "Effect": "Allow", "Action": [ "kms:GenerateDataKey", "kms:Decrypt" ], "Resource": "arn:aws:kms:eu-west-1:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab", "Condition": { "StringEquals": { "kms:ViaService": "s3.eu-west-1.amazonaws.com" } } } ] } ``` S3 Bucket Keys Enabling **S3 Bucket Keys** on the bucket reduces the number of calls from S3 to KMS, and therefore KMS costs and throttling, which matters for parallel exports that write many files. With Bucket Keys, the KMS encryption context is the bucket ARN instead of the object ARN: update any `kms:EncryptionContext` condition in your policies accordingly. ### Network / Egress[​](#network--egress "Direct link to Network / Egress") Since S3 calls KMS itself, FastBCP only needs network access to the S3 endpoint, not to the KMS endpoint. In a private VPC, an S3 gateway or interface endpoint is enough. --- # Azure Configuration Complete guide for configuring Azure Blob Storage and Azure Data Lake Gen2 connectivity with FastBCP. ## 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") FastBCP 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) 5. **SAS URL** (scoped, time-limited access) For direct commit to Azure Blob Storage, FastBCP uses `AZURE_STORAGE_CONNECTION_STRING` or `AZURE_STORAGE_SAS_URL` when one of them is set, and falls back to `DefaultAzureCredential` (Azure CLI, Managed Identity, environment credentials, …) otherwise. The selected authentication method is written to the log. ### 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 ``` FastBCP will automatically use the Azure CLI's authentication credentials. **Using with FastBCP:** ``` # No additional configuration needed - just run FastBCP ./FastBCP \ ... --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 FastBCP .\FastBCP.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 FastBCP ./FastBCP \ ... --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 FastBCP .\FastBCP.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 FastBCP ./FastBCP \ ... --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 FastBCP 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}" ``` ### 5. SAS URL[​](#5-sas-url "Direct link to 5. SAS URL") Since FastBCP 1.3, you can authenticate to Azure Blob Storage with a Shared Access Signature (SAS) URL, set in the `AZURE_STORAGE_SAS_URL` environment variable. A SAS grants scoped, time-limited access without sharing the account key. **Generate a container SAS URL:** * Azure Portal * Azure CLI 1. Navigate to your Storage Account → **Containers** → your container 2. Go to **Shared access tokens** 3. Select the **Create** and **Write** permissions and an expiry date 4. Click **Generate SAS token and URL** and copy the **Blob SAS URL** ``` az storage container generate-sas \ --account-name mystorageaccount \ --name mycontainer \ --permissions cw \ --expiry 2026-12-31T23:59Z \ --auth-mode key \ --output tsv # Then build the URL: https://mystorageaccount.blob.core.windows.net/mycontainer? ``` **Set the SAS URL:** * Windows (PowerShell) * Linux/macOS ``` $env:AZURE_STORAGE_SAS_URL="https://mystorageaccount.blob.core.windows.net/mycontainer?sv=...&sig=..." # Run FastBCP .\FastBCP.exe ` ... --directory "abs://mystorageaccount.blob.core.windows.net/mycontainer/exports" ` --fileoutput "data.parquet" ` ... ``` ``` export AZURE_STORAGE_SAS_URL="https://mystorageaccount.blob.core.windows.net/mycontainer?sv=...&sig=..." # Run FastBCP ./FastBCP \ ... --directory "abs://mystorageaccount.blob.core.windows.net/mycontainer/exports" \ --fileoutput "data.parquet" \ ... ``` tip Quote the SAS URL: it contains `&` characters that the shell would otherwise interpret. ## 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 ``` .\FastBCP.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" ``` ``` ./FastBCP \ --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 ``` .\FastBCP.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 ``` ``` ./FastBCP \ --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 ``` .\FastBCP.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" ``` ``` ./FastBCP \ --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 ``` .\FastBCP.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 ``` ``` ./FastBCP \ --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) ### Container Access[​](#container-access "Direct link to Container Access") FastBCP creates the target container if it does not exist. When the container already exists, a missing permission to create it (HTTP 403 or 409 on the create call) is tolerated, so an identity or SAS that can only write blobs into an existing container is enough. ### Troubleshooting 403 Errors[​](#troubleshooting-403-errors "Direct link to Troubleshooting 403 Errors") A `403 Forbidden` from Azure Storage usually comes from one of the following: * **Firewall:** the storage account's network rules do not allow the IP address or virtual network FastBCP runs from. * **RBAC:** the identity used by `DefaultAzureCredential` has no data-plane role (such as **Storage Blob Data Contributor**) on the account or container. Management roles such as *Owner* or *Contributor* are not enough. Role assignments can take a few minutes to apply. * **SAS permissions:** the SAS token is expired, is scoped to another container, or lacks the **Create** / **Write** permissions. FastBCP logs the authentication method it used, which helps tell these cases apart. ### 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 FastBCP. ## Authentication Methods[​](#authentication-methods "Direct link to Authentication Methods") FastBCP 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 ``` FastBCP will automatically use the gcloud CLI's authentication credentials. **Using with FastBCP:** ``` # No additional configuration needed - just run FastBCP ./FastBCP \ ... --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., "fastbcp-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 fastbcp-export \ --display-name="FastBCP Export Service Account" # Grant Storage Object Admin role gcloud projects add-iam-policy-binding my-project-id \ --member="serviceAccount:fastbcp-export@my-project-id.iam.gserviceaccount.com" \ --role="roles/storage.objectAdmin" # Create and download key file gcloud iam service-accounts keys create ~/fastbcp-key.json \ --iam-account=fastbcp-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\fastbcp-key.json" # Run FastBCP .\FastBCP.exe ` ... --directory "gs://my-bucket/exports" ` --fileoutput "data.parquet" ` ... ``` ``` # Set path to service account key file export GOOGLE_APPLICATION_CREDENTIALS="/path/to/fastbcp-key.json" # Run FastBCP ./FastBCP \ ... --directory "gs://my-bucket/exports" \ --fileoutput "data.parquet" \ ... ``` ### 3. Default Application Credentials[​](#3-default-application-credentials "Direct link to 3. Default Application Credentials") When FastBCP 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 ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Orders" ` --directory "gs://my-bucket/exports/orders" ` --fileoutput "orders.parquet" ``` ``` ./FastBCP \ --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 ``` .\FastBCP.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 ``` ``` ./FastBCP \ --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 ``` .\FastBCP.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 ``` ``` ./FastBCP \ --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 ``` .\FastBCP.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 ``` ``` ./FastBCP \ --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 "False" ``` ## 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:fastbcp-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 FastBCP 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" .\FastBCP.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 "onelake://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" ./FastBCP ` --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 "onelake://myworkspace/mylakehouse/{sourcedatabase}/{sourceschema}/{sourcetable}/year=2024/" \ --fileoutput "orders_2024.parquet" \ --parallelmethod "Ctid" \ --paralleldegree 8 ``` --- # Cloud Connectivity Overview FastBCP 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 FastBCP will use multi-part uploads for all cloud provider Warning Since FastBCP 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") FastBCP 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](/1.3/documentation/cloud-connectivity/aws-s3.md) * [Azure Setup](/1.3/documentation/cloud-connectivity/azure.md) * [Google Cloud Storage Setup](/1.3/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 ./FastBCP / ... --directory "s3://my-bucket/exports" / --fileoutput "data.parquet" / ... ``` ``` # Azure Blob ./FastBCP \ ... --directory "abs://account.blob.core.windows.net/container/exports/" \ --fileoutput "data.parquet" \ ... ``` ``` # Azure Datalake Gen 2 ./FastBCP \ ... --directory "abs://account.dfs.core.windows.net/container/exports/" \ --fileoutput "data.parquet" \ ... ``` ``` # Google Cloud Storage ./FastBCP \ ... --directory "gs://my-bucket/exports" \ --fileoutput "data.parquet" \ ... ``` ``` # OneLake ./FastBCP \ ... --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: ``` ./FastBCP \ ... --directory "s3://prod-bucket/exports" \ --cloudprofile "production" \ ... ./FastBCP \ ... --directory "s3://dev-bucket/exports" \ --cloudprofile "development" ... ``` --- # Operating Systems FastBCP supports Windows and Linux 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 | | ------------------------ | -------------------------- | ------------- | --------- | | Amazon Linux | 2023 (Kernel 6.1) | Arm64, x64 | | | 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 FastBCP supports a wide range of database systems across different platforms. ## Supported Databases & Platforms[​](#supported-databases--platforms "Direct link to Supported Databases & Platforms") | Database | Windows AMD64 | Linux AMD64 | Linux ARM64 | | --------------------- | ------------- | ----------- | ----------- | | **SQL Server** | | | | | **SQL Server (ADBC)** | | | | | **PostgreSQL** | | | | | **PostgreSQL (ADBC)** | | | | | **MySQL** | | | | | **Oracle** | | | | | **Oracle (ADBC)** | | | | | **ClickHouse** | | | | | **DuckDB** | | | | | **Teradata** | | | | | **Netezza** | | | | | **Netezza (ADBC)** | | | | | **SAP HANA** | | | | | **ODBC** | | | | | **OLEDB** | | | | The ADBC FastDriver connectors (**SQL Server (ADBC)**, **PostgreSQL (ADBC)**, **Oracle (ADBC)**, and **Netezza (ADBC)**) are not supported on **Linux ARM64**. --- # FASTBCP\_ADBC\_BATCHCELLS ## Overview[​](#overview "Direct link to Overview") The `FASTBCP_ADBC_BATCHCELLS` environment variable controls the size of the Arrow record batches fetched by the ADBC connectors (`adbc_mssql`, `adbc_pgsql`), expressed in **cells** (rows × columns) rather than rows alone. Because a batch's memory footprint depends on both its row count and its column count, sizing by cell count keeps memory usage predictable across tables of very different widths: a narrow table fetches more rows per batch, a wide table fewer, for a comparable memory footprint. ## Syntax[​](#syntax "Direct link to Syntax") * Windows * Linux ``` $env:FASTBCP_ADBC_BATCHCELLS = 1000000 ``` ``` export FASTBCP_ADBC_BATCHCELLS=1000000 ``` ## Configuration[​](#configuration "Direct link to Configuration") | Property | Value | | -------------- | ------------------------------------------------------------------- | | **Type** | Integer (> 0) | | **Default** | `500000` (500,000 cells) | | **Applies to** | `adbc_mssql` and `adbc_pgsql` connections (Arpe.io ADBC FastDriver) | | **Since** | FastBCP 1.2 | ## How Batch Size Is Derived[​](#how-batch-size-is-derived "Direct link to How Batch Size Is Derived") For a given table, the effective number of rows per Arrow record batch is computed as: ``` rows per batch = FASTBCP_ADBC_BATCHCELLS / number of columns ``` For example, with the default `500000` cells: | Columns | Rows per batch | | ------- | -------------- | | 10 | 50,000 | | 50 | 10,000 | | 500 | 1,000 | ## When to Change It[​](#when-to-change-it "Direct link to When to Change It") * **Increase** the value to reduce the number of round trips for very wide or very narrow tables when more memory is available, which can improve throughput. * **Decrease** the value to lower peak memory usage in constrained environments (containers, small VMs) or when exporting extremely wide tables. ## Examples[​](#examples "Direct link to Examples") ### Increase batch size for higher throughput[​](#increase-batch-size-for-higher-throughput "Direct link to Increase batch size for higher throughput") * Windows * Linux ``` $env:FASTBCP_ADBC_BATCHCELLS = 2000000 fastbcp -S myserver.database.windows.net ` -d MyDatabase ` -T dbo.MyTable ` -C adbc_mssql ` --fileoutput "output.parquet" ``` ``` export FASTBCP_ADBC_BATCHCELLS=2000000 fastbcp -S myserver.database.windows.net \ -d MyDatabase \ -T dbo.MyTable \ -C adbc_mssql \ --fileoutput "output.parquet" ``` ### Reduce batch size to limit memory usage[​](#reduce-batch-size-to-limit-memory-usage "Direct link to Reduce batch size to limit memory usage") * Windows * Linux ``` $env:FASTBCP_ADBC_BATCHCELLS = 100000 fastbcp -S pg-server:5432 ` -d MyDatabase ` -Q "SELECT * FROM public.orders" ` -C adbc_pgsql ` --fileoutput "orders.parquet" ``` ``` export FASTBCP_ADBC_BATCHCELLS=100000 fastbcp -S pg-server:5432 \ -d MyDatabase \ -Q "SELECT * FROM public.orders" \ -C adbc_pgsql \ --fileoutput "orders.parquet" ``` Platform availability This variable only applies to the ADBC FastDriver connectors (`adbc_mssql`, `adbc_pgsql`), available on **Windows x64** and **Linux x64** only. See [Connection Parameters](/1.3/documentation/cli/connection_parameters.md#connection-type) for details. --- # FASTBCP\_CLOUD\_ISBUFFERED ## Overview[​](#overview "Direct link to Overview") The `FASTBCP_CLOUD_ISBUFFERED` environment variable controls whether FastBCP uses buffered uploads when writing to cloud storage. ## Syntax[​](#syntax "Direct link to Syntax") * Windows * Linux ``` $env:FASTBCP_CLOUD_ISBUFFERED = "True" # or "False" ``` ``` export FASTBCP_CLOUD_ISBUFFERED=True # or False ``` ## Configuration[​](#configuration "Direct link to Configuration") | Property | Value | | -------------- | --------------------------------------------------------------------- | | **Type** | Boolean (`True` / `False`) | | **Default** | `False` | | **Applies to** | Azure Data Lake Storage (ADLS), OneLake, AWS S3, Google Cloud Storage | | **Since** | FastBCP 1.0 | ## Behavior[​](#behavior "Direct link to Behavior") ### When `False` (Default)[​](#when-false-default "Direct link to when-false-default") FastBCP uses the cloud SDK's `OpenWriteAsync` streaming upload: * Data is written directly to the cloud storage in chunks * Each chunk blocks the writer until acknowledged * **Simpler** but can be **slower** for Azure storage ### When `True` (Recommended for Azure)[​](#when-true-recommended-for-azure "Direct link to when-true-recommended-for-azure") FastBCP uses buffered uploads: * Data is first written to a local temporary file (see [`FASTBCP_TMPPATH`](/1.3/documentation/environment-variables/fastbcp-tmppath.md)) * When the stream is closed, the file is uploaded in parallel blocks (azcopy-like pattern) * **Significantly faster** for Azure Data Lake Storage and OneLake * Requires temporary disk space --- # FASTBCP\_CLOUD\_MAXUPLOADTHREAD\_PER\_STREAM ## Overview[​](#overview "Direct link to Overview") The `FASTBCP_CLOUD_MAXUPLOADTHREAD_PER_STREAM` environment variable controls the maximum number of parallel threads used to upload each file to cloud storage during buffered uploads. ## Syntax[​](#syntax "Direct link to Syntax") * Windows * Linux ``` $env:FASTBCP_CLOUD_MAXUPLOADTHREAD_PER_STREAM = 16 ``` ``` export FASTBCP_CLOUD_MAXUPLOADTHREAD_PER_STREAM=16 ``` ## Configuration[​](#configuration "Direct link to Configuration") | Property | Value | | -------------- | -------------------------------------------------------------------------------------------------------------------------- | | **Type** | Integer (> 0) | | **Default** | `8` when `parallelmethod=None`, `2` otherwise | | **Applies to** | Cloud uploads when [`FASTBCP_CLOUD_ISBUFFERED=True`](/1.3/documentation/environment-variables/fastbcp-cloud-isbuffered.md) | | **Since** | FastBCP 1.0 | ## Behavior[​](#behavior "Direct link to Behavior") ### Default Values[​](#default-values "Direct link to Default Values") FastBCP automatically adjusts the default based on the parallel extraction method: | Parallel Method | Default Threads | Reason | | --------------------------- | --------------- | ---------------------------------------------------------------------------------------------- | | `None` (single stream) | `8` | FastBCP itself is not parallelized, so more bandwidth can be allocated to upload | | `Ntile`, `DataDriven`, etc. | `2` | FastBCP is already extracting in parallel, so limit upload threads to avoid saturating network | ### How It Works[​](#how-it-works "Direct link to How It Works") When [`FASTBCP_CLOUD_ISBUFFERED=True`](/1.3/documentation/environment-variables/fastbcp-cloud-isbuffered.md): 1. Data is written to a local temporary file 2. On stream close, the file is uploaded in parallel blocks 3. `FASTBCP_CLOUD_MAXUPLOADTHREAD_PER_STREAM` controls how many threads upload blocks concurrently 4. Maps to `StorageTransferOptions.MaximumConcurrency` in Azure SDK --- # FASTBCP\_DATEFORMAT ## Overview[​](#overview "Direct link to Overview") The `FASTBCP_DATEFORMAT` environment variable lets you specify a custom format string for converting date values to strings in the output. When not set, FastBCP uses the default `yyyy-MM-dd HH:mm:sszzz`. The format string follows [.NET standard and custom date/time format patterns](https://learn.microsoft.com/en-us/dotnet/standard/base-types/custom-date-and-time-format-strings). ## Syntax[​](#syntax "Direct link to Syntax") * Windows * Linux ``` $env:FASTBCP_DATEFORMAT = "yyyyMMdd" ``` ``` export FASTBCP_DATEFORMAT=yyyyMMdd ``` ## Configuration[​](#configuration "Direct link to Configuration") | Property | Value | | -------------- | --------------------------------------------------------------------------- | | **Type** | Format string | | **Default** | `yyyy-MM-dd HH:mm:sszzz` | | **Applies to** | All output formats that serialize date columns as strings (CSV, JSON, etc.) | | **Since** | FastBCP 1.0 | Auto-adaptive formatting The date format is auto-adaptive based on the column type: * **Date-only** columns will always output as `yyyy-MM-dd` regardless of the format string * **Timestamp/DateTime** columns will output as `yyyy-MM-dd HH:mm:ss` even if a timezone token (`zzz`) is present in the format string * **DateTimeOffset** columns will include the timezone offset as specified ## Format Examples[​](#format-examples "Direct link to Format Examples") | Format string | Example output | | ---------------------------------- | --------------------------- | | `yyyy-MM-dd HH:mm:sszzz` (default) | `2026-06-28 14:30:22+02:00` | | `yyyy-MM-dd` | `2026-06-28` | | `yyyyMMdd` | `20260628` | | `dd/MM/yyyy` | `28/06/2026` | | `MM-dd-yyyy` | `06-28-2026` | | `yyyy/MM/dd` | `2026/06/28` | | `yyyy-MM-dd HH:mm:ss` | `2026-06-28 14:30:22` | ## Examples[​](#examples "Direct link to Examples") ### Compact date format — no separators[​](#compact-date-format--no-separators "Direct link to Compact date format — no separators") * Windows * Linux ``` $env:FASTBCP_DATEFORMAT = "yyyyMMdd" fastbcp -S myserver.database.windows.net ` -d MyDatabase ` -T dbo.MyTable ` --fileoutput "output.csv" ``` ``` export FASTBCP_DATEFORMAT=yyyyMMdd fastbcp -S myserver.database.windows.net \ -d MyDatabase \ -T dbo.MyTable \ --fileoutput "output.csv" ``` Output column value: `20260628` ### Restore default ISO 8601 format[​](#restore-default-iso-8601-format "Direct link to Restore default ISO 8601 format") * Windows * Linux ``` Remove-Item Env:FASTBCP_DATEFORMAT ``` ``` unset FASTBCP_DATEFORMAT ``` --- # FASTBCP\_DBPARTITION\_TARGET\_MODE ## Overview[​](#overview "Direct link to Overview") The `FASTBCP_DBPARTITION_TARGET_MODE` environment variable controls how the files produced by the [`DBPartition`](/1.3/documentation/cli/parallel_parameters.md#available-methods) parallel method are named and laid out. `DBPartition` runs one extraction per native partition / subpartition of the source table. Each extraction writes its own file, either as a numbered chunk (`CHUNK`) or in a Hive-style directory named after the partition (`HIVE`). ## Syntax[​](#syntax "Direct link to Syntax") * Windows * Linux ``` $env:FASTBCP_DBPARTITION_TARGET_MODE = "HIVE" ``` ``` export FASTBCP_DBPARTITION_TARGET_MODE=HIVE ``` ## Configuration[​](#configuration "Direct link to Configuration") | Property | Value | | -------------- | ---------------- | | **Type** | `CHUNK` / `HIVE` | | **Default** | `CHUNK` | | **Applies to** | `-m DBPartition` | | **Since** | FastBCP 1.3 | ## Modes[​](#modes "Direct link to Modes") ### CHUNK (default)[​](#chunk-default "Direct link to CHUNK (default)") Each partition is written as a numbered chunk next to the target file: ``` _chunk_NNN. ``` For example, with `--fileoutput "orders.parquet"`: ``` orders_chunk_001.parquet orders_chunk_002.parquet orders_chunk_003.parquet ``` ### HIVE[​](#hive "Direct link to HIVE") Each partition is written into a Hive-style directory named after the partition, and the subpartition when there is one: ``` partition=

/[subpartition=/]. ``` Some sources use their own directory naming: | Source | Directory layout | | ------------------------- | ------------------------------------------------ | | SQL Server | `bounds=_/.` | | Teradata | `L1=/[L2=/].` | | PostgreSQL, Oracle, MySQL | `partition=

/[subpartition=/].` | For example, an Oracle table partitioned by month, with `--fileoutput "orders.parquet"`: ``` partition=ORDERS_2024_01/orders.parquet partition=ORDERS_2024_02/orders.parquet partition=ORDERS_2024_03/orders.parquet ``` tip The `HIVE` layout can be read directly as a partitioned dataset by engines such as Spark, DuckDB, Trino or Athena. `--merge` works in both modes. ## Example[​](#example "Direct link to Example") * Windows * Linux ``` $env:FASTBCP_DBPARTITION_TARGET_MODE = "HIVE" .\FastBCP.exe ` --connectiontype oraodp ` --server "dbserver:1521/ORCLPDB" ` --user "FastUser" ` --password "FastPassword" ` --sourceschema "SALES" ` --sourcetable "ORDERS" ` --directory "D:\export\orders" ` --fileoutput "orders.parquet" ` --parallelmethod DBPartition ` --paralleldegree 8 ` --merge false ``` ``` export FASTBCP_DBPARTITION_TARGET_MODE=HIVE ./FastBCP \ --connectiontype oraodp \ --server "dbserver:1521/ORCLPDB" \ --user "FastUser" \ --password "FastPassword" \ --sourceschema "SALES" \ --sourcetable "ORDERS" \ --directory "/data/export/orders" \ --fileoutput "orders.parquet" \ --parallelmethod DBPartition \ --paralleldegree 8 \ --merge false ``` --- # FASTBCP\_PERFORMANCE\_COLLECT ## Overview[​](#overview "Direct link to Overview") The `FASTBCP_PERFORMANCE_COLLECT` environment variable controls whether FastBCP collects performance information about the machine (CPU usage, memory usage, etc.) during the run. ## Syntax[​](#syntax "Direct link to Syntax") * Windows * Linux ``` $env:FASTBCP_PERFORMANCE_COLLECT = $True ``` ``` export FASTBCP_PERFORMANCE_COLLECT=True ``` ## Configuration[​](#configuration "Direct link to Configuration") | Property | Value | | ----------- | -------------------------- | | **Type** | Boolean (`True` / `False`) | | **Default** | `False` (disabled) | | **Since** | FastBCP 1.2 | ## Behavior[​](#behavior "Direct link to Behavior") ### When `False` (Default)[​](#when-false-default "Direct link to when-false-default") No performance information is collected during the run. ### When `True`[​](#when-true "Direct link to when-true") FastBCP collects performance information of the machine (CPU, memory usage, etc.) while the run is in progress. tip Use together with [`FASTBCP_SYSTEMINFO_COLLECT`](/1.3/documentation/environment-variables/fastbcp-systeminfo-collect.md) to also capture system information during the run. --- # FASTBCP\_RGSIZE ## Overview[​](#overview "Direct link to Overview") The `FASTBCP_RGSIZE` environment variable controls the row group size for Parquet file exports. Row groups are the primary unit for organizing data within a Parquet file and significantly impact query performance and compression efficiency. ## Syntax[​](#syntax "Direct link to Syntax") * Windows * Linux ``` $env:FASTBCP_RGSIZE = 500000 ``` ``` export FASTBCP_RGSIZE=500000 ``` ## Configuration[​](#configuration "Direct link to Configuration") | Property | Value | | -------------- | ------------------------------ | | **Type** | Integer (> 0) | | **Default** | `max(2^18/sqrt(degree),64000)` | | **Applies to** | Parquet file exports | | **Since** | FastBCP 0.30 | ## What is a Row Group?[​](#what-is-a-row-group "Direct link to What is a Row Group?") A **row group** is a horizontal partition of data in a Parquet file: * Parquet files are divided into one or more row groups * Each row group contains a subset of rows * Column data within a row group is compressed together * Query engines can skip entire row groups based on metadata ``` Parquet File Structure: ├── Row Group 1 (1M rows) │ ├── Column A (compressed) │ ├── Column B (compressed) │ └── Column C (compressed) ├── Row Group 2 (1M rows) │ ├── Column A (compressed) │ ├── Column B (compressed) │ └── Column C (compressed) └── Footer (metadata) ``` --- # FASTBCP\_SYSTEMINFO\_COLLECT ## Overview[​](#overview "Direct link to Overview") The `FASTBCP_SYSTEMINFO_COLLECT` environment variable controls whether FastBCP collects information about the machine it runs on (CPU, memory, OS, etc.) during the run. ## Syntax[​](#syntax "Direct link to Syntax") * Windows * Linux ``` $env:FASTBCP_SYSTEMINFO_COLLECT = $True ``` ``` export FASTBCP_SYSTEMINFO_COLLECT=True ``` ## Configuration[​](#configuration "Direct link to Configuration") | Property | Value | | ----------- | -------------------------- | | **Type** | Boolean (`True` / `False`) | | **Default** | `False` (disabled) | | **Since** | FastBCP 1.2 | ## Behavior[​](#behavior "Direct link to Behavior") ### When `False` (Default)[​](#when-false-default "Direct link to when-false-default") No system information is collected during the run. ### When `True`[​](#when-true "Direct link to when-true") FastBCP collects system information about the machine (CPU, memory, OS, etc.) while the run is in progress. tip Use together with [`FASTBCP_PERFORMANCE_COLLECT`](/1.3/documentation/environment-variables/fastbcp-performance-collect.md) to also capture performance metrics during the run. --- # FASTBCP\_TMPPATH ## Overview[​](#overview "Direct link to Overview") The `FASTBCP_TMPPATH` environment variable specifies the base directory where FastBCP creates temporary files during buffered cloud uploads. ## Syntax[​](#syntax "Direct link to Syntax") * Windows * Linux ``` $env:FASTBCP_TMPPATH = "D:\temp\fastbcp" ``` ``` export FASTBCP_TMPPATH=/tmp/fastbcp ``` ## Configuration[​](#configuration "Direct link to Configuration") | Property | Value | | -------------- | -------------------------------------------------------------------------------------------------------------------------- | | **Type** | Directory path (absolute or relative) | | **Default** | System temp directory (`%TEMP%` on Windows, `$TMPDIR` on Linux/macOS) | | **Applies to** | Cloud uploads when [`FASTBCP_CLOUD_ISBUFFERED=True`](/1.3/documentation/environment-variables/fastbcp-cloud-isbuffered.md) | | **Since** | FastBCP 1.0 | ## Behavior[​](#behavior "Direct link to Behavior") ### Default Behavior (Not Set)[​](#default-behavior-not-set "Direct link to Default Behavior (Not Set)") FastBCP uses the system's default temporary directory: * **Windows**: `%TEMP%` (typically `C:\Users\\AppData\Local\Temp`) * **Linux/macOS**: `$TMPDIR` (typically `/tmp`) ### Custom Path[​](#custom-path "Direct link to Custom Path") When set, FastBCP creates a unique subdirectory per process: ``` /fastbcp_/ ``` **Example:** ``` D:\temp\fastbcp\fastbcp_a1b2c3d4-e5f6-7890-abcd-ef1234567890\ ``` ### Automatic Cleanup[​](#automatic-cleanup "Direct link to Automatic Cleanup") * Subdirectories are created automatically * Temporary files are deleted after successful upload * In case of errors, files may remain and need manual cleanup --- # FASTBCP\_UID\_STRING\_CASING ## Overview[​](#overview "Direct link to Overview") The `FASTBCP_UID_STRING_CASING` environment variable controls whether UID (UUID) values are converted to lowercase or uppercase strings in the output. The default is lowercase, which follows [RFC 4122](https://www.rfc-editor.org/rfc/rfc4122) standard formatting (e.g. `550e8400-e29b-41d4-a716-446655440000`). ## Syntax[​](#syntax "Direct link to Syntax") * Windows * Linux ``` $env:FASTBCP_UID_STRING_CASING = "upper" ``` ``` export FASTBCP_UID_STRING_CASING=upper ``` ## Configuration[​](#configuration "Direct link to Configuration") | Property | Value | | -------------- | -------------------------------------------------------- | | **Type** | `lower` / `upper` | | **Default** | `lower` | | **Applies to** | All output formats that serialize UID columns as strings | | **Since** | FastBCP 1.0 | ## Values[​](#values "Direct link to Values") | Value | Output example | | ----------------- | -------------------------------------- | | `lower` (default) | `550e8400-e29b-41d4-a716-446655440000` | | `upper` | `550E8400-E29B-41D4-A716-446655440000` | ## Examples[​](#examples "Direct link to Examples") ### Export with uppercase UIDs[​](#export-with-uppercase-uids "Direct link to Export with uppercase UIDs") * Windows * Linux ``` $env:FASTBCP_UID_STRING_CASING = "upper" fastbcp -S myserver.database.windows.net ` -d MyDatabase ` -T dbo.MyTable ` --fileoutput "output.csv" ``` ``` export FASTBCP_UID_STRING_CASING=upper fastbcp -S myserver.database.windows.net \ -d MyDatabase \ -T dbo.MyTable \ --fileoutput "output.csv" ``` ### Restore default lowercase (RFC 4122)[​](#restore-default-lowercase-rfc-4122 "Direct link to Restore default lowercase (RFC 4122)") * Windows * Linux ``` $env:FASTBCP_UID_STRING_CASING = "lower" ``` ``` export FASTBCP_UID_STRING_CASING=lower ``` --- # Environment Variables Overview FastBCP supports several environment variables to customize its behavior. This page provides a comprehensive overview of all available environment variables. ## Quick Reference Table[​](#quick-reference-table "Direct link to Quick Reference Table") | Variable | Type | Default | Category | Description | | ---------------------------------------------------------------------------------------------------------------------------------- | ----------------- | ---------------------------- | ------------ | ----------------------------------------------------------------- | | [`FASTBCP_CLOUD_ISBUFFERED`](/1.3/documentation/environment-variables/fastbcp-cloud-isbuffered.md) | `True` / `False` | `False` | Cloud Upload | Enables buffered cloud uploads for better performance | | [`FASTBCP_TMPPATH`](/1.3/documentation/environment-variables/fastbcp-tmppath.md) | Directory path | System temp | Cloud Upload | Base directory for temporary files during buffered uploads | | [`FASTBCP_CLOUD_MAXUPLOADTHREAD_PER_STREAM`](/1.3/documentation/environment-variables/fastbcp-cloud-maxuploadthread-per-stream.md) | Integer (> 0) | `8` or `2` | Cloud Upload | Maximum parallel upload threads per cloud stream | | [`FASTBCP_RGSIZE`](/1.3/documentation/environment-variables/fastbcp-rgsize.md) | Integer (> 0) | max(2^18/sqrt(degree),64000) | Parquet | Row group size for Parquet files | | [`FASTBCP_UID_STRING_CASING`](/1.3/documentation/environment-variables/fastbcp-uid-string-casing.md) | `lower` / `upper` | `lower` | Output | Casing for UID-to-string conversion (RFC 4122) | | [`FASTBCP_DATEFORMAT`](/1.3/documentation/environment-variables/fastbcp-dateformat.md) | Format string | `yyyy-MM-dd HH:mm:sszzz` | Output | Custom date format string for date-to-string conversion | | [`FASTBCP_ADBC_BATCHCELLS`](/1.3/documentation/environment-variables/fastbcp-adbc-batchcells.md) | Integer (> 0) | `500000` | ADBC | Arrow record batch size (in cells) for ADBC connectors | | [`FASTBCP_SYSTEMINFO_COLLECT`](/1.3/documentation/environment-variables/fastbcp-systeminfo-collect.md) | `True` / `False` | `False` | Diagnostics | Collects system information about the machine during the run | | [`FASTBCP_PERFORMANCE_COLLECT`](/1.3/documentation/environment-variables/fastbcp-performance-collect.md) | `True` / `False` | `False` | Diagnostics | Collects performance information about the machine during the run | | [`FASTBCP_DBPARTITION_TARGET_MODE`](/1.3/documentation/environment-variables/fastbcp-dbpartition-target-mode.md) | `CHUNK` / `HIVE` | `CHUNK` | Parallel | Output file layout of the `DBPartition` parallel method | --- # Advanced Scenarios Advanced use cases, partition functions, and troubleshooting examples. ## SQL Server Partition Functions[​](#sql-server-partition-functions "Direct link to SQL Server Partition Functions") Use SQL Server partition functions for efficient parallel exports. ### Using Partition Function with DataDriven[​](#using-partition-function-with-datadriven "Direct link to Using Partition Function with DataDriven") Leverage existing partition functions to distribute work: ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "tpch10_collation_bin2" ` --trusted ` --sourceschema "dbo" ` --sourcetable "orders_part" ` --directory "D:\temp" ` --fileoutput "orders_partitioned.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "DataDriven" ` --distributekeycolumn "`$partition.PF_DATE(o_orderdate)" ` --paralleldegree 10 ` --merge "False" ``` Partition Function Syntax Use `` `$partition.FunctionName(ColumnName) `` to reference a partition function. The backtick escapes the dollar sign in PowerShell. ### Date-based Partitioning[​](#date-based-partitioning "Direct link to Date-based Partitioning") #### Partition by date ranges for time-series data using database partitions:[​](#partition-by-date-ranges-for-time-series-data-using-database-partitions "Direct link to Partition by date ranges for time-series data using database partitions:") ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "TimeSeriesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "SensorReadings" ` --directory "C:\temp" ` --fileoutput "sensor_readings.parquet" ` --parallelmethod "DataDriven" ` --distributekeycolumn "`$partition.PF_Monthly(reading_date)" ` --paralleldegree 12 ` --merge "False" ``` #### Partition by date ranges for time-series data using Timepartition FastBCP parallelmethod :[​](#partition-by-date-ranges-for-time-series-data-using-timepartition-fastbcp-parallelmethod-- "Direct link to Partition by date ranges for time-series data using Timepartition FastBCP parallelmethod :") ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "TimeSeriesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "SensorReadings" ` --directory "s3://mycorpexportbucket/raw/TimeSeriesDB/SensorReadings/" ` --fileoutput "sensor_readings.parquet" ` --cloudprofile "mycorps3profile" ` --parallelmethod "Timepartition" ` --distributekeycolumn "(reading_date,year,month,day)" ` --paralleldegree 12 ` --merge "False" ``` This technic will produce one file per day inside a directory structure (local or cloud) as a Hive partitionning directory : /year=2026/month=11/day=11/sensor\_readings.parquet You can after a full export use a query to filter your data and overwrite files that was already generated on the overlaping period. ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "TimeSeriesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "SensorReadings_Part" ` --query "SELECT * FROM dbo.SensorReadings_Part WHERE reading_date >= CAST(GETDATE() - 10 AS DATE)" ` --directory "s3://mycorpexportbucket/raw/TimeSeriesDB/SensorReadings/" ` --fileoutput "sensor_readings.parquet" ` --cloudprofile "mycorps3profile" ` --parallelmethod "Timepartition" ` --distributekeycolumn "(reading_date,year,month,day)" ` --paralleldegree 10 ` --merge "False" ``` ## Complex Queries[​](#complex-queries "Direct link to Complex Queries") ### Multi-table Joins[​](#multi-table-joins "Direct link to Multi-table Joins") Export data with a query with joins: ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --query "SELECT o.order_id, o.order_date, c.customer_name, od.product_id, od.quantity, od.unit_price FROM orders o INNER JOIN customers c ON o.customer_id = c.customer_id INNER JOIN order_details od ON o.order_id = od.order_id WHERE o.order_date >= '2024-01-01'" ` --directory "C:\temp" ` --fileoutput "sales_detail.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Ntile" ` --distributekeycolumn "o.order_id" ` --paralleldegree 8 ` --merge "False" ``` ### Aggregated Data[​](#aggregated-data "Direct link to Aggregated Data") Export pre-aggregated data: ``` .\FastBCP.exe ` --connectiontype "pgsql" ` --server "localhost" ` --port "5432" ` --database "analytics" ` --user "postgres" ` --password "postgres" ` --query "SELECT date_trunc('day', order_date) as order_day, customer_region, COUNT(*) as order_count, SUM(total_amount) as total_sales FROM orders GROUP BY date_trunc('day', order_date), customer_region" ` --directory "C:\temp" ` --fileoutput "daily_sales_by_region.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd" ` --encoding "UTF-8" ` --parallelmethod "None" ``` ## Performance Tuning[​](#performance-tuning "Direct link to Performance Tuning") ### Optimal Parallel Degree[​](#optimal-parallel-degree "Direct link to Optimal Parallel Degree") * Auto-detect * Manual Use negative values to auto-calculate based on CPU cores: ``` # Use all cores minus 2 .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "LargeDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "BigTable" ` --directory "C:\temp" ` --fileoutput "bigtable.parquet" ` --parallelmethod "RangeId" ` --distributekeycolumn "id" ` --paralleldegree -2 ` --merge "False" ``` Specify exact thread count: ``` # Use exactly 16 threads .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "LargeDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "BigTable" ` --directory "C:\temp" ` --fileoutput "bigtable.parquet" ` --parallelmethod "RangeId" ` --distributekeycolumn "id" ` --paralleldegree 16 ` --merge "False" ``` ### Parquet RowGroup Size[​](#parquet-rowgroup-size "Direct link to Parquet RowGroup Size") To reduce memory pressure and, in many cases, improve export performance, you can configure the Parquet row group size by setting the `FASTBCP_RGSIZE` environment variable. A smaller `FASTBCP_RGSIZE` value reduces memory usage during export. However, this comes with a trade-off: smaller row groups may reduce Parquet compression efficiency and can sometimes increase the final file size. Recommended values range from `1000` to `1_000_000`. In practice, values between 32,000 and 64,000 often provide a good balance between memory usage, performance, and compression efficiency. * Windows * Linux ``` $Env:FASTBCP_RGSIZE=32000 .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "LargeDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "BigTable" ` --directory "C:\temp" ` --fileoutput "bigtable.parquet" ` --parallelmethod "RangeId" ` --distributekeycolumn "id" ` --paralleldegree -2 ` --merge "False" ``` Specify exact thread count: ``` export FASTBCP_RGSIZE=32000 .\FastBCP / --connectiontype "mssql" / --server "mssqlhost.domain.lan,1433" / --database "LargeDB" / --user "FastUSer" / --password "FastPassword" / --sourceschema "dbo" / --sourcetable "BigTable" / --directory "/data/export/bigtable/" / --fileoutput "bigtable.parquet" / --parallelmethod "RangeId" / --distributekeycolumn "id" / --paralleldegree 16 / --merge "False" ``` ### Merge vs No-Merge[​](#merge-vs-no-merge "Direct link to Merge vs No-Merge") * With Merge * Without Merge Combine parallel outputs into single file: ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "DataDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Data" ` --directory "C:\temp" ` --fileoutput "data_merged.parquet" ` --parallelmethod "RangeId" ` --distributekeycolumn "id" ` --paralleldegree 8 ` --merge "True" ``` **Result**: Single file `data_merged.parquet`, slower and only OnPremise. Keep separate files for parallel processing: ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "DataDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Data" ` --directory "C:\temp" ` --fileoutput "data_part.parquet" ` --parallelmethod "RangeId" ` --distributekeycolumn "id" ` --paralleldegree 8 ` --merge "False" ``` **Result**: Multiple files `data_part_Chunk000.parquet`, `data_part_Chunk001.parquet`, etc. ### Enable Debug Logging[​](#enable-debug-logging "Direct link to Enable Debug Logging") Get detailed execution information: ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "TestDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "TestTable" ` --directory "C:\temp" ` --fileoutput "debug_export.csv" ` --parallelmethod "Random" ` --distributekeycolumn "id" ` --paralleldegree 4 ` --merge "False" ` --loglevel "Debug" ` --runid "debug_test_run" ``` Debug Mode Use `--loglevel "Debug"` to see detailed execution steps, connection strings (without passwords), and query generation details. tip Build your command with the [Wizard](/latest/wizard.md) --- # Cloud Storage Examples Examples for exporting data directly to cloud storage platforms. ## AWS S3[​](#aws-s3 "Direct link to AWS S3") Export data directly to Amazon S3 buckets using date-based placeholders. ### S3 with Date Placeholders[​](#s3-with-date-placeholders "Direct link to S3 with Date Placeholders") Automatically organize files by date using placeholder tokens: ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "DailySales" ` --directory "s3://my-bucket/data/sales/full/" ` --fileoutput "sales.parquet" ` --parallelmethod "RangeId" ` --distributekeycolumn "sale_id" ` --paralleldegree 8 ` --runid "sales_to_s3_daily" ``` ### S3 with Nested Structure[​](#s3-with-nested-structure "Direct link to S3 with Nested Structure") Create hierarchical folder structures: ``` .\FastBCP.exe ` --connectiontype "pgsql" ` --server "localhost" ` --port "5432" ` --database "ecommerce" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "orders" ` --directory "s3://analytics-bucket/exports/orders/" ` --fileoutput "orders.parquet" ` --parallelmethod "DataDriven" ` --distributekeycolumn "o_orderdate" ` --paralleldegree 10 ` --merge "False" ``` ### S3 with CSV Format[​](#s3-with-csv-format "Direct link to S3 with CSV Format") Export CSV files to S3 with manual date partitioning: ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "LogsDB" ` --trusted ` --query "SELECT * FROM ApplicationLogs WHERE log_date = '2024-05-01'" ` --directory "s3://logs-bucket/app-logs/appdate=2024-05-01/" ` --fileoutput "app_logs.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ``` ## Azure Blob Storage[​](#azure-blob-storage "Direct link to Azure Blob Storage") Export data to Azure Blob Storage containers. ### Azure with Date Partitioning[​](#azure-with-date-partitioning "Direct link to Azure with Date Partitioning") ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "AnalyticsDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Events" ` --directory "abs://mystorageaccount.blob.core.windows.net/datacontainer/events/full/" ` --fileoutput "events.parquet" ` --parallelmethod "Timepartition" ` --distributekeycolumn "event_timestamp(year,month)" ` --paralleldegree 10 ``` ### Azure Data Lake Gen2[​](#azure-data-lake-gen2 "Direct link to Azure Data Lake Gen2") Export to Azure Data Lake Storage Gen2: ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "AnalyticsDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Events" ` --directory "abfss://mystorageaccount.dfs.core.windows.net/datacontainer/events/full/" ` --fileoutput "events.parquet" ` --parallelmethod "Timepartition" ` --distributekeycolumn "event_timestamp(year,month)" ` --paralleldegree 10 ``` ## Hourly Exports[​](#hourly-exports "Direct link to Hourly Exports") Create exports with hourly granularity. ### Hourly Data Partition by Sensor with an incremental time range drived from outside[​](#hourly-data-partition-by-sensor-with-an-incremental-time-range-drived-from-outside "Direct link to Hourly Data Partition by Sensor with an incremental time range drived from outside") ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "StreamingDB" ` --trusted ` --query "SELECT * FROM SensorData WHERE reading_time >= '2024-02-03 14:00:00' and reading_time < '2024-02-03 15:00:00'" ` --directory "s3://iot-bucket/sensor-data/" ` --fileoutput "sensors_20240203140000_20240203150000.parquet" ` --parallelmethod "DataDriven" ` --distributekeycolumn "sensor_id" ` --datadrivenquery "SELECT sensor_id From SensorList" ` --paralleldegree 8 ` --runid "hourly_sensor_export_20240203140000_20240203150000" ``` ## Best for Cloud Exports[​](#best-for-cloud-exports "Direct link to Best for Cloud Exports") ### Performance Tips[​](#performance-tips "Direct link to Performance Tips") Parquet **Use Parquet for cloud storage**: Better compression and query performance, reduce network traffic Parallelism **Enable parallel execution when needed**: * if you need to split data on a business criteria * if you have a lots of data to extract Dynamic Parallel Degree Use negativ value for `--paralleldegree` to automatically set threads to (CPU cores / abs(degree)), leaving resources for other processes. eg `--paralleldegree -2` will use half of the core of the machine from where FastBCP is launched DataDriven Query \*\*Use `--datadrivenquery` to : * speedup the retrieval of the elements list to extract. * as a technic for incremental extraction by using a where in the `--datadrivenquery` instead of the main `--query` warning Keep the degree safe for your source, to avoid a total saturation. ### Example with All Best Practices[​](#example-with-all-best-practices "Direct link to Example with All Best Practices") ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "DataWarehouse" ` --trusted ` --sourceschema "dbo" ` --sourcetable "FactSales" ` --directory "s3://analytics-bucket/warehouse/sales/{sourcetable}" ` --fileoutput "FactSales.parquet" ` --parallelmethod "DataDriven" ` --datadrivenquery "SELECT ref_date from calendar where ref_date > cast(getdate()-30 as date)" ` --distributekeycolumn "sale_date" ` --paralleldegree -2 ` --runid "daily_sales_to_s3" ` --loglevel "Information" ``` tip Build your command with the [Wizard](/latest/wizard.md) --- # DB2 Examples Comprehensive examples for exporting data from IBM DB2 using the generic `odbc` connection type. DB2 ODBC Driver DB2 is not a native connection type, so FastBCP connects to it through ODBC. Install the IBM DB2 ODBC driver, then provide either a DSN (`--dsn`) or a full connection string (`--sourceconnectstring`) as shown below. ## Connection String[​](#connection-string "Direct link to Connection String") **Single-threaded export:** ``` .\FastBCP.exe ` --connectiontype "odbc" ` --sourceconnectstring "Driver={IBM DB2 ODBC DRIVER};Database=SAMPLE;Hostname=db2server.company.corp;Port=25010;Protocol=TCPIP;Uid=db2user;Pwd=password;CurrentSchema=DB2ADMIN" ` --query "SELECT * FROM DB2ADMIN.ORDERS" ` --directory "C:\temp" ` --fileoutput "db2_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` **Parallel export with Ntile method:** ``` .\FastBCP.exe ` --connectiontype "odbc" ` --sourceconnectstring "Driver={IBM DB2 ODBC DRIVER};Database=SAMPLE;Hostname=db2server.company.corp;Port=25010;Protocol=TCPIP;Uid=db2user;Pwd=password;CurrentSchema=DB2ADMIN" ` --query "SELECT * FROM DB2ADMIN.ORDERS" ` --directory "C:\temp" ` --fileoutput "db2_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Ntile" ` --distributekeycolumn "ORDER_ID" ` --paralleldegree -2 ` --merge "False" ``` **Parallel export with Random method:** ``` .\FastBCP.exe ` --connectiontype "odbc" ` --sourceconnectstring "Driver={IBM DB2 ODBC DRIVER};Database=SAMPLE;Hostname=db2server.company.corp;Port=25010;Protocol=TCPIP;Uid=db2user;Pwd=password;CurrentSchema=DB2ADMIN" ` --query "SELECT * FROM DB2ADMIN.ORDERS" ` --directory "C:\temp" ` --fileoutput "db2_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "ORDER_ID" ` --paralleldegree 8 ` --merge "False" ``` ## DSN Connection[​](#dsn-connection "Direct link to DSN Connection") If a DSN is already configured on the machine, you can use `--dsn` instead of `--sourceconnectstring`. ``` .\FastBCP.exe ` --connectiontype "odbc" ` --dsn "DB2_DSN" ` --query "SELECT * FROM DB2ADMIN.ORDERS" ` --directory "C:\temp" ` --fileoutput "db2_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` Quoting special identifiers If your DB2 schema or table name contains special characters (e.g. `HCR_BI."APER@XPSAHISTO"`), keep the double quotes around the identifier inside your `--query` value so DB2 treats it as a delimited identifier. tip Build your command with the [Wizard](/latest/wizard.md) --- # MySQL Examples Examples for exporting data from MySQL databases. ## Single-threaded Export[​](#single-threaded-export "Direct link to Single-threaded Export") Simple export without parallelization. ``` .\FastBCP.exe ` --connectiontype "mysql" ` --server "localhost" ` --port "3306" ` --database "test" ` --user "root" ` --password "password" ` --query "SELECT * FROM test_table LIMIT 1000" ` --directory "C:\temp" ` --fileoutput "mysql_test.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` ## Parallel Export - Random Method[​](#parallel-export---random-method "Direct link to Parallel Export - Random Method") Export using Random distribution. ``` .\FastBCP.exe ` --connectiontype "mysql" ` --server "localhost" ` --port "3306" ` --database "test" ` --user "root" ` --password "password" ` --sourceschema "test" ` --sourcetable "orders" ` --directory "C:\temp" ` --fileoutput "mysql_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "order_id" ` --paralleldegree 8 ` --merge "False" ` --runid "mysql_to_csv_parallel8_random" ``` ## Parallel Export - DataDriven Method[​](#parallel-export---datadriven-method "Direct link to Parallel Export - DataDriven Method") Export using DataDriven distribution based on distinct column values. ``` .\FastBCP.exe ` --connectiontype "mysql" ` --server "localhost" ` --port "3306" ` --database "test" ` --user "root" ` --password "password" ` --sourceschema "test" ` --sourcetable "orders" ` --directory "C:\temp" ` --fileoutput "mysql_orders_dd.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "DataDriven" ` --distributekeycolumn "status" ` --paralleldegree 10 ` --merge "False" ` --runid "mysql_to_csv_parallel10_datadriven" ``` ## Export to Parquet[​](#export-to-parquet "Direct link to Export to Parquet") Export MySQL data to Parquet format. ``` .\FastBCP.exe ` --connectiontype "mysql" ` --server "localhost" ` --port "3306" ` --database "test" ` --user "root" ` --password "password" ` --sourceschema "test" ` --sourcetable "orders" ` --directory "C:\temp" ` --fileoutput "mysql_orders.parquet" ` --parallelmethod "Random" ` --distributekeycolumn "order_id" ` --paralleldegree 6 ` --merge "False" ``` tip Build your command with the [Wizard](/latest/wizard.md) --- # Oracle Examples Comprehensive examples for exporting data from Oracle databases. ## Connection Types[​](#connection-types "Direct link to Connection Types") Oracle exports support multiple connection types: * **oraodp**: Native Oracle Data Provider (recommended) * **oledb**: Using Oracle OLEDB Provider (OraOLEDB) * **odbc**: Using ODBC DSN * **adbc\_oracle**: ADBC FastDriver — ultra-fast, Parquet-only export (see [ADBC Examples](#adbc-examples)) ADBC Support The `adbc_oracle` connection type uses the Arpe.io ADBC FastDriver for ultra-fast, Arrow-native Parquet exports, and also supports the `Rowid` parallel method. Output is Parquet-only — see the [ADBC Examples](#adbc-examples) section below. ## Single-threaded Export[​](#single-threaded-export "Direct link to Single-threaded Export") Simple export without parallelization. * Oracle Data Provider * OLEDB Provider ``` .\FastBCP.exe ` --connectiontype "oraodp" ` --server "localhost:1521/ORCLPDB1" ` --user "system" ` --password "password" ` --query "SELECT * FROM customers WHERE ROWNUM <= 1000" ` --directory "C:\temp" ` --fileoutput "oracle_customers.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` ``` .\FastBCP.exe ` --connectiontype "oledb" ` --provider "OraOLEDB.Oracle" ` --server "localhost:1521/ORCLPDB1" ` --user "system" ` --password "password" ` --query "SELECT * FROM customers WHERE ROWNUM <= 1000" ` --directory "C:\temp" ` --fileoutput "oracle_customers.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` ## Parallel Export - Rowid Method[​](#parallel-export---rowid-method "Direct link to Parallel Export - Rowid Method") Oracle-specific parallel export 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 exports and does not require a specific distribute key column. **Full table export:** ``` .\FastBCP.exe ` --connectiontype "oraodp" ` --server "localhost:1521/ORCLPDB1" ` --user "system" ` --password "password" ` --sourceschema "SYSTEM" ` --sourcetable "ORDERS" ` --directory "C:\temp" ` --fileoutput "oracle_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Rowid" ` --paralleldegree 8 ` --merge "False" ` --runid "oraodp_to_csv_parallel8_rowid" ``` **With query filter:** ``` .\FastBCP.exe ` --connectiontype "oraodp" ` --server "localhost:1521/ORCLPDB1" ` --user "system" ` --password "password" ` --query "SELECT * FROM SYSTEM.ORDERS WHERE order_date >= TO_DATE('2024-01-01', 'YYYY-MM-DD')" ` --directory "C:\temp" ` --fileoutput "oracle_orders_2024.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Rowid" ` --paralleldegree 8 ` --merge "False" ` --runid "oraodp_to_csv_parallel8_rowid_filtered" ``` ## Parallel Export - Random Method[​](#parallel-export---random-method "Direct link to Parallel Export - Random Method") Export using Random distribution with modulo operation. ``` .\FastBCP.exe ` --connectiontype "oraodp" ` --server "localhost:1521/ORCLPDB1" ` --user "system" ` --password "password" ` --sourceschema "SYSTEM" ` --sourcetable "ORDERS" ` --directory "C:\temp" ` --fileoutput "oracle_orders_random.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "order_id" ` --paralleldegree 8 ` --merge "False" ` --runid "oraodp_to_csv_parallel8_random" ``` ## Parallel Export - DataDriven Method[​](#parallel-export---datadriven-method "Direct link to Parallel Export - DataDriven Method") Export using DataDriven distribution based on distinct column values. ``` .\FastBCP.exe ` --connectiontype "oraodp" ` --server "localhost:1521/ORCLPDB1" ` --user "system" ` --password "password" ` --sourceschema "SYSTEM" ` --sourcetable "ORDERS" ` --directory "C:\temp" ` --fileoutput "oracle_orders_dd.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "DataDriven" ` --distributekeycolumn "order_status" ` --paralleldegree 10 ` --merge "False" ` --runid "oraodp_to_csv_parallel10_datadriven" ``` ## Export to Parquet[​](#export-to-parquet "Direct link to Export to Parquet") Export Oracle data to Parquet format. **Single-threaded:** ``` .\FastBCP.exe ` --connectiontype "oraodp" ` --server "localhost:1521/ORCLPDB1" ` --user "system" ` --password "password" ` --sourceschema "SYSTEM" ` --sourcetable "ORDERS" ` --directory "C:\temp" ` --fileoutput "oracle_orders.parquet" ` --parallelmethod "None" ``` **Parallel with Rowid:** ``` .\FastBCP.exe ` --connectiontype "oraodp" ` --server "localhost:1521/ORCLPDB1" ` --user "system" ` --password "password" ` --sourceschema "SYSTEM" ` --sourcetable "ORDERS" ` --directory "C:\temp" ` --fileoutput "oracle_orders.parquet" ` --parallelmethod "Rowid" ` --paralleldegree 10 ` --merge "False" ``` ## OLEDB Connection Examples[​](#oledb-connection-examples "Direct link to OLEDB Connection Examples") Using Oracle OLEDB Provider for connections. **Single-threaded:** ``` .\FastBCP.exe ` --connectiontype "oledb" ` --provider "OraOLEDB.Oracle" ` --server "localhost:1521/ORCLPDB1" ` --user "system" ` --password "password" ` --query "SELECT * FROM SYSTEM.ORDERS WHERE ROWNUM <= 10000" ` --directory "C:\temp" ` --fileoutput "oracle_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` **Parallel Random:** ``` .\FastBCP.exe ` --connectiontype "oledb" ` --provider "OraOLEDB.Oracle" ` --server "localhost:1521/ORCLPDB1" ` --user "system" ` --password "password" ` --query "SELECT * FROM SYSTEM.ORDERS" ` --directory "C:\temp" ` --fileoutput "oracle_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "order_id" ` --paralleldegree 6 ` --merge "False" ``` **Parallel DataDriven:** ``` .\FastBCP.exe ` --connectiontype "oledb" ` --provider "OraOLEDB.Oracle" ` --server "localhost:1521/ORCLPDB1" ` --user "system" ` --password "password" ` --query "SELECT * FROM SYSTEM.ORDERS" ` --directory "C:\temp" ` --fileoutput "oracle_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "DataDriven" ` --distributekeycolumn "order_status" ` --paralleldegree 6 ` --merge "False" ``` ## ADBC Examples[​](#adbc-examples "Direct link to ADBC Examples") The `adbc_oracle` connection type uses the Arpe.io ADBC FastDriver for ultra-fast, Arrow-native exports. **Output is Parquet-only**, and the `Rowid` parallel method is also supported — see [Connection Parameters](/1.3/documentation/cli/connection_parameters.md#connection-type) and [Parallel Parameters](/1.3/documentation/cli/parallel_parameters.md#parallel-method) for details. ``` ./FastBCP \ --connectiontype "adbc_oracle" \ --server "localhost:1521/orclpdb1" \ --user "MIG_EXPRESS" \ --password "FastPassword" \ --sourceschema "TPCH10" \ --sourcetable "LINEITEM" \ --directory "./" \ --fileoutput "{sourcetable}.parquet" \ --method "None" ``` tip Build your command with the [Wizard](/latest/wizard.md) --- # Other Databases Examples for exporting data from Clickhouse, SAP HANA, and Netezza databases. ## Clickhouse[​](#clickhouse "Direct link to Clickhouse") Export data from Clickhouse database. **Single-threaded export:** ``` .\FastBCP.exe ` --connectiontype "clickhouse" ` --server "localhost" ` --port "9000" ` --database "default" ` --user "default" ` --password "password" ` --query "SELECT * FROM orders LIMIT 1000" ` --directory "C:\temp" ` --fileoutput "clickhouse_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` **Parallel export with Random method:** ``` .\FastBCP.exe ` --connectiontype "clickhouse" ` --server "localhost" ` --port "9000" ` --database "default" ` --user "default" ` --password "password" ` --sourceschema "default" ` --sourcetable "orders" ` --directory "C:\temp" ` --fileoutput "clickhouse_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "order_id" ` --paralleldegree 8 ` --merge "False" ``` ## SAP HANA[​](#sap-hana "Direct link to SAP HANA") Export data from SAP HANA database using two connection types. ### HANA Connection Type[​](#hana-connection-type "Direct link to HANA Connection Type") Standard HANA connection for general exports. **Single-threaded export:** ``` .\FastBCP.exe ` --connectiontype "hana" ` --server "hanaserver:30015" ` --user "SYSTEM" ` --password "password" ` --query "SELECT * FROM ORDERS WHERE ORDER_DATE >= '2024-01-01'" ` --directory "C:\temp" ` --fileoutput "hana_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` **Parallel export with Random method:** ``` .\FastBCP.exe ` --connectiontype "hana" ` --server "hanaserver:30015" ` --user "SYSTEM" ` --password "password" ` --sourceschema "SYSTEM" ` --sourcetable "ORDERS" ` --directory "C:\temp" ` --fileoutput "hana_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "ORDER_ID" ` --paralleldegree 8 ` --merge "False" ``` ### HANA Export Connection Type[​](#hana-export-connection-type "Direct link to HANA Export Connection Type") Optimized HANA connection using native EXPORT functionality for faster bulk exports. HANA Export The `hanaexport` connection type uses SAP HANA's native EXPORT statement for optimized bulk data transfer. This is recommended for large datasets. **Single-threaded export:** ``` .\FastBCP.exe ` --connectiontype "hanaexport" ` --server "hanaserver:30015" ` --user "SYSTEM" ` --password "password" ` --query "SELECT * FROM ORDERS WHERE ORDER_DATE >= '2024-01-01'" ` --directory "C:\temp" ` --fileoutput "hana_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` **Parallel export with Random method:** ``` .\FastBCP.exe ` --connectiontype "hanaexport" ` --server "hanaserver:30015" ` --user "SYSTEM" ` --password "password" ` --sourceschema "SYSTEM" ` --sourcetable "ORDERS" ` --directory "C:\temp" ` --fileoutput "hana_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "ORDER_ID" ` --paralleldegree 8 ` --merge "False" ``` ## Netezza[​](#netezza "Direct link to Netezza") Export data from Netezza database using OLEDB provider. **Single-threaded export:** ``` .\FastBCP.exe ` --connectiontype "oledb" ` --provider "NZOLEDB" ` --server "netezza_server" ` --database "SYSTEM" ` --user "admin" ` --password "password" ` --query "SELECT * FROM orders" ` --directory "C:\temp" ` --fileoutput "netezza_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` **Parallel export with Random method:** ``` .\FastBCP.exe ` --connectiontype "oledb" ` --provider "NZOLEDB" ` --server "netezza_server" ` --database "SYSTEM" ` --user "admin" ` --password "password" ` --query "SELECT * FROM orders" ` --directory "C:\temp" ` --fileoutput "netezza_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "order_id" ` --paralleldegree 6 ` --merge "False" ``` **Parallel export with DataDriven method:** ``` .\FastBCP.exe ` --connectiontype "oledb" ` --provider "NZOLEDB" ` --server "netezza_server" ` --database "SYSTEM" ` --user "admin" ` --password "password" ` --query "SELECT * FROM orders" ` --directory "C:\temp" ` --fileoutput "netezza_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "DataDriven" ` --distributekeycolumn "region" ` --paralleldegree 6 ` --merge "False" ``` tip Build your command with the [Wizard](/latest/wizard.md) --- # Output Formats Examples demonstrating different output formats supported by FastBCP. ## CSV Format[​](#csv-format "Direct link to CSV Format") Standard comma/delimiter-separated values format. ### Basic CSV Export[​](#basic-csv-export "Direct link to Basic CSV Export") ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Sales" ` --directory "C:\temp" ` --fileoutput "sales.csv" ` --decimalseparator "." ` --delimiter "," ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` ### CSV with Custom Delimiter[​](#csv-with-custom-delimiter "Direct link to CSV with Custom Delimiter") Using pipe delimiter for better data separation: ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Sales" ` --directory "C:\temp" ` --fileoutput "sales.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "sale_id" ` --paralleldegree 8 ` --merge "False" ``` ### CSV with European Format[​](#csv-with-european-format "Direct link to CSV with European Format") Using comma as decimal separator (common in European countries): ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Sales" ` --directory "C:\temp" ` --fileoutput "sales_european.csv" ` --decimalseparator "," ` --delimiter ";" ` --dateformat "dd/MM/yyyy HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "sale_id" ` --paralleldegree 8 ` --merge "False" ``` ## Parquet Format[​](#parquet-format "Direct link to Parquet Format") Columnar storage format optimized for analytical queries. ### Basic Parquet Export[​](#basic-parquet-export "Direct link to Basic Parquet Export") ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Sales" ` --directory "C:\temp" ` --fileoutput "sales.parquet" ` --parallelmethod "None" ``` ### Parallel Parquet Export[​](#parallel-parquet-export "Direct link to Parallel Parquet Export") Maximize performance with parallel execution: ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Sales" ` --directory "C:\temp" ` --fileoutput "sales.parquet" ` --parallelmethod "RangeId" ` --distributekeycolumn "sale_id" ` --paralleldegree 12 ` --merge "False" ``` ### Parquet with PostgreSQL[​](#parquet-with-postgresql "Direct link to Parquet with PostgreSQL") ``` .\FastBCP.exe ` --connectiontype "pgcopy" ` --server "localhost" ` --port "5432" ` --database "salesdb" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "sales" ` --directory "C:\temp" ` --fileoutput "pg_sales.parquet" ` --parallelmethod "Ctid" ` --paralleldegree 10 ` --merge "False" ``` ### Parquet with Oracle[​](#parquet-with-oracle "Direct link to Parquet with Oracle") ``` .\FastBCP.exe ` --connectiontype "oraodp" ` --server "localhost:1521/ORCLPDB1" ` --user "system" ` --password "password" ` --sourceschema "SYSTEM" ` --sourcetable "SALES" ` --directory "C:\temp" ` --fileoutput "oracle_sales.parquet" ` --parallelmethod "Rowid" ` --paralleldegree 8 ` --merge "False" ``` ## Excel Format[​](#excel-format "Direct link to Excel Format") Export data to Microsoft Excel format (.xlsx). Excel Format Excel exports automatically format data for spreadsheet applications. Large datasets may be split across multiple sheets if they exceed Excel's row limits. ### Basic Excel Export[​](#basic-excel-export "Direct link to Basic Excel Export") ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Sales" ` --directory "C:\temp" ` --fileoutput "sales.xlsx" ` --parallelmethod "None" ``` ### Parallel Excel Export[​](#parallel-excel-export "Direct link to Parallel Excel Export") ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Sales" ` --directory "C:\temp" ` --fileoutput "sales.xlsx" ` --parallelmethod "RangeId" ` --distributekeycolumn "sale_id" ` --paralleldegree 6 ` --merge "False" ``` ### Excel with Custom Query[​](#excel-with-custom-query "Direct link to Excel with Custom Query") Export filtered data to Excel: ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --query "SELECT * FROM dbo.Sales WHERE sale_date >= '2024-01-01' AND sale_date < '2025-01-01'" ` --directory "C:\temp" ` --fileoutput "sales_2024.xlsx" ` --parallelmethod "Ntile" ` --distributekeycolumn "sale_id" ` --paralleldegree 4 ` --merge "False" ``` tip Build your command with the [Wizard](/latest/wizard.md) --- # PostgreSQL Examples Comprehensive examples for exporting data from PostgreSQL using native connectors (pgsql, pgcopy). ## Connection Types[​](#connection-types "Direct link to Connection Types") PostgreSQL exports support three connection types: * **pgsql**: Standard PostgreSQL protocol * **pgcopy**: PostgreSQL COPY protocol (fastest for bulk exports) * **adbc\_pgsql**: ADBC FastDriver — ultra-fast, Parquet-only export (see [ADBC Examples](#adbc-examples)) ADBC Support The `adbc_pgsql` connection type uses the Arpe.io ADBC FastDriver for ultra-fast, Arrow-native Parquet exports. Output is Parquet-only — see the [ADBC Examples](#adbc-examples) section below. ## Single-threaded Export[​](#single-threaded-export "Direct link to Single-threaded Export") Simple export without parallelization. * Standard Protocol * COPY Protocol ``` .\FastBCP.exe ` --connectiontype "pgsql" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --query "SELECT * FROM lineitem LIMIT 1000" ` --directory "C:\temp" ` --fileoutput "pg_lineitem.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` ``` .\FastBCP.exe ` --connectiontype "pgcopy" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --query "SELECT * FROM lineitem LIMIT 1000" ` --directory "C:\temp" ` --fileoutput "pg_lineitem.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` ## Parallel Export - Random Method[​](#parallel-export---random-method "Direct link to Parallel Export - Random Method") Export using Random distribution with modulo operation. * Standard Protocol * COPY Protocol ``` .\FastBCP.exe ` --connectiontype "pgsql" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --query "SELECT * FROM lineitem" ` --directory "C:\temp" ` --fileoutput "pg_lineitem_random.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "l_linenumber" ` --paralleldegree 8 ` --merge "False" ` --runid "pgsql_to_csv_parallel8_random" ``` ``` .\FastBCP.exe ` --connectiontype "pgcopy" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --query "SELECT * FROM lineitem" ` --directory "C:\temp" ` --fileoutput "pg_lineitem_random.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "l_linenumber" ` --paralleldegree 8 ` --merge "False" ` --runid "pgcopy_to_csv_parallel8_random" ``` ## Parallel Export - DataDriven Method[​](#parallel-export---datadriven-method "Direct link to Parallel Export - DataDriven Method") Export using DataDriven distribution based on distinct column values. * Standard Protocol * COPY Protocol ``` .\FastBCP.exe ` --connectiontype "pgsql" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "lineitem" ` --directory "C:\temp" ` --fileoutput "pg_lineitem_dd.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "DataDriven" ` --distributekeycolumn "l_shipmode" ` --paralleldegree 10 ` --merge "False" ` --runid "pgsql_to_csv_parallel10_datadriven" ``` ``` .\FastBCP.exe ` --connectiontype "pgcopy" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "lineitem" ` --directory "C:\temp" ` --fileoutput "pg_lineitem_dd.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "DataDriven" ` --distributekeycolumn "l_shipmode" ` --paralleldegree 10 ` --merge "False" ` --runid "pgcopy_to_csv_parallel10_datadriven" ``` ## Parallel Export - Ntile Method[​](#parallel-export---ntile-method "Direct link to Parallel Export - Ntile Method") Export using Ntile for evenly distributed chunks. * Standard Protocol * COPY Protocol **Full table:** ``` .\FastBCP.exe ` --connectiontype "pgsql" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "lineitem" ` --directory "C:\temp" ` --fileoutput "pg_lineitem_ntile.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Ntile" ` --distributekeycolumn "l_orderkey" ` --paralleldegree 12 ` --merge "False" ` --runid "pgsql_to_csv_parallel12_ntile" ``` **With query filter:** ``` .\FastBCP.exe ` --connectiontype "pgsql" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --query "SELECT * FROM lineitem WHERE l_shipdate BETWEEN '1995-01-01' AND '1995-12-31'" ` --directory "C:\temp" ` --fileoutput "pg_lineitem_ntile.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Ntile" ` --distributekeycolumn "l_orderkey" ` --paralleldegree 12 ` --merge "False" ` --runid "pgsql_to_csv_parallel12_ntile_filtered" ``` **Full table:** ``` .\FastBCP.exe ` --connectiontype "pgcopy" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "lineitem" ` --directory "C:\temp" ` --fileoutput "pg_lineitem_ntile.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Ntile" ` --distributekeycolumn "l_orderkey" ` --paralleldegree 12 ` --merge "False" ` --runid "pgcopy_to_csv_parallel12_ntile" ``` **With query filter:** ``` .\FastBCP.exe ` --connectiontype "pgcopy" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --query "SELECT * FROM lineitem WHERE l_shipdate BETWEEN '1995-01-01' AND '1995-12-31'" ` --directory "C:\temp" ` --fileoutput "pg_lineitem_ntile.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Ntile" ` --distributekeycolumn "l_orderkey" ` --paralleldegree 12 ` --merge "False" ` --runid "pgcopy_to_csv_parallel12_ntile_filtered" ``` ## Parallel Export - Ctid Method[​](#parallel-export---ctid-method "Direct link to Parallel Export - Ctid Method") PostgreSQL-specific parallel export using physical row identifier (ctid). PostgreSQL-Specific The Ctid method is unique to PostgreSQL and uses the physical row identifier for parallel data distribution. This is very efficient for full table exports. * Standard Protocol * COPY Protocol ``` .\FastBCP.exe ` --connectiontype "pgsql" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "lineitem" ` --directory "C:\temp" ` --fileoutput "pg_lineitem_ctid.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Ctid" ` --paralleldegree 8 ` --merge "False" ` --runid "pgsql_to_csv_parallel8_ctid" ``` ``` .\FastBCP.exe ` --connectiontype "pgcopy" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "lineitem" ` --directory "C:\temp" ` --fileoutput "pg_lineitem_ctid.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Ctid" ` --paralleldegree 8 ` --merge "False" ` --runid "pgcopy_to_csv_parallel8_ctid" ``` ## Export to Parquet[​](#export-to-parquet "Direct link to Export to Parquet") Export PostgreSQL data to Parquet format. * Standard Protocol * COPY Protocol **Single-threaded:** ``` .\FastBCP.exe ` --connectiontype "pgsql" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "lineitem" ` --directory "C:\temp" ` --fileoutput "pg_lineitem.parquet" ` --parallelmethod "None" ``` **Parallel with Ctid:** ``` .\FastBCP.exe ` --connectiontype "pgsql" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "lineitem" ` --directory "C:\temp" ` --fileoutput "pg_lineitem.parquet" ` --parallelmethod "Ctid" ` --paralleldegree 10 ` --merge "False" ``` **Single-threaded:** ``` .\FastBCP.exe ` --connectiontype "pgcopy" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "lineitem" ` --directory "C:\temp" ` --fileoutput "pg_lineitem.parquet" ` --parallelmethod "None" ``` **Parallel with Ctid:** ``` .\FastBCP.exe ` --connectiontype "pgcopy" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "lineitem" ` --directory "C:\temp" ` --fileoutput "pg_lineitem.parquet" ` --parallelmethod "Ctid" ` --paralleldegree 10 ` --merge "False" ``` ## ODBC Connection[​](#odbc-connection "Direct link to ODBC Connection") Using ODBC DSN for PostgreSQL connection. **Single-threaded:** ``` .\FastBCP.exe ` --connectiontype "odbc" ` --dsn "PostgreSQL_DSN" ` --directory "C:\temp" ` --fileoutput "pg_test.csv" ` --query "SELECT * FROM public.test_table" ` --parallelmethod "None" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ``` **Parallel Random:** ``` .\FastBCP.exe ` --connectiontype "odbc" ` --dsn "PostgreSQL_DSN" ` --directory "C:\temp" ` --fileoutput "pg_test.csv" ` --query "SELECT * FROM public.test_table" ` --parallelmethod "Random" ` --distributekeycolumn "id" ` --paralleldegree 6 ` --merge "False" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ``` **Parallel DataDriven:** ``` .\FastBCP.exe ` --connectiontype "odbc" ` --dsn "PostgreSQL_DSN" ` --directory "C:\temp" ` --fileoutput "pg_test.csv" ` --query "SELECT * FROM public.test_table" ` --parallelmethod "DataDriven" ` --distributekeycolumn "category" ` --paralleldegree 6 ` --merge "False" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ``` ## ADBC Examples[​](#adbc-examples "Direct link to ADBC Examples") The `adbc_pgsql` connection type uses the Arpe.io ADBC FastDriver for ultra-fast, Arrow-native exports. **Output is Parquet-only** — see [Connection Parameters](/1.3/documentation/cli/connection_parameters.md#connection-type) for details. ``` ./FastBCP \ --connectiontype "adbc_pgsql" \ --server "localhost:5432" \ --user "pytabextract_pguser" \ --password "FastPassword" \ --database "tpch" \ --sourceschema "tpch10" \ --sourcetable "lineitem" \ --directory "./" \ --fileoutput "{sourcetable}.parquet" \ --method "None" ``` tip Build your command with the [Wizard](/latest/wizard.md) --- # SQL Server Examples Comprehensive examples for exporting data from SQL Server (MSSQL, OLEDB, ODBC). ADBC Support SQL Server also supports the `adbc_mssql` connection type, powered by the Arpe.io ADBC FastDriver for ultra-fast, Arrow-native Parquet exports. Output is Parquet-only — see the [ADBC Examples](#adbc-examples) section below. ## Single-threaded Export[​](#single-threaded-export "Direct link to Single-threaded Export") Simple export without parallelization for smaller datasets. ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "FASTExportData" ` --trusted ` --query "SELECT top 1000 * FROM dbo.TEST_71_1M_12m" ` --directory "C:\temp" ` --fileoutput "TEST1000.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` ## Parallel Export - Random Method[​](#parallel-export---random-method "Direct link to Parallel Export - Random Method") Export using Random distribution based on modulo operation. * Windows Authentication * SQL Authentication ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "FASTExportData" ` --trusted ` --query "SELECT * FROM dbo.TEST_71_1M_12m" ` --directory "C:\temp" ` --fileoutput "TEST_71c_1Mr.csv" ` --decimalseparator "," ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "ID_ARTICLE" ` --paralleldegree 8 ` --merge "False" ` --runid "mssql_to_csv_parallel8_random" ``` ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "FASTExportData" ` --user "FastUser" ` --password "FastPassword" ` --query "SELECT * FROM dbo.TEST_71_1M_12m" ` --directory "C:\temp" ` --fileoutput "TEST_71c_1Mr.csv" ` --decimalseparator "," ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "ID_ARTICLE" ` --paralleldegree 8 ` --merge "False" ` --runid "mssql_to_csv_parallel8_random" ``` ## Parallel Export - RangeId Method[​](#parallel-export---rangeid-method "Direct link to Parallel Export - RangeId Method") Export using RangeId distribution for evenly distributed integer keys. **Using table name:** ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "tpch10_collation_bin2" ` --trusted ` --sourceschema "dbo" ` --sourcetable "orders" ` --directory "D:\temp" ` --fileoutput "mssql_orders.csv" ` --decimalseparator "," ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "RangeId" ` --distributekeycolumn "o_orderkey" ` --paralleldegree -2 ` --merge "False" ` --runid "mssql_to_csv_parallel-2_rangeid" ``` **Using query with filter:** ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "tpch10_collation_bin2" ` --trusted ` --query "select * from orders WHERE o_orderdate between '19950101' and '19951231'" ` --directory "D:\temp" ` --fileoutput "mssql_orders.csv" ` --decimalseparator "," ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "RangeId" ` --distributekeycolumn "o_orderkey" ` --paralleldegree -2 ` --merge "False" ` --runid "mssql_to_csv_parallel-2_rangeid_using_query" ``` ## Parallel Export - Ntile Method[​](#parallel-export---ntile-method "Direct link to Parallel Export - Ntile Method") Export using Ntile distribution for evenly distributed chunks. **Full table export:** ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "tpch10_collation_bin2" ` --trusted ` --sourceschema "dbo" ` --sourcetable "orders" ` --directory "D:\temp" ` --fileoutput "mssql_orders.csv" ` --decimalseparator "," ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Ntile" ` --distributekeycolumn "o_orderkey" ` --paralleldegree 12 ` --merge "False" ` --runid "mssql_to_csv_parallel12_Ntile" ``` **Filtered export with date column:** ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "tpch10_collation_bin2" ` --trusted ` --query "select * from orders WHERE o_orderdate between '19950101' and '19951231'" ` --directory "D:\temp" ` --fileoutput "mssql_orders.csv" ` --decimalseparator "," ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Ntile" ` --distributekeycolumn "o_orderdate" ` --paralleldegree 12 ` --merge "False" ` --runid "mssql_to_csv_parallel12_Ntile_using_query" ``` ## Parallel Export - DataDriven Method[​](#parallel-export---datadriven-method "Direct link to Parallel Export - DataDriven Method") Export using DataDriven distribution based on distinct values of a column. **Using partition function:** ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "tpch10_collation_bin2" ` --directory "D:\temp" ` --fileoutput "mssql_orders.csv" ` --trusted ` --sourceschema "dbo" ` --sourcetable "orders_part" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "DataDriven" ` --distributekeycolumn "`$partition.PF_DATE(o_orderdate)" ` --merge "False" ` --paralleldegree 10 ``` ## Export to Parquet[​](#export-to-parquet "Direct link to Export to Parquet") Export SQL Server data to Parquet format. **Single-threaded:** ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "faker" ` --trusted ` --sourceschema "dbo" ` --sourcetable "faker_s1000" ` --directory "D:\temp" ` --fileoutput "mssql_faker_s1000.parquet" ` --parallelmethod "None" ` --runid "mssql_to_parquet_NoParallel" ``` **Parallel with RangeId:** ``` .\FastBCP.exe ` --connectiontype "mssql" ` --trusted ` --server "localhost" ` --database "tpch10_collation_bin2" ` --directory "D:\temp" ` --fileoutput "mssql_orders.parquet" ` --parallelmethod "RangeId" ` --distributekeycolumn "o_orderkey" ` --paralleldegree 7 ` --sourceschema "dbo" ` --sourcetable "orders" ` --merge "False" ``` **Parallel with Ntile and query:** ``` .\FastBCP.exe ` --connectiontype "mssql" ` --trusted ` --server "localhost" ` --database "tpch10_collation_bin2" ` --directory "D:\temp" ` --fileoutput "mssql_orders_1995.parquet" ` --parallelmethod "Ntile" ` --distributekeycolumn "o_orderkey" ` --paralleldegree 7 ` --query "select * from dbo.orders where o_orderdate between '1995-01-01' and '1995-12-31'" ` --merge "False" ``` ## OLEDB Connection[​](#oledb-connection "Direct link to OLEDB Connection") Alternative connection method using OLEDB provider. **Single-threaded:** ``` $query="SELECT top 10000 * FROM FASTExportData.dbo.TEST_71_1M_12m" $target="localhost" .\FastBCP.exe ` --connectiontype "oledb" ` --provider "MSOLEDBSQL" ` --server $target ` --directory "C:\temp" ` --fileoutput "TEST.CSV" ` --paralleldegree 1 ` --trusted ` --query $query ` --parallelmethod "None" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ``` **Parallel Random with Windows Auth:** ``` .\FastBCP.exe ` --connectiontype "oledb" ` --provider "MSOLEDBSQL" ` --server $target ` --directory "C:\temp" ` --fileoutput "TEST.CSV" ` --paralleldegree 6 ` --trusted ` --query $query ` --parallelmethod "Random" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --distributekeycolumn "ID_ARTICLE" ` --merge "False" ``` **Parallel Random with SQL Auth:** ``` .\FastBCP.exe ` --connectiontype "oledb" ` --provider "MSOLEDBSQL" ` --server $target ` --directory "C:\temp" ` --fileoutput "TEST.CSV" ` --paralleldegree 6 ` --user "FastUser" ` --password "FastPassword" ` --query $query ` --parallelmethod "Random" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --distributekeycolumn "ID_ARTICLE" ` --merge "False" ``` **Parallel DataDriven:** ``` .\FastBCP.exe ` --connectiontype "oledb" ` --provider "MSOLEDBSQL" ` --server $target ` --directory "C:\temp" ` --fileoutput "TEST.CSV" ` --paralleldegree 6 ` --trusted ` --query $query ` --parallelmethod "DataDriven" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --distributekeycolumn "ID_DECOUPE_GEO" ` --merge "False" ``` ## ODBC Connection[​](#odbc-connection "Direct link to ODBC Connection") Using ODBC DSN for connection. **Single-threaded:** ``` .\FastBCP.exe ` --connectiontype "odbc" ` --dsn "DSN4FastBCP" ` --directory "C:\temp" ` --fileoutput "TEST.CSV" ` --paralleldegree 1 ` --trusted ` --query "SELECT * FROM [TEST_71_1M_12m]" ` --parallelmethod "None" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ``` **Parallel Random with Windows Auth:** ``` .\FastBCP.exe ` --connectiontype "odbc" ` --dsn "DSN4FastBCP" ` --directory "C:\temp" ` --fileoutput "TEST.CSV" ` --paralleldegree 6 ` --trusted ` --query "SELECT * FROM [TEST_71_1M_12m]" ` --parallelmethod "Random" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --distributekeycolumn "ID_ARTICLE" ` --merge "False" ``` **Parallel Random with SQL Auth:** ``` .\FastBCP.exe ` --connectiontype "odbc" ` --dsn "DSN4FastBCP" ` --directory "C:\temp" ` --fileoutput "TEST.CSV" ` --paralleldegree 6 ` --user "FastUser" ` --password "FastPassword" ` --query "SELECT * FROM [TEST_71_1M_12m]" ` --parallelmethod "Random" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --distributekeycolumn "ID_ARTICLE" ` --merge "False" ``` **Parallel DataDriven:** ``` .\FastBCP.exe ` --connectiontype "odbc" ` --dsn "DSN4FastBCP" ` --directory "C:\temp" ` --fileoutput "TEST.CSV" ` --paralleldegree 6 ` --trusted ` --query "SELECT * FROM [TEST_71_1M_12m]" ` --parallelmethod "DataDriven" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --distributekeycolumn "ID_GEO" ` --merge "False" ``` ## ADBC Examples[​](#adbc-examples "Direct link to ADBC Examples") The `adbc_mssql` connection type uses the Arpe.io ADBC FastDriver for ultra-fast, Arrow-native exports. **Output is Parquet-only** — see [Connection Parameters](/1.3/documentation/cli/connection_parameters.md#connection-type) for details. **Single-threaded export:** ``` ./FastBCP \ --connectiontype "adbc_mssql" \ --server "localhost,1433" \ --database "tpch" \ --user "migadmin" \ --password "FastPassword" \ --sourceschema "tpch10" \ --sourcetable "lineitem" \ --directory "./" \ --fileoutput "{sourcetable}.parquet" \ --method "None" ``` **Parallel export with RangeId and license file:** ``` .\FastBCP.exe ` --connectiontype "adbc_mssql" ` --server "localhost" ` --trusted ` --database "TPCH_SF100_NOBACKUP" ` --sourceschema "dbo" ` --sourcetable "lineitem_ci" ` --fileoutput "{sourcetable}.parquet" ` --directory "B:\export\{sourcetable}\" ` --parquetcompression "None" ` --parallelmethod "RangeId" ` --distributekeycolumn "l_orderkey" ` --degree 32 ` --runid "1.2.0" ` --licence "C:\Sources\FastBCP\FastBCP_AetP.lic" ``` tip Build your command with the [Wizard](/latest/wizard.md) --- # Configuration Examples Here are sample configuration files for different logging scenarios: ## FastBCP\_Settings.json : Sinks on Console + Files (Windows path style) + MSSQL[​](#fastbcp_settingsjson---sinks-on-console--files-windows-path-style--mssql "Direct link to FastBCP_Settings.json : Sinks on Console + Files (Windows path style) + MSSQL") For logs with Console + Files stored on Windows machine + MSSQL sinks: ``` { "ConnectionStrings": { "MS_FastBCPLogs": "Server=localhost;Database=FastBCPLogs;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\\FastBCP_.json", "retainedFileCountLimit": 10, "rollingInterval": "Day", "rollOnFileSizeLimit": true } }, { "Name": "MSSqlServer", "Args": { "connectionString": "MS_FastBCPLogs", "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": "FastBCP" } } } ``` ## FastBCP\_Settings\_Linux\_Console\_Files.json[​](#fastbcp_settings_linux_console_filesjson "Direct link to FastBCP_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/FastBCP_.json", "retainedFileCountLimit": 10, "rollingInterval": "Day", "rollOnFileSizeLimit": true } } ], "Enrich": [ "FromLogContext", "WithMachineName", "WithProcessId", "WithThreadId" ], "Properties": { "Application": "FastBCP" } } } ``` ## FastBCP\_Settings\_Map\_for\_Windows.json[​](#fastbcp_settings_map_for_windowsjson "Direct link to FastBCP_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}\\FastBCP-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": "FastBCP" } } } ``` ## FastBCP\_Settings\_Map\_for\_Linux\_and\_Container.json[​](#fastbcp_settings_map_for_linux_and_containerjson "Direct link to FastBCP_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}/FastBCP-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": "FastBCP" } } } ``` ## FastBCP\_Settings\_Log\_to\_PGSQL.json : Console + PostgreSQL log database[​](#fastbcp_settings_log_to_pgsqljson--console--postgresql-log-database "Direct link to FastBCP_Settings_Log_to_PGSQL.json : Console + PostgreSQL log database") ``` { "ConnectionStrings": { "PG_FastBCPLogs": "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_FastBCPLogs", "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": "FastBCP" } } } ``` ## FastBCP\_Settings\_OpenTelemetry.json[​](#fastbcp_settings_opentelemetryjson "Direct link to FastBCP_Settings_OpenTelemetry.json") For Console with trace correlation and OpenTelemetry log export (e.g., to [Jaeger](https://www.jaegertracing.io/)): ``` { "Serilog": { "MinimumLevel": { "Default": "Debug", "Override": { "Microsoft": "Warning", "System": "Warning" } }, "Properties": { "LogDirectory": "logs" }, "Enrich": [ "FromLogContext", "WithEnvironmentUserName", "WithProcessId", "WithThreadId", "WithMachineName", "fulltargetname" ], "WriteTo": [ { "Name": "Console", "Args": { "restrictedToMinimumLevel": "Information", "outputTemplate": "{Timestamp:yyyy-MM-ddTHH:mm:ss.fff zzz} -|- {Application} -|- {Level:u12} -|- {fulltargetname} -|- TraceId={TraceId} SpanId={SpanId} -|- {Message}{NewLine}{Exception}", "theme": "Serilog.Sinks.SystemConsole.Themes.SystemConsoleTheme::Literate, Serilog.Sinks.Console" } }, { "Name": "OpenTelemetry", "Args": { "Endpoint": "http://localhost:4317", "Protocol": "Grpc", "ResourceAttributes": { "service.name": "FastBCP", "deployment.environment": "local-test" } } } ] } } ``` Usage with the `--traceparent` parameter to correlate with an upstream caller: ``` ./FastBCP \ --connectiontype mssql \ --server localhost \ --database "tpch10" \ --trusted \ --query "SELECT * FROM dbo.orders" \ --directory "/data/temp" \ --fileoutput "orders.csv" \ --traceparent "00-abcdef1234567890abcdef1234567890-1234567890abcdef-01" \ --settingsfile "/config/FastBCP_Settings_OpenTelemetry.json" ``` **Result in Jaeger UI:** ![FastBCP OpenTelemetry result in Jaeger UI](/assets/images/FastBCP_OpenTelemetry_result_sample-729a1de4f4ccde92a0856f3f4e8b9468.jpg) --- # Log Database FastBCP 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 `FastBCP_settings.json` * You can specify a custom settings file using the `--settingsfile` parameter Information **Log table is created automatically if not exists but it is not indexed.** Up to you to choose you indexed column(s) you prefer to index. We Advice you to index event\_timestamp column and run\_id Information No internal purge of the log table, it is up to you to decide when and how filter the log table Complete configuration examples for both MSSQL and PostgreSQL are available in the [Configuration Examples](/1.3/documentation/logging/examples.md#fastbcp_settingsjson-for-windows) page. Information **In case the database is not reachable, FastBCP will fail and will refuse to continue.** If you want to continue without logging in the database, you can rename the `FastBCP_settings.json` file to something else (like `FastBCP_settings.json.save`) and FastBCP 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 ***FastBCP\_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}/FastBCP-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**: [FastBCP\_Settings\_Map\_for\_Windows.json](/1.3/documentation/logging/examples.md#fastbcp_settings_map_for_windowsjson) * **Linux/Container**: [FastBCP\_Settings\_Map\_for\_Linux\_and\_Container.json](/1.3/documentation/logging/examples.md#fastbcp_settings_map_for_linux_and_containerjson) --- # Log Levels FastBCP 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 | | **Critical** | Severe errors causing termination | Fatal application errors | ## Configuration[​](#configuration "Direct link to Configuration") You can also configure the log level in the `FastBCP_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\\FastBCP_.json", "rollingInterval": "Day" } } ] } } ``` --- # OpenTelemetry FastBCP supports [OpenTelemetry](https://opentelemetry.io/) for distributed tracing and log correlation. This allows you to correlate FastBCP operations with upstream callers (orchestrators, APIs, pipelines) and export structured logs to any OpenTelemetry-compatible backend such as [Jaeger](https://www.jaegertracing.io/), [Zipkin](https://zipkin.io/), or [Grafana Tempo](https://grafana.com/oss/tempo/). ## The `--traceparent` Parameter[​](#the---traceparent-parameter "Direct link to the---traceparent-parameter") The `--traceparent` parameter accepts a [W3C Trace Context](https://www.w3.org/TR/trace-context/) traceparent identifier. When provided, FastBCP uses this trace context to link its internal spans and logs to the calling system's trace, enabling end-to-end distributed tracing. **Syntax:** * Long form only: `--traceparent ""` **Format:** The traceparent value follows the W3C Trace Context specification: ``` {version}-{trace-id}-{parent-id}-{trace-flags} ``` | Field | Format | Description | | --------------- | ------------- | --------------------------------------------- | | **version** | 2 hex digits | Version of the trace context (currently `00`) | | **trace-id** | 32 hex digits | Globally unique trace identifier | | **parent-id** | 16 hex digits | Identifier of the calling span | | **trace-flags** | 2 hex digits | Trace flags (e.g., `01` for sampled) | **Example:** * Windows * Linux ``` .\FastBCP.exe ` ... --traceparent "00-abcdef1234567890abcdef1234567890-1234567890abcdef-01" ` ... ``` ``` ./FastBCP \ ... --traceparent "00-abcdef1234567890abcdef1234567890-1234567890abcdef-01" \ ... ``` Tips Pass the traceparent from your orchestrator (Airflow, Kestra, CI/CD pipeline, or any OpenTelemetry-instrumented caller) so that FastBCP operations appear as child spans in your distributed traces. ## Configuring the OpenTelemetry Endpoint[​](#configuring-the-opentelemetry-endpoint "Direct link to Configuring the OpenTelemetry Endpoint") FastBCP uses the Serilog OpenTelemetry sink to export logs. You can configure the endpoint using either **environment variables** or a **`FastBCP_Settings.json`** file. ### Using Environment Variables[​](#using-environment-variables "Direct link to Using Environment Variables") Set the `OTEL_EXPORTER_OTLP_ENDPOINT` environment variable to point to your OpenTelemetry collector: * Windows * Linux ``` $env:OTEL_EXPORTER_OTLP_ENDPOINT = "http://localhost:4317" ``` ``` export OTEL_EXPORTER_OTLP_ENDPOINT="http://localhost:4317" ``` ### Using `FastBCP_Settings.json`[​](#using-fastbcp_settingsjson "Direct link to using-fastbcp_settingsjson") Add the OpenTelemetry sink to the `WriteTo` section of your `FastBCP_Settings.json` file. This gives you full control over the protocol, endpoint, and resource attributes. ``` { "Serilog": { "MinimumLevel": { "Default": "Debug", "Override": { "Microsoft": "Warning", "System": "Warning" } }, "Properties": { "LogDirectory": "logs" }, "Enrich": [ "FromLogContext", "WithEnvironmentUserName", "WithProcessId", "WithThreadId", "WithMachineName", "fulltargetname" ], "WriteTo": [ { "Name": "Console", "Args": { "restrictedToMinimumLevel": "Information", "outputTemplate": "{Timestamp:yyyy-MM-ddTHH:mm:ss.fff zzz} -|- {Application} -|- {Level:u12} -|- {fulltargetname} -|- TraceId={TraceId} SpanId={SpanId} -|- {Message}{NewLine}{Exception}", "theme": "Serilog.Sinks.SystemConsole.Themes.SystemConsoleTheme::Literate, Serilog.Sinks.Console" } }, { "Name": "OpenTelemetry", "Args": { "Endpoint": "http://localhost:4317", "Protocol": "Grpc", "ResourceAttributes": { "service.name": "FastBCP", "deployment.environment": "local-test" } } } ] } } ``` **Key settings in the OpenTelemetry sink:** | Setting | Description | | ---------------------- | ----------------------------------------------------------------------------- | | **Endpoint** | URL of your OpenTelemetry collector (default: `http://localhost:4317`) | | **Protocol** | Transport protocol: `Grpc` (default) or `HttpProtobuf` | | **ResourceAttributes** | Key-value pairs attached to every log entry (e.g., service name, environment) | Information The `TraceId` and `SpanId` fields in the console output template allow you to see trace correlation directly in the console logs, even without an OpenTelemetry backend. note When both an environment variable and a `FastBCP_Settings.json` configuration are present, the settings file takes precedence for the OpenTelemetry sink configuration. --- # Logging Overview ## Parameter Logs targets using FastBCP\_settings.json[​](#parameter-logs-targets-using-fastbcp_settingsjson "Direct link to Parameter Logs targets using FastBCP_settings.json") In FastBCP can log informations in 3 modes : * **[Console](/1.3/documentation/logging/logs-level.md)** * **[Database (MSSQL and PostgreSQL Only)](/1.3/documentation/logging/log-database.md)** * **[File (or Map)](/1.3/documentation/logging/log-files-names-mapping-using-variables.md)** FastBCP also supports **[OpenTelemetry](/1.3/documentation/logging/OpenTelemetry.md)** for distributed tracing and log export to any OpenTelemetry-compatible backend. Tips You can use several targets (sinks) at the same time. You can adapt what and where you want to log using the `FastBCP_settings.json` file. By default if no custom path is provided, FastBCP looks for the settings file in : * the current directory (the working directory) * the same directory where the FastBCP executable is located (the executable directory). If this file is not present, FastBCP will use the console log only. You can specify a custom path to the settings file using the `-f` or `--settingsfile` parameter. * Windows * Linux ``` .\FastBCP.exe ` --connectiontype mssql ` --server localhost ` --database "tpch10_collation_bin2" ` --trusted ` --query "SELECT * FROM dbo.orders" ` --directory "D:\temp" ` --fileoutput "mssql_orders.csv" ` --parallelmethod Ntile ` --distributekeycolumn "o_orderkey" ` --paralleldegree 7 ` --settingsfile "D:\logs\config\FastBCP_settings.json" ``` ``` ./FastBCP \ --connectiontype mssql \ --server localhost \ --database "tpch10_collation_bin2" \ --trusted \ --query "SELECT * FROM dbo.orders" \ --directory "/data/temp" \ --fileoutput "mssql_orders.csv" \ --parallelmethod Ntile \ --distributekeycolumn "o_orderkey" \ --paralleldegree 7 \ --settingsfile "/etc/fastbcp/FastBCP_settings.json" ``` Some settings files samples can be found in the [Configuration Examples](/1.3/documentation/logging/examples.md) page. --- # Installation ## Instructions[​](#instructions "Direct link to Instructions") * Windows * Linux * Docker/MacOS To start using FastBCP, first **[request a trial](https://arpe.io/get-trial?product=FastBCP)** to download the latest version. Once downloaded, unzip FastBCP to a directory of your choice. ``` Expand-Archive -Path .\FastBCP.zip -DestinationPath .\FastBCP ``` You can verify the installation by checking the version: ``` .\FastBCP.exe --version ``` To start using FastBCP, first **[request a trial](https://arpe.io/get-trial?product=FastBCP)** to download the latest version. Once downloaded, unzip FastBCP to a directory of your choice. ``` unzip FastBCP.zip -d FastBCP ``` On **Linux**, you need to give execution rights to the FastBCP binary: ``` chmod +x FastBCP ```
You can verify the installation by checking the version: ``` ./FastBCP --version ``` FastBCP is available as a Docker image on **[Docker Hub](https://hub.docker.com/repository/docker/arpeio/fastbcp/general)**. Pull the latest version: ``` docker pull arpeio/fastbcp ``` Or pull a specific version: ``` docker pull arpeio/fastbcp:v0.0.0 ``` You can verify the installation by checking the version: ``` docker run --rm arpeio/fastbcp:latest --version ```
**You are now ready to run FastBCP.** License Information After the trial period you will need a valid license. By default, FastBCP will try to find a `FastBCP.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 FastBCP : | 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 in order to use it with ODBC or OLEDB connection type. --- # Apache Airflow [Apache Airflow](https://airflow.apache.org/) is a powerful open-source platform for developing, scheduling, and monitoring batch-oriented workflows. FastBCP 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") FastBCP provides an official Docker image available on Docker Hub: **Image:** `arpeio/fastbcp:latest`
**Repository:** ## Prerequisites[​](#prerequisites "Direct link to Prerequisites") ### Install Docker Provider[​](#install-docker-provider "Direct link to Install Docker Provider") To use FastBCP 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. FastBCP integration requires connections for your source database and cloud storage. ### 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:** `host.docker.internal` (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) AWS Connection (for S3 Export)[​](#b-aws-connection-for-s3-export "Direct link to B) AWS Connection (for S3 Export)") Create an AWS connection to pass cloud credentials to the container: 1. Navigate to **Admin** → **Connections** in the Airflow UI 2. Click **+** to create a new connection 3. In the **Connection Type** dropdown, select **Amazon Web Services** 4. Configure the connection: **Connection Settings:** * **Connection Id:** `aws_fastbcp` (or your preferred name) * **Connection Type:** `Amazon Web Services` (select this from the dropdown) * **AWS Access Key ID:** Your AWS access key (in the Login field) * **AWS Secret Access Key:** Your AWS secret key (in the Password field) * **Extra:** `{"region_name":"eu-west-1"}` (or your preferred region) tip Airflow AWS providers commonly use `region_name` in Extra JSON. Alternatively, you can use `{"region":"eu-west-1"}` or `{"aws_default_region":"eu-west-1"}`. ## 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 FastBCP 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., `fastbcp_orders_mssql_to_s3.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 _mssql_parts(conn_id: str): """ Extract MSSQL connection details from Airflow connection. Expected Airflow connection (using ODBC): - Conn Id: mssql_tpch10 (conn_type: odbc) - Host: host.docker.internal - Port: 11433 - Login/Password: FastLogin / FastPassword - Extra JSON: {"database":"tpch10"} """ c = BaseHook.get_connection(conn_id) host = c.host port = c.port user = c.login pwd = c.password # For ODBC MSSQL, the database is typically stored in Extra JSON # (because the UI may not expose a dedicated "Database" field). db = c.extra_dejson.get("database") or c.schema if not db: raise ValueError( f"Connection '{conn_id}': missing database. Put it in Extra JSON " f'{{"database":"tpch10"}} (recommended for ODBC).' ) return host, port, user, pwd, db def _aws_env(conn_id: str): """ Extract AWS credentials from Airflow connection and map to container env vars. Expected Airflow AWS connection: - Conn Id: aws_fastbcp - Conn Type: Amazon Web Services - Login -> AWS_ACCESS_KEY_ID - Password -> AWS_SECRET_ACCESS_KEY - Extra -> {"region_name":"eu-west-1"} (or your region) Returns a dictionary with: - AWS_ACCESS_KEY_ID - AWS_SECRET_ACCESS_KEY - AWS_DEFAULT_REGION """ c = BaseHook.get_connection(conn_id) # Keys can be in login/password or in Extra JSON access_key = c.login or c.extra_dejson.get("aws_access_key_id") secret_key = c.password or c.extra_dejson.get("aws_secret_access_key") # Airflow AWS providers commonly use "region_name" in Extra JSON region = ( c.extra_dejson.get("region_name") or c.extra_dejson.get("region") or c.extra_dejson.get("aws_default_region") ) missing = [ k for k, v in { "AWS_ACCESS_KEY_ID": access_key, "AWS_SECRET_ACCESS_KEY": secret_key, "AWS_DEFAULT_REGION": region, }.items() if not v ] if missing: raise ValueError( f"Connection '{conn_id}': missing AWS fields: {missing}. " f"Set login/password and add Extra.region_name (or region)." ) return { "AWS_ACCESS_KEY_ID": access_key, "AWS_SECRET_ACCESS_KEY": secret_key, "AWS_DEFAULT_REGION": region, } with DAG( dag_id="fastbcp_export_orders_parquet_to_s3", start_date=datetime(2025, 1, 1), schedule=None, catchup=False, tags=["fastbcp", "mssql", "s3", "docker"], ) as dag: mssql_host, mssql_port, mssql_user, mssql_pwd, mssql_db = _mssql_parts("mssql_tpch10") aws_env = _aws_env("aws_fastbcp") DockerOperator( task_id="export_orders_parquet_to_s3", image="arpeio/fastbcp: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, environment=aws_env, command=[ "--connectiontype", "mssql", "--server", f"{mssql_host},{mssql_port}", "--user", mssql_user, "--password", mssql_pwd, "--database", mssql_db, "--sourceschema", "dbo", "--sourcetable", "orders", "--fileoutput", "orders.parquet", "--directory", "s3://fastbcp-export/orders/parquet", "--parallelmethod", "Ntile", "--paralleldegree", "12", "--distributekeycolumn", "o_orderkey", "--merge", "false", "--nobanner", ], network_mode="bridge", ) ``` **Key Parameters:** * `image`: Specifies the FastBCP Docker image * `docker_url`: Docker daemon endpoint * `environment`: Dictionary of environment variables (AWS credentials in this case) * `command`: List of FastBCP CLI arguments * `auto_remove`: Automatically remove the container after successful execution ### Helper Functions Explained[​](#helper-functions-explained "Direct link to Helper Functions Explained") The DAG includes two utility functions: #### `_mssql_parts(conn_id)`[​](#_mssql_partsconn_id "Direct link to _mssql_partsconn_id") Extracts connection details from an Airflow ODBC connection. This function: * Retrieves host, port, username, and password * Extracts the database name from the Extra JSON field * Returns all components needed to build the FastBCP connection string #### `_aws_env(conn_id)`[​](#_aws_envconn_id "Direct link to _aws_envconn_id") Extracts AWS credentials from an Airflow AWS connection and maps them to the environment variables expected by FastBCP: * `AWS_ACCESS_KEY_ID` * `AWS_SECRET_ACCESS_KEY` * `AWS_DEFAULT_REGION` This function supports multiple Extra JSON formats for flexibility. ## Logging[​](#logging "Direct link to Logging") All FastBCP 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., `fastbcp_export_orders_parquet_to_s3`) 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: * FastBCP 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 16:15:37] INFO - Settings file not found in the working directory nor in the executable directory [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.882 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- The "FastBCP_Settings.json" file does not exist. Using default settings. Console Only with loglevel=Information [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.892 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- FastBCP Trial – will expires on "2026‑03‑27" (24 day(s) left). [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.892 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Starting [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- FastBCP Version : "0.29.2.0" Architecture : "X64" - Framework : ".NET 8.0.24" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Internal Trace ID : "5ccea857-1538-4a28-8b1c-cfe5c51fbd43" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Internal Run ID : "5ccea857-1538-4a28-8b1c-cfe5c51fbd43" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- OS : "Debian GNU/Linux 13 (trixie)" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Connection Type : "mssql" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Source SqlInstance : "sql22,1433" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Source Database : "tpch" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Source Schema : "tpch10" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Source Table : "orders" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Trusted Connection : False [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- User : "migadmin" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Output File : "orders.parquet" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Output Directory : /data/parquet [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Degree : 12 [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Distribute Method : "Ntile" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Distribute Column : "o_orderkey" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Decimal Separator : "," [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Delimiter : "|" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Use quotes : False [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Date format: "yyyy-MM-dd" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Encoding : "UTF-8" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- No Header : False [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Timestamped : False [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Boolean Format : "automatic" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Cloud Profile : "" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Application Intent : "ReadOnly" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.906 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- file extension is ".parquet" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.909 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Encoding used : Unicode (UTF-8) - 65001 - utf-8 [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.965 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- 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=FastBCP;Application Intent=ReadOnly" [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.086 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- 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 16:15:38] INFO - 2026-03-02T15:15:38.110 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Get DataTypes with header end : Elapsed=6 ms [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Data Segments Computation Completed in 260 ms [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Distribute Column Type : "Int32" [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 0 : 1 : 1 - 5000001 or "o_orderkey" is null [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 1 : 2 : 5000002 - 10000002 [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 2 : 3 : 10000003 - 15000003 [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 3 : 4 : 15000004 - 20000004 [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 4 : 5 : 20000005 - 25000005 [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 5 : 6 : 25000006 - 30000006 [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 6 : 7 : 30000007 - 35000007 [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 7 : 8 : 35000032 - 40000032 [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 8 : 9 : 40000033 - 45000033 [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 9 : 10 : 45000034 - 50000034 [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 10 : 11 : 50000035 - 55000035 [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 11 : 12 : 55000036 - 60000000 [2026-03-02 16:15:46] INFO - 2026-03-02T15:15:46.611 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 002 for o_orderkey between 10000003 and 15000003 into /data/parquet/orders_chunk_002.parquet : 1250001 rows x 9 columns in 8234ms [2026-03-02 16:15:46] INFO - 2026-03-02T15:15:46.611 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 011 for o_orderkey between 55000036 and 60000000 into /data/parquet/orders_chunk_011.parquet : 1249989 rows x 9 columns in 8234ms [2026-03-02 16:15:46] INFO - 2026-03-02T15:15:46.790 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 003 for o_orderkey between 15000004 and 20000004 into /data/parquet/orders_chunk_003.parquet : 1250001 rows x 9 columns in 8413ms [2026-03-02 16:15:46] INFO - 2026-03-02T15:15:46.797 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 005 for o_orderkey between 25000006 and 30000006 into /data/parquet/orders_chunk_005.parquet : 1250001 rows x 9 columns in 8420ms [2026-03-02 16:15:46] INFO - 2026-03-02T15:15:46.936 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 008 for o_orderkey between 40000033 and 45000033 into /data/parquet/orders_chunk_008.parquet : 1250001 rows x 9 columns in 8559ms [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.139 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 010 for o_orderkey between 50000035 and 55000035 into /data/parquet/orders_chunk_010.parquet : 1250001 rows x 9 columns in 8763ms [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.154 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 000 for o_orderkey between 1 and 5000001 into /data/parquet/orders_chunk_000.parquet : 1250001 rows x 9 columns in 8777ms [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.247 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 009 for o_orderkey between 45000034 and 50000034 into /data/parquet/orders_chunk_009.parquet : 1250001 rows x 9 columns in 8870ms [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.308 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 006 for o_orderkey between 30000007 and 35000007 into /data/parquet/orders_chunk_006.parquet : 1250001 rows x 9 columns in 8931ms [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.309 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 001 for o_orderkey between 5000002 and 10000002 into /data/parquet/orders_chunk_001.parquet : 1250001 rows x 9 columns in 8932ms [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.363 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 007 for o_orderkey between 35000032 and 40000032 into /data/parquet/orders_chunk_007.parquet : 1250001 rows x 9 columns in 8986ms [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.366 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 004 for o_orderkey between 20000005 and 25000005 into /data/parquet/orders_chunk_004.parquet : 1250001 rows x 9 columns in 8989ms [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- files generation end : Elapsed=9257 ms - maxdop=12 [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total data rows : 15000000 [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total data columns : 9 [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total cells : 135000000 [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Throughput rows : 1568531 rows/s [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Throughput cells : 14116787 cells/s [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total time : Elapsed=9563 ms [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total data rows : 15000000 [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total data columns : 9 [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total cells : 135000000 [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Final Throughput rows : 1568482 rows/s [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Final Throughput cells : 14116346 cells/s [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Completed Load [2026-03-02 16:15:47] INFO - Task instance in success state [2026-03-02 16:15:47] INFO - Previous state of the Task instance: TaskInstanceState.RUNNING [2026-03-02 16:15:47] INFO - Task operator: ``` --- # Docker Minimal, production-ready container image to run FastBCP, a high-performance bulk copy 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/FastBCP` * **Repository**: [FastBCP-Image on GitHub](https://github.com/arpe-io/FastBCP-Image) * **DockerHub**: [arpeio/fastbcp](https://hub.docker.com/repository/docker/arpeio/fastbcp/general) * Published automatically via GitHub Actions for each new release and weekly security updates ## Prerequisites[​](#prerequisites "Direct link to Prerequisites") * Docker 24+ (or Podman) * FastBCP Linux x64 ≥ 0.28.0 binary (for build only) * Optional: `FastBCP_Settings.json` to mount/copy into `/config` for custom logging settings ## Using the Prebuilt Image from DockerHub[​](#using-the-prebuilt-image-from-dockerhub "Direct link to Using the Prebuilt Image from DockerHub") You can use a prebuilt image from DockerHub that already includes the FastBCP binary. You must provide your own license at runtime. ### Available Tags[​](#available-tags "Direct link to Available Tags") * **Version-specific tags** are aligned with FastBCP releases (e.g., `v0.28.3`) * **`latest` tag** always points to the most recent FastBCP version ### Automatic Updates[​](#automatic-updates "Direct link to Automatic Updates") * **New releases**: Images are automatically built when new FastBCP versions are released * **Security updates**: The latest version of each minor branch (e.g., latest v0.27.x, v0.28.x, v0.29.x) is automatically rebuilt weekly (every Monday) with the latest base image and security patches * This ensures that all actively used versions remain secure without breaking compatibility * Example: If you use `v0.28.8` (latest of 0.28.x branch), it gets security updates even after `v0.29.0` is released ### Pull the Image[​](#pull-the-image "Direct link to Pull the Image") ``` # Latest version docker pull arpeio/fastbcp:latest # Specific version docker pull arpeio/fastbcp:v0.28.3 ``` ### Basic Commands[​](#basic-commands "Direct link to Basic Commands") ``` # Get command line help docker run --rm arpeio/fastbcp:latest # Check version docker run --rm arpeio/fastbcp:latest --version ``` ### License Requirement[​](#license-requirement "Direct link to License Requirement") Since version 0.28.0, pass the license content directly via `--license "…"`. ``` export licenseContent=$(cat ./FastBCP.lic) # Use $licenseContent in your docker run commands docker run --rm arpeio/fastbcp: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. ## Usage Examples[​](#usage-examples "Direct link to Usage Examples") The Docker image uses the FastBCP binary as its entrypoint, so you can run it directly with parameters as defined in the [FastBCP documentation](/latest/.md). ### Example 1: SQL Server → Parquet on S3[​](#example-1-sql-server--parquet-on-s3 "Direct link to Example 1: SQL Server → Parquet on S3") ``` export licenseContent=$(cat ./FastBCP.lic) docker run --rm \ -e AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID} \ -e AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY} \ -e AWS_REGION=${AWS_REGION} \ arpeio/fastbcp:latest \ --connectiontype "mssql" \ --server "host.docker.internal,1433" \ --user "FastUser" \ --password "FastPassword" \ --database "tpch_test" \ --query "SELECT * FROM dbo.orders WHERE year(o_orderdate)=1998" \ --fileoutput "orders.parquet" \ --directory "s3://arpeioftoutput/dockertest/" \ --paralleldegree 12 \ --parallelmethod "Ntile" \ --distributekeycolumn "o_orderkey" \ --merge false \ --license "$licenseContent" ``` ### Example 2: SQL Server → CSV with Custom Logging[​](#example-2-sql-server--csv-with-custom-logging "Direct link to Example 2: SQL Server → CSV with Custom Logging") ``` export licenseContent=$(cat ./FastBCP.lic) docker run --rm \ -v fastbcp-config:/config \ -v fastbcp-data:/data \ -v fastbcp-logs:/logs \ arpeio/fastbcp:latest \ --settingsfile "/config/FastBCP_Settings_Logs_To_Files.json" \ --connectiontype "mssql" \ --server "host.docker.internal,1433" \ --user "FastUser" \ --password "FastPassword" \ --database "tpch_test" \ --query "SELECT * FROM dbo.orders WHERE year(o_orderdate)=1998" \ --fileoutput "orders.csv" \ --directory "/data/orders/csv" \ --delimiter "|" \ --decimalseparator "." \ --dateformat "yyyy-MM-dd HH:mm:ss" \ --paralleldegree 12 \ --parallelmethod "Ntile" \ --distributekeycolumn "o_orderkey" \ --merge false \ --license "$licenseContent" ``` ### Example 3: PostgreSQL → Parquet on Azure Data Lake Storage (ADLS)[​](#example-3-postgresql--parquet-on-azure-data-lake-storage-adls "Direct link to Example 3: PostgreSQL → Parquet on Azure Data Lake Storage (ADLS)") ``` export licenseContent=$(cat ./FastBCP.lic) export adlscontainer="arpeioadlseu" docker run --rm \ -e AZURE_CLIENT_ID=${AZURE_CLIENT_ID} \ -e AZURE_TENANT_ID=${AZURE_TENANT_ID} \ -e AZURE_CLIENT_SECRET=${AZURE_CLIENT_SECRET} \ arpeio/fastbcp:latest \ --connectiontype "pgcopy" \ --server "host.docker.internal:15432" \ --user "FastUser" \ --password "FastPassword" \ --database "tpch" \ --sourceschema "tpch_10" \ --sourcetable "orders" \ --query "SELECT * FROM tpch_10.orders WHERE o_orderdate >= '1998-01-01' AND o_orderdate < '1999-01-01'" \ --fileoutput "orders.parquet" \ --directory "abfss://${adlscontainer}.dfs.core.windows.net/fastbcpoutput/testdfs/orders" \ --paralleldegree -2 \ --parallelmethod "Ctid" \ --license "$licenseContent" ``` ### Example 4: Oracle → Parquet on Google Cloud Storage (GCS)[​](#example-4-oracle--parquet-on-google-cloud-storage-gcs "Direct link to Example 4: Oracle → Parquet on Google Cloud Storage (GCS)") ``` export licenseContent=$(cat ./FastBCP.lic) export gcsbucket="arpeio-gcs-bucket" export GOOGLE_APPLICATION_CREDENTIALS_JSON=$(cat ./gcp-credentials.json) docker run --rm \ -e GOOGLE_APPLICATION_CREDENTIALS="${GOOGLE_APPLICATION_CREDENTIALS_JSON}" \ arpeio/fastbcp:latest \ --connectiontype "oraodp" \ --server "host.docker.internal:1521/FREEPDB1" \ --user "TPCH_IN" \ --password "TPCH_IN" \ --database "FREEPDB1" \ --sourceschema "TPCH_IN" \ --sourcetable "ORDERS" \ --fileoutput "orders.parquet" \ --directory "gs://${gcsbucket}/fastbcpoutput/testgs/orders" \ --parallelmethod "Rowid" \ --paralleldegree -2 \ --license "$licenseContent" ``` ## Volumes[​](#volumes "Direct link to Volumes") The Docker image declares several volumes to organize data and configuration: ``` VOLUME ["/config", "/data", "/work", "/logs"] ``` ### Volume Configuration and Access Modes[​](#volume-configuration-and-access-modes "Direct link to Volume Configuration and Access Modes") | **Volume** | **Purpose** | **Access Mode** | **Notes** | | ---------- | ------------------------------------------------------------------- | --------------------- | ----------------------------------------------- | | `/config` | Contains user-provided configuration files (e.g., Serilog settings) | Read-only / Read-many | Shared across multiple containers; not modified | | `/data` | Input/output data directory | 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 FastBCP Logging[​](#configuring-fastbcp-logging "Direct link to Configuring FastBCP Logging") info Available starting from version v0.28.3 FastBCP supports custom logging configuration through an external Serilog settings file in JSON format. This allows you to control how and where logs are written — to the console, to files, or dynamically per run. You can download an example logging settings file directly from GitHub: [FastBCP\_Settings\_Logs\_To\_Files.json](https://raw.githubusercontent.com/aetperf/FastBCP-Image/main/FastBCP_Settings_Logs_To_Files.json) Custom settings files must be mounted into the container under the `/config` directory. ### 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") The following configuration is recommended for most production or Airflow environments. It writes: * Logs to the console for real-time visibility * Run summary logs to `/airflow/xcom/return.json` for Airflow integration * Per-run logs under `/logs`, automatically named with `{LogTimestamp}` and `{TraceId}` ``` { "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": "FastBCP" } } } ``` Important Notes * If a target directory (such as `/logs` or `/airflow/xcom`) does not exist, FastBCP 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") You can use the following placeholders to dynamically generate log file names or directories: | **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") Your Serilog configuration file (for example, `FastBCP_Settings_Logs_To_Files.json`) must be placed in `/config`, either by mounting a local directory or by using a Docker named volume. Example with named volumes: ``` # First, copy your config file to a volume location cp ~/FastBCP_Settings_Logs_To_Files.json /volumes/fastbcp-config/ # Then run FastBCP with mounted volumes docker run --rm \ -v fastbcp-config:/config \ -v fastbcp-data:/data \ -v fastbcp-logs:/logs \ arpeio/fastbcp:latest \ --settingsfile "/config/FastBCP_Settings_Logs_To_Files.json" \ --connectiontype "mssql" \ --server "host.docker.internal,1433" \ --user "FastUser" \ --password "FastPassword" \ --database "tpch_test" \ --query "SELECT * FROM dbo.orders" \ --fileoutput "orders.csv" \ --directory "/data" \ --paralleldegree 12 \ --parallelmethod "Ntile" \ --distributekeycolumn "o_orderkey" \ --merge false \ --license "$licenseContent" ``` If the `--settingsfile` argument is not provided, FastBCP will use its built-in default logging configuration. --- # Kestra [Kestra](https://kestra.io/) is a powerful open-source orchestration platform that can be used to automate and schedule FastBCP data export workflows. FastBCP can be seamlessly integrated into Kestra flows using its Docker image. ## Docker Image[​](#docker-image "Direct link to Docker Image") FastBCP provides an official Docker image available on Docker Hub: **Image:** `arpeio/fastbcp:latest`
**Repository:** ## Integration with Docker Run Plugin[​](#integration-with-docker-run-plugin "Direct link to Integration with Docker Run Plugin") The [`io.kestra.plugin.docker.Run`](https://kestra.io/plugins/plugin-docker/io.kestra.plugin.docker.run) plugin provides a direct way to execute FastBCP commands in a Docker container. This is the recommended method for integrating FastBCP with Kestra. ### Basic Example[​](#basic-example "Direct link to Basic Example") ``` id: fastbcp_export_orders namespace: arpe.io tasks: - id: export_orders_parquet type: io.kestra.plugin.docker.Run containerImage: arpeio/fastbcp:latest host: "tcp://host.docker.internal:2375" commands: - --connectiontype - mssql - --server - "host.docker.internal,11433" - --user - FastLogin - --password - FastPassword - --database - tpch10 - --sourceschema - dbo - --sourcetable - orders - --fileoutput - orders.parquet - --directory - /data/export - --parallelmethod - Ntile - --paralleldegree - "12" - --distributekeycolumn - o_orderkey - --nobanner ``` **Key Parameters:** * `containerImage`: Specifies the FastBCP Docker image * `host`: Docker daemon endpoint (required for Docker Run plugin) * `commands`: Array of FastBCP CLI arguments ## Environment Variables for Cloud Storage[​](#environment-variables-for-cloud-storage "Direct link to Environment Variables for Cloud Storage") When exporting data to cloud storage (AWS S3, Azure Blob, Google Cloud Storage), you can pass cloud credentials using environment variables (see [Cloud Connectivity](/1.3/documentation/cloud-connectivity/overview.md) for more details). ### Example with AWS S3[​](#example-with-aws-s3 "Direct link to Example with AWS S3") ``` id: fastbcp_export_to_s3 namespace: arpe.io tasks: - id: export_orders_to_s3 type: io.kestra.plugin.docker.Run containerImage: arpeio/fastbcp:latest host: "tcp://host.docker.internal:2375" env: AWS_ACCESS_KEY_ID: "AKIAIOSFODNN7EXAMPLE" AWS_SECRET_ACCESS_KEY: "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY" AWS_DEFAULT_REGION: "us-east-1" commands: - --connectiontype - mssql - --server - "host.docker.internal,11433" - --user - FastLogin - --password - FastPassword - --database - tpch10 - --sourceschema - dbo - --sourcetable - orders - --fileoutput - orders.parquet - --directory - s3://my-bucket/exports/orders - --parallelmethod - Ntile - --paralleldegree - "12" - --distributekeycolumn - o_orderkey - --merge - "false" - --nobanner ``` ## 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, connection strings, and cloud credentials, 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: * `FASTBCP_MSSQL_USER` * `FASTBCP_MSSQL_PASSWORD` * `FASTBCP_AWS_ACCESS_KEY_ID` * `FASTBCP_AWS_SECRET_ACCESS_KEY` * `FASTBCP_AWS_DEFAULT_REGION` ### Example with Secrets[​](#example-with-secrets "Direct link to Example with Secrets") ``` id: fastbcp_export_orders_s3_secret namespace: arpe.io tasks: - id: export_orders_parquet_to_s3 type: io.kestra.plugin.docker.Run containerImage: arpeio/fastbcp:latest host: "tcp://host.docker.internal:2375" env: AWS_ACCESS_KEY_ID: "{{ secret('FASTBCP_AWS_ACCESS_KEY_ID') }}" AWS_SECRET_ACCESS_KEY: "{{ secret('FASTBCP_AWS_SECRET_ACCESS_KEY') }}" AWS_DEFAULT_REGION: "{{ secret('FASTBCP_AWS_DEFAULT_REGION') }}" commands: - --connectiontype - mssql - --server - "host.docker.internal,11433" - --user - "{{ secret('FASTBCP_MSSQL_USER') }}" - --password - "{{ secret('FASTBCP_MSSQL_PASSWORD') }}" - --database - tpch10 - --sourceschema - dbo - --sourcetable - orders - --fileoutput - orders.parquet - --directory - s3://fastbcp-export/orders/parquet - --parallelmethod - Ntile - --paralleldegree - "12" - --distributekeycolumn - o_orderkey - --merge - "false" - --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 FastBCP 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 export process, including configuration parameters, connection details, data export progress, and performance metrics. ### Example Log Output[​](#example-log-output "Direct link to Example Log Output") ``` 2026-03-02T15:15:37.882 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- The "FastBCP_Settings.json" file does not exist. Using default settings. Console Only with loglevel=Information 2026-03-02 16:15:37.8922026-03-02T15:15:37.892 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- FastBCP Trial – will expires on "2026‑03‑27" (24 day(s) left). 2026-03-02 16:15:37.8922026-03-02T15:15:37.892 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Starting 2026-03-02 16:15:37.8932026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- FastBCP Version : "0.29.2.0" Architecture : "X64" - Framework : ".NET 8.0.24" 2026-03-02 16:15:37.8932026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Internal Trace ID : "5ccea857-1538-4a28-8b1c-cfe5c51fbd43" 2026-03-02 16:15:37.8932026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Internal Run ID : "5ccea857-1538-4a28-8b1c-cfe5c51fbd43" 2026-03-02 16:15:37.8932026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- OS : "Debian GNU/Linux 13 (trixie)" 2026-03-02 16:15:37.8932026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Connection Type : "mssql" 2026-03-02 16:15:37.8932026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Source SqlInstance : "sql22,1433" 2026-03-02 16:15:37.8932026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Source Database : "tpch" 2026-03-02 16:15:37.8932026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Source Schema : "tpch10" 2026-03-02 16:15:37.8932026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Source Table : "orders" 2026-03-02 16:15:37.8932026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Trusted Connection : False 2026-03-02 16:15:37.8932026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- User : "migadmin" 2026-03-02 16:15:37.8932026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Output File : "orders.parquet" 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Output Directory : /data/parquet 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Degree : 12 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Distribute Method : "Ntile" 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Distribute Column : "o_orderkey" 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Decimal Separator : "," 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Delimiter : "|" 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Use quotes : False 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Date format: "yyyy-MM-dd" 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Encoding : "UTF-8" 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- No Header : False 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Timestamped : False 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Boolean Format : "automatic" 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Cloud Profile : "" 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Application Intent : "ReadOnly" 2026-03-02 16:15:37.9062026-03-02T15:15:37.906 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- file extension is ".parquet" 2026-03-02 16:15:37.9092026-03-02T15:15:37.909 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Encoding used : Unicode (UTF-8) - 65001 - utf-8 2026-03-02 16:15:37.9652026-03-02T15:15:37.965 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- 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=FastBCP;Application Intent=ReadOnly" 2026-03-02 16:15:38.0862026-03-02T15:15:38.086 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- 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 16:15:38.1102026-03-02T15:15:38.110 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Get DataTypes with header end : Elapsed=6 ms 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Data Segments Computation Completed in 260 ms 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Distribute Column Type : "Int32" 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 0 : 1 : 1 - 5000001 or "o_orderkey" is null 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 1 : 2 : 5000002 - 10000002 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 2 : 3 : 10000003 - 15000003 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 3 : 4 : 15000004 - 20000004 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 4 : 5 : 20000005 - 25000005 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 5 : 6 : 25000006 - 30000006 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 6 : 7 : 30000007 - 35000007 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 7 : 8 : 35000032 - 40000032 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 8 : 9 : 40000033 - 45000033 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 9 : 10 : 45000034 - 50000034 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 10 : 11 : 50000035 - 55000035 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 11 : 12 : 55000036 - 60000000 2026-03-02 16:15:46.6112026-03-02T15:15:46.611 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 002 for o_orderkey between 10000003 and 15000003 into /data/parquet/orders_chunk_002.parquet : 1250001 rows x 9 columns in 8234ms 2026-03-02 16:15:46.6112026-03-02T15:15:46.611 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 011 for o_orderkey between 55000036 and 60000000 into /data/parquet/orders_chunk_011.parquet : 1249989 rows x 9 columns in 8234ms 2026-03-02 16:15:46.7902026-03-02T15:15:46.790 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 003 for o_orderkey between 15000004 and 20000004 into /data/parquet/orders_chunk_003.parquet : 1250001 rows x 9 columns in 8413ms 2026-03-02 16:15:46.7972026-03-02T15:15:46.797 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 005 for o_orderkey between 25000006 and 30000006 into /data/parquet/orders_chunk_005.parquet : 1250001 rows x 9 columns in 8420ms 2026-03-02 16:15:46.9362026-03-02T15:15:46.936 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 008 for o_orderkey between 40000033 and 45000033 into /data/parquet/orders_chunk_008.parquet : 1250001 rows x 9 columns in 8559ms 2026-03-02 16:15:47.1392026-03-02T15:15:47.139 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 010 for o_orderkey between 50000035 and 55000035 into /data/parquet/orders_chunk_010.parquet : 1250001 rows x 9 columns in 8763ms 2026-03-02 16:15:47.1542026-03-02T15:15:47.154 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 000 for o_orderkey between 1 and 5000001 into /data/parquet/orders_chunk_000.parquet : 1250001 rows x 9 columns in 8777ms 2026-03-02 16:15:47.2472026-03-02T15:15:47.247 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 009 for o_orderkey between 45000034 and 50000034 into /data/parquet/orders_chunk_009.parquet : 1250001 rows x 9 columns in 8870ms 2026-03-02 16:15:47.3082026-03-02T15:15:47.308 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 006 for o_orderkey between 30000007 and 35000007 into /data/parquet/orders_chunk_006.parquet : 1250001 rows x 9 columns in 8931ms 2026-03-02 16:15:47.3092026-03-02T15:15:47.309 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 001 for o_orderkey between 5000002 and 10000002 into /data/parquet/orders_chunk_001.parquet : 1250001 rows x 9 columns in 8932ms 2026-03-02 16:15:47.3632026-03-02T15:15:47.363 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 007 for o_orderkey between 35000032 and 40000032 into /data/parquet/orders_chunk_007.parquet : 1250001 rows x 9 columns in 8986ms 2026-03-02 16:15:47.3662026-03-02T15:15:47.366 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 004 for o_orderkey between 20000005 and 25000005 into /data/parquet/orders_chunk_004.parquet : 1250001 rows x 9 columns in 8989ms 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- files generation end : Elapsed=9257 ms - maxdop=12 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total data rows : 15000000 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total data columns : 9 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total cells : 135000000 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Throughput rows : 1568531 rows/s 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Throughput cells : 14116787 cells/s 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total time : Elapsed=9563 ms 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total data rows : 15000000 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total data columns : 9 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total cells : 135000000 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Final Throughput rows : 1568482 rows/s 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Final Throughput cells : 14116346 cells/s 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Completed Load ``` --- # PostgreSQL The **pg\_fastbcp** extension allows you to run the FastBCP tool directly from an SQL function, enabling fast data export from databases to various formats (CSV, Parquet) and cloud storage directly from PostgreSQL. ## Extension Overview[​](#extension-overview "Direct link to Extension Overview") * **Repository**: [arpe-io/pg\_fastbcp](https://github.com/arpe-io/pg_fastbcp) * **License**: MIT * **Latest version**: v0.30.0 * **Platforms**: Linux (Debian/Ubuntu) and Windows ![pg\_fastbcp Demo](/assets/images/pg_fastbcp-e5e0b5519f8de77a14a8f8cba33d251c.gif) ## Features[​](#features "Direct link to Features") * **Native PostgreSQL Integration**: Execute FastBCP commands directly from SQL * **Secure Password Management**: Built-in encryption for sensitive credentials * **Detailed Result Return**: Get export statistics and performance metrics as SQL results * **Cross-Platform**: Available for both Linux and Windows environments * **Flexible Configuration**: Support for all FastBCP parameters * **Multiple Output Formats**: Export to CSV, Parquet, or directly to cloud storage (AWS S3, Azure Blob, Google Cloud Storage, OneLake) ## Prerequisites[​](#prerequisites "Direct link to Prerequisites") * PostgreSQL 15, 16, 17, or 18 * Sudo/Administrator privileges to install the extension * Valid FastBCP license (request a [trial license](https://arpe.io/get-trial?product=FastBCP)) * FastBCP 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 `FastBCP` 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\_fastbcp releases page](https://github.com/arpe-io/pg_fastbcp/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_fastbcp.so` * `pg_fastbcp.control` * `pg_fastbcp--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_fastbcp.so /usr/lib/postgresql//lib/ sudo cp pg_fastbcp.control pg_fastbcp--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 FastBCP binary sudo chmod +x /path/to/FastBCP sudo chown postgres:postgres /path/to/FastBCP sudo chmod 750 /path/to/FastBCP # 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_fastbcp.dll` * `pg_fastbcp.control` * `pg_fastbcp--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_fastbcp.dll` file into the `lib` folder 4. Copy the `pg_fastbcp.control` and `pg_fastbcp--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 `FastBCP.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_fastbcp CASCADE; ``` ### Create the extension[​](#create-the-extension "Direct link to Create the extension") ``` CREATE EXTENSION pg_fastbcp CASCADE; ``` ## Functions[​](#functions "Direct link to Functions") ### pg\_fastbcp\_encrypt[​](#pg_fastbcp_encrypt "Direct link to pg_fastbcp_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_RunFastBcp_secure` function will automatically decrypt any values passed to its `password` argument. **Syntax:** ``` pg_fastbcp_encrypt(text_to_encrypt text) RETURNS text ``` **Example:** ``` SELECT pg_fastbcp_encrypt('MySecurePassword'); -- Returns: A base64-encoded encrypted string, e.g., "PgP...base64encodedstring==" ``` ### xp\_RunFastBcp\_secure[​](#xp_runfastbcp_secure "Direct link to xp_RunFastBcp_secure") This is the main function to execute the FastBCP tool. It takes various parameters to configure the data export operation. Password arguments (`password`) will be automatically decrypted. **Syntax:** ``` xp_RunFastBcp_secure( connectiontype text DEFAULT NULL, sourceconnectstring text DEFAULT NULL, dsn text DEFAULT NULL, provider text DEFAULT NULL, server text DEFAULT NULL, user_ text DEFAULT NULL, password text DEFAULT NULL, trusted boolean DEFAULT NULL, database_name text DEFAULT NULL, applicationintent text DEFAULT NULL, fileinput text DEFAULT NULL, query text DEFAULT NULL, sourceschema text DEFAULT NULL, sourcetable text DEFAULT NULL, fileoutput text DEFAULT NULL, directory text DEFAULT NULL, timestamped boolean DEFAULT NULL, encoding text DEFAULT NULL, delimiter text DEFAULT NULL, usequotes boolean DEFAULT NULL, dateformat text DEFAULT NULL, decimalseparator text DEFAULT NULL, boolformat text DEFAULT NULL, noheader boolean DEFAULT NULL, parquetcompression text DEFAULT NULL, cloudprofile text DEFAULT NULL, parallelmethod text DEFAULT NULL, paralleldegree integer DEFAULT NULL, distributekeycolumn text DEFAULT NULL, datadrivenquery text DEFAULT NULL, merge boolean DEFAULT NULL, loglevel text DEFAULT NULL, runid text DEFAULT NULL, settingsfile text DEFAULT NULL, config text DEFAULT NULL, nobanner boolean DEFAULT NULL, license text DEFAULT NULL, fastbcp_path text DEFAULT NULL ) RETURNS TABLE ( exit_code integer, output text, total_rows bigint, total_columns integer, total_time bigint ) ``` ## Usage Examples[​](#usage-examples "Direct link to Usage Examples") ### Linux Example - PostgreSQL to CSV[​](#linux-example---postgresql-to-csv "Direct link to Linux Example - PostgreSQL to CSV") Export data from PostgreSQL to CSV files: ``` SELECT * FROM xp_RunFastBcp_secure( connectiontype := 'pgsql', server := 'localhost:5432', user_ := 'postgres', password := pg_fastbcp_encrypt('MyActualPassword'), database_name := 'tpch', sourceschema := 'tpch_1', sourcetable := 'orders', fileoutput := 'orders.csv', directory := '/tmp/export', paralleldegree := 4, parallelmethod := 'Ntile', distributekeycolumn := 'o_orderkey', noheader := false, delimiter := ',', license := '/tmp/FastBCP_linux-x64_v0.30.0/FastBCP.lic', loglevel := 'information', nobanner := false, fastbcp_path := '/tmp/FastBCP_linux-x64_v0.30.0' ); ``` ## 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 FastBCP process. | | `output` | text | The full log output from the FastBCP tool. | | `total_rows` | bigint | The total number of rows transferred. | | `total_columns` | integer | The total number of columns transferred. | | `total_time` | bigint | The total execution time in milliseconds. | ## Output[​](#output "Direct link to Output") You can view the full FastBCP output using the `output` column returned by the function. ## Resources[​](#resources "Direct link to Resources") * [pg\_fastbcp GitHub Repository](https://github.com/arpe-io/pg_fastbcp) * [FastBCP Documentation](https://fastbcp-docs.arpe.io/1.2/integration/postgresql-integration) * [Get a Trial License](https://arpe.io/get-trial?product=FastBCP) * [Report Issues](https://github.com/arpe-io/pg_fastbcp/issues) --- # Release Notes 0.32 ## New Features[​](#new-features "Direct link to New Features") ### OpenTelemetry Support[​](#opentelemetry-support "Direct link to OpenTelemetry Support") FastBCP now supports [OpenTelemetry](https://opentelemetry.io/) for distributed tracing and log correlation. **New parameter:** * `--traceparent`: Accept a [W3C Trace Context](https://www.w3.org/TR/trace-context/) traceparent identifier from an external caller, enabling end-to-end trace correlation across distributed systems. **OpenTelemetry log export:** * Logs can be exported to any OpenTelemetry-compatible collector (e.g., Jaeger, Zipkin, Grafana Tempo) via the Serilog OpenTelemetry sink. * Configuration through environment variables or the `FastBCP_Settings.json` file. See the [OpenTelemetry logging documentation](/1.3/documentation/logging/OpenTelemetry.md) for setup details and examples. ### Gzip Compression[​](#gzip-compression "Direct link to Gzip Compression") **Streamed gzip compression** is now possible by adding `.gz` to file extension. For csv, tsv and json only. * use `--fileoutput file.csv.gz` ### BREAKING CHANGE[​](#breaking-change "Direct link to BREAKING CHANGE") * `--merge` default is Switched from `true` to `false` ### Others[​](#others "Direct link to Others") * Better datatypes coverage for csv and json --- # Release Notes 1.0 ## What's Changed[​](#whats-changed "Direct link to What's Changed") ### ADBC Parquet Export - 2x Faster Performance[​](#adbc-parquet-export---2x-faster-performance "Direct link to ADBC Parquet Export - 2x Faster Performance") FastBCP now supports ADBC (Arrow Database Connectivity) for Parquet exports via the `--connectiontype adbc_mssql` connector, powered by ArrowTDS. **Performance improvements:** * 2x faster Parquet generation compared to traditional methods * Native columnar data format (Arrow) eliminates conversion overhead * Optimized for SQL Server data types **Usage:** ``` fastbcp --server myserver.database.windows.net \ --database MyDatabase \ --query "SELECT * FROM Sales.Orders" \ --connectiontype adbc_mssql \ --fileoutput "orders.parquet" ``` See [Connection Parameters documentation](/1.3/documentation/cli/connection_parameters.md#connection-type) for more details. ### Buffered Cloud Uploads[​](#buffered-cloud-uploads "Direct link to Buffered Cloud Uploads") New environment variables enable buffered cloud uploads for significantly improved Azure Data Lake Storage and OneLake performance. **New environment variables:** * `FASTBCP_CLOUD_ISBUFFERED`: When `True`, ADLS/OneLake writes are buffered to a local temp file, then uploaded in parallel. When `False`, data is streamed directly to the cloud. * `FASTBCP_TMPPATH`: Base directory for temporary files created during buffered cloud uploads. Default: System temp (`%TEMP%` / `$TMPDIR`). * `FASTBCP_CLOUD_MAXUPLOADTHREAD_PER_STREAM`: Maximum number of parallel upload threads per cloud stream. Default: `8` if `parallelmethod=None`, `2` otherwise. * `FASTBCP_UID_STRING_CASING`: Controls UID-to-string casing. Values: `lower` or `upper`. Default: `lower` (RFC 4122). **Example — Buffered cloud uploads:** ``` # Enable buffered uploads for Azure $env:FASTBCP_CLOUD_ISBUFFERED = "True" $env:FASTBCP_TMPPATH = "D:\temp\fastbcp" fastbcp --server myserver --database MyDB --sourceschema Sales --sourcetable Orders ` --fileoutput "abfss://container@storage.dfs.core.windows.net/orders.parquet" ``` **Example — UID string casing (PowerShell):** ``` # Output UIDs in uppercase $env:FASTBCP_UID_STRING_CASING = "upper" fastbcp --server myserver --database MyDB --sourcetable MyTable --fileoutput "output.parquet" ``` **Example — UID string casing (Linux):** ``` # Output UIDs in uppercase export FASTBCP_UID_STRING_CASING=upper fastbcp --server myserver --database MyDB --sourcetable MyTable --fileoutput "output.parquet" ``` See the [Environment Variables](/1.3/documentation/environment-variables/overview.md) documentation for detailed configuration. ### Move to .NET 10[​](#move-to-net-10 "Direct link to Move to .NET 10") FastBCP now runs on .NET 10: * Performance improvements in runtime and GC * Enhanced security and stability * Continued long-term support * Compatibility: Windows, Linux, macOS (x64, ARM64) ### Improved SBOM Generation[​](#improved-sbom-generation "Direct link to Improved SBOM Generation") Enhanced Software Bill of Materials (SBOM) generation for better supply chain security and compliance. ### SLSA Build Provenance[​](#slsa-build-provenance "Direct link to SLSA Build Provenance") Added SLSA (Supply-chain Levels for Software Artifacts) build provenance in CI for enhanced supply chain security and compliance. ### Early Cleanup of Temp Files[​](#early-cleanup-of-temp-files "Direct link to Early Cleanup of Temp Files") When uploading to cloud storage, temporary files are now cleaned up earlier in the process to reduce disk space requirements. ## ArrowTDS ARPE.IO Driver[​](#arrowtds-arpeio-driver "Direct link to ArrowTDS ARPE.IO Driver") FastBCP 1.0 includes the ArrowTDS ARPE.IO driver for high-performance ADBC connectivity. **Key features:** * TDS 7.4 protocol compatibility * Native Arrow columnar format support * Optimized for SQL Server 2012 and later --- # Release Notes 1.1 ## What's Changed[​](#whats-changed "Direct link to What's Changed") ### ADBC PostgreSQL — Arpe.io ADBC FastDriver[​](#adbc-postgresql--arpeio-adbc-fastdriver "Direct link to ADBC PostgreSQL — Arpe.io ADBC FastDriver") FastBCP now supports ADBC for PostgreSQL via the `--connectiontype adbc_pgsql` connector, powered by the new ADBC Arrow\_FEBE drivers (Arpe.io ADBC FastDriver). **Key highlights:** * Ultra-fast Parquet exports from PostgreSQL * Native Arrow columnar format eliminates conversion overhead * Same high-performance ADBC approach as the existing `adbc_mssql` connector **Usage:** ``` fastbcp --server pg-server:5432 \ --database MyDatabase \ --query "SELECT * FROM public.orders" \ --connectiontype adbc_pgsql \ --fileoutput "orders.parquet" ``` See [Connection Parameters documentation](/1.3/documentation/cli/connection_parameters.md#connection-type) for more details. ### \[Breaking] New Default Date Format[​](#breaking-new-default-date-format "Direct link to \[Breaking] New Default Date Format") The default `--dateformat` value for CSV, JSON, and XLSX outputs has changed from `yyyy-MM-dd` to `yyyy-MM-dd HH:mm:sszzz`. **Auto-adaptive behavior:** The format automatically adapts based on the column type: * **Date-only** columns remain formatted as `yyyy-MM-dd` * **Timestamp/DateTime** columns are formatted as `yyyy-MM-dd HH:mm:ss` even if a timezone token (`zzz`) is in the format string * **DateTimeOffset** columns include the full timezone offset This change also fixes date-only format handling and adds timezone support for CSV date formatting. **Migration:** If your pipeline depends on the previous default (`yyyy-MM-dd`), explicitly set `--dateformat "yyyy-MM-dd"` in your command. ### New Boolean Format Values[​](#new-boolean-format-values "Direct link to New Boolean Format Values") The `--boolformat` parameter now supports additional formats: | Format | Example output | | ------------ | --------------- | | `True/False` | `True`, `False` | | `yes/no` | `yes`, `no` | | `y/n` | `y`, `n` | These are in addition to the existing `true/false`, `t/f`, and `1/0` formats. **Example:** ``` fastbcp --server myserver \ --database MyDatabase \ --query "SELECT * FROM products" \ --fileoutput "products.csv" \ --boolformat "True/False" ``` ### Environment Variables Guardrails[​](#environment-variables-guardrails "Direct link to Environment Variables Guardrails") Security hardening of environment variable handling (internal improvement), with no user-facing impact. --- # Release Notes 1.2 ## What's Changed[​](#whats-changed "Direct link to What's Changed") ### ADBC Oracle — Arpe.io ADBC FastDriver[​](#adbc-oracle--arpeio-adbc-fastdriver "Direct link to ADBC Oracle — Arpe.io ADBC FastDriver") FastBCP now supports ADBC for Oracle via the `--connectiontype adbc_oracle` connector, powered by the new ADBC Arrow\_TTC driver (Arpe.io ADBC FastDriver). It speaks Oracle's TNS/TTC wire protocol natively — no Oracle Client / Instant Client required. **Key highlights:** * Ultra-fast Parquet exports from Oracle * Native Arrow columnar format eliminates conversion overhead * Same high-performance ADBC approach as the existing `adbc_mssql` and `adbc_pgsql` connectors * EZConnect source syntax (`host[:port]/service`) * Supports the `Rowid` parallel method for parallel extraction, in addition to `oraodp` * Parquet is the only supported output format for this connector See [Connection Parameters documentation](/1.3/documentation/cli/connection_parameters.md#connection-type) for more details. ### New Environment Variables[​](#new-environment-variables "Direct link to New Environment Variables") Added three new environment variables: * `FASTBCP_ADBC_BATCHCELLS`: controls the size (in cells, i.e. rows × columns) of the Arrow record batches fetched by the ADBC connectors (`adbc_mssql`, `adbc_pgsql`). **Default:** `500000` (500,000 cells). Sizing by cell count keeps batch memory usage predictable across tables of different widths. See the [FASTBCP\_ADBC\_BATCHCELLS documentation](/1.3/documentation/environment-variables/fastbcp-adbc-batchcells.md) for details. * `FASTBCP_SYSTEMINFO_COLLECT`: collects system information (CPU, memory, OS, etc.) while a run is in progress. **Disabled by default.** See the [FASTBCP\_SYSTEMINFO\_COLLECT documentation](/1.3/documentation/environment-variables/fastbcp-systeminfo-collect.md) for details. * `FASTBCP_PERFORMANCE_COLLECT`: collects performance information (CPU usage, memory usage, etc.) while a run is in progress. **Disabled by default.** See the [FASTBCP\_PERFORMANCE\_COLLECT documentation](/1.3/documentation/environment-variables/fastbcp-performance-collect.md) for details. To enable system and performance diagnostics collection: * Windows * Linux ``` $env:FASTBCP_SYSTEMINFO_COLLECT = $True $env:FASTBCP_PERFORMANCE_COLLECT = $True ``` ``` export FASTBCP_SYSTEMINFO_COLLECT=True export FASTBCP_PERFORMANCE_COLLECT=True ``` ## Bug Fixes[​](#bug-fixes "Direct link to Bug Fixes") ### ODBC with DSN — Login/Password Authentication[​](#odbc-with-dsn--loginpassword-authentication "Direct link to ODBC with DSN — Login/Password Authentication") Fixed an issue where the `odbc` connection type with a DSN (`--dsn`) only worked with integrated (Windows/trusted) authentication. Providing explicit `--user` / `--password` credentials had no effect and the connection silently fell back to integrated authentication. DSN connections now correctly authenticate with the supplied login/password. ### ADBC MSSQL — Column Limit Raised[​](#adbc-mssql--column-limit-raised "Direct link to ADBC MSSQL — Column Limit Raised") Fixed a limitation in the `adbc_mssql` connector that restricted exports to tables with fewer than 256 columns. The limit has been raised to support standard tables with up to 1024 columns. --- # Release Notes 1.3 ## New Features[​](#new-features "Direct link to New Features") ### ADBC Netezza — `--connectiontype adbc_netezza`[​](#adbc-netezza----connectiontype-adbc_netezza "Direct link to adbc-netezza----connectiontype-adbc_netezza") FastBCP now supports Netezza / IBM NPS through the embedded **ArpeNetezza** ADBC driver, via the new `--connectiontype adbc_netezza` connection type. The driver is used for both the metadata step and the data step. **Key highlights:** * No NZdotNET installation needed * Works with **IBM Cloud NPS** * Parquet output only, like the other `adbc_*` connection types * Supported parallel methods: `None`, `NZDataSlice`, `Ntile`, `Random`, `RangeId` and `DataDriven` * `Application Name` defaults to `FastBCP` * NPS 7.x: TLS 1.0/1.1 supported (`tls_min_version=1.0`, ArpeNetezza 0.3.2) **Connection string keys:** `--sourceconnectstring` keys no longer need the `adbc.arpenz.` prefix. The following are all accepted: * Friendly / ADO.NET keys: `Server`, `Host`, `host:port`, `Port`, `Database`, `User ID`, `Password`, `SSL Mode`, `Application Name`, … * Plain driver keys: `sslmode`, `tls_min_version`, `char_encoding`, `login_timeout`, … * `uri` and `connection_string` Keys the driver does not support (e.g. `propagate`, `Pooling`) are ignored, with a single warning. * Windows * Linux ``` .\FastBCP.exe ` --connectiontype adbc_netezza ` --sourceconnectstring "Server=nps-host;Port=5480;Database=SALES;User ID=admin;Password=FastPassword" ` --sourceschema "ADMIN" ` --sourcetable "ORDERS" ` --directory "D:\export\orders" ` --fileoutput "orders.parquet" ` --parallelmethod NZDataSlice ` --paralleldegree 8 ``` ``` ./FastBCP \ --connectiontype adbc_netezza \ --sourceconnectstring "Server=nps-host;Port=5480;Database=SALES;User ID=admin;Password=FastPassword" \ --sourceschema "ADMIN" \ --sourcetable "ORDERS" \ --directory "/data/export/orders" \ --fileoutput "orders.parquet" \ --parallelmethod NZDataSlice \ --paralleldegree 8 ``` NPS 7 pre-releases Files exported from NPS 7 with the pre-releases `v1.3.0-netezza.1` / `v1.3.0-netezza.2` may contain wrong values in `NUMERIC` columns. This is fixed in ArpeNetezza 0.3.3, shipped with FastBCP 1.3. Re-export the affected tables. See [Connection Parameters](/1.3/documentation/cli/connection_parameters.md#connection-type) for more details. ### New Parallel Method — `DBPartition`[​](#new-parallel-method--dbpartition "Direct link to new-parallel-method--dbpartition") The new `--parallelmethod DBPartition` parallel method runs one extraction per native partition / subpartition of the source table. **Supported sources:** | Source | Partitioning used | | ---------- | --------------------------------------------- | | SQL Server | `$PARTITION` | | PostgreSQL | Leaf tables | | Oracle | `PARTITION (...)` | | MySQL | `PARTITION (...)` | | Teradata | Row partitioning, single- and multi-level PPI | The `adbc_*` counterparts are supported too. * Requires `--sourceschema` and `--sourcetable`. * Falls back to `None`, with a warning, when the table is not partitioned, has a single partition, or the source is not supported. * Optimised partition scheduling (internal improvement). * `FASTBCP_DOP_EQUERY` also applies to `DBPartition`. The output layout is controlled by the new [`FASTBCP_DBPARTITION_TARGET_MODE`](/1.3/documentation/environment-variables/fastbcp-dbpartition-target-mode.md) environment variable: | Value | Output layout | | ----------------- | --------------------------------------------------------------------------------------------------------------------- | | `CHUNK` (default) | `_chunk_NNN.` | | `HIVE` | `partition=

/[subpartition=/].` (SQL Server uses `bounds=_`, Teradata `L1=/L2=`) | `--merge` works in both modes. See [Parallel Parameters](/1.3/documentation/cli/parallel_parameters.md#available-methods) for more details. ### Azure Blob Storage — Authentication and Container Access[​](#azure-blob-storage--authentication-and-container-access "Direct link to Azure Blob Storage — Authentication and Container Access") For direct commit to Azure Blob Storage: * **Authentication:** besides `DefaultAzureCredential` (still the fallback), FastBCP now accepts `AZURE_STORAGE_CONNECTION_STRING` or `AZURE_STORAGE_SAS_URL`. The selected authentication method is logged. * **Container access:** a missing *create* permission on the container (HTTP 403/409) is tolerated when the container already exists. 403 errors now give a clearer message (firewall, RBAC or SAS permissions). See [Azure Configuration](/1.3/documentation/cloud-connectivity/azure.md#authentication-methods) for more details. ### ADBC Connectors Improvements[​](#adbc-connectors-improvements "Direct link to ADBC Connectors Improvements") * **`--applicationintent` with `--connectiontype adbc_mssql`:** `--applicationintent` (default `ReadOnly`) and an `ApplicationIntent` key in `--sourceconnectstring` now reach the ArpeMSSQL driver. An Availability Group listener with read-only routing sends the export to a readable secondary, as with `--connectiontype mssql`. * **`--connectiontype adbc_pgsql` honours the libpq environment:** `PGUSER`, `PGPASSWORD`, `PGPASSFILE` / `~/.pgpass` and `PGSSLROOTCERT` are used when `--user` / `--password` / `--sourceconnectstring` do not provide them, like `--connectiontype pgsql` (ArpePGSQL 0.4.5). * **`--connectiontype adbc_oracle` resolves TNS aliases** through `tnsnames.ora` (`TNS_ADMIN`, `$ORACLE_HOME/network/admin`), like `--connectiontype oraodp` (ArpeOracle 0.3.11). ## Behaviour Changes[​](#behaviour-changes "Direct link to Behaviour Changes") ### `adbc_mssql` / `adbc_pgsql` / `adbc_oracle` Run Fully on ADBC[​](#adbc_mssql--adbc_pgsql--adbc_oracle-run-fully-on-adbc "Direct link to adbc_mssql--adbc_pgsql--adbc_oracle-run-fully-on-adbc") The metadata and planning step (row counts, column types, `Ntile`, `Random`, `Timepartition`, `DBPartition`, …) now runs on the ADBC driver instead of SqlClient, Npgsql or ODP.NET. A single connection string is used for both steps. * `--sourceconnectstring` accepts the native syntax, explicit `adbc.*` / `arpeio.*` keys (they win over translated keys), or a whole-connection `uri` / `adbc..connection_string`. * Native keys with no driver equivalent (e.g. `Pooling=false`) are dropped with a warning. With a whole-connection `uri` / `connection_string`, native keys are dropped with a warning saying to put them inside the URI / connection string. * A `Driver=` path in `--sourceconnectstring` is used by both steps. ### Oracle Network Encryption with `--connectiontype adbc_oracle`[​](#oracle-network-encryption-with---connectiontype-adbc_oracle "Direct link to oracle-network-encryption-with---connectiontype-adbc_oracle") FastBCP now sends `encryption=accepted` and `data_integrity=accepted`, so the server decides, as with `--connectiontype oraodp`. `FASTBCP_ADBC_ENCRYPTION` / `FASTBCP_ADBC_DATA_INTEGRITY` or explicit keys still override this. ### `--connectiontype adbc_pgsql` NUMERIC NaN[​](#--connectiontype-adbc_pgsql-numeric-nan "Direct link to --connectiontype-adbc_pgsql-numeric-nan") A `NaN` in a decimal column now fails the read instead of becoming `NULL`. Set `adbc.arpepgsql.numeric_special=null` in `--sourceconnectstring` to keep the previous behaviour (ArpePGSQL 0.4.2+). ### `adbc_oracle` DataDriven Keys[​](#adbc_oracle-datadriven-keys "Direct link to adbc_oracle-datadriven-keys") A scale-0 `NUMBER(<=18)` key is now treated as an integer, as with `--connectiontype oraodp`, so predicates and Hive paths are identical between both connection types. ### `NZDataSlice` Scheduling[​](#nzdataslice-scheduling "Direct link to nzdataslice-scheduling") Faster on uneven slices (internal improvement). After the first failure, no new slice starts. Output files are unchanged. ## Bug Fixes[​](#bug-fixes "Direct link to Bug Fixes") * **Ntile lost rows** (pre-existing): rows could be missing from the export in some cases; on Oracle, string keys failed. Fixed (internal improvement). * **Passwords in logs:** quoted passwords containing `;` (e.g. `Password="p;w=1"`) are now fully masked in logs and telemetry, for every connection type. * **`--connectiontype adbc_mssql` with a named instance:** `host\INSTANCE` connected to the instance on port 1433 instead of resolving the named instance through the SQL Server Browser. * **Oracle TNS alias with `--user` / `--password`:** `--connectiontype oraodp --server ALIAS --user u --password p` failed with `ORA-50008: 'USERNAME' is an invalid connection string attribute` (same for `adbc_oracle`). * **`--connectiontype nzoledb`** connection type fixed (internal improvement). * **`--connectiontype nzcopy --parallelmethod Timepartition`** generated invalid SQL for Netezza. Fixed (internal improvement). * **`NZDataSlice` with `--timestamped`:** all chunks of one export now share the same timestamp prefix (long exports were split across several prefixes). * **`NZDataSlice`** log message fix. ## Documentation[​](#documentation "Direct link to Documentation") * [AWS S3](/1.3/documentation/cloud-connectivity/aws-s3.md#required-permissions): IAM roles / policies needed by FastBCP and SSE-KMS support. * [FASTBCP\_DBPARTITION\_TARGET\_MODE](/1.3/documentation/environment-variables/fastbcp-dbpartition-target-mode.md): new environment variable. * [Connection Parameters](/1.3/documentation/cli/connection_parameters.md#connection-type): `adbc_netezza` connection type. --- # Sitemap ## [Installation](/1.3/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](/1.3/.md) * CLI Reference * [Authentication](/1.3/documentation/cli/authentication.md) * [Connection Parameters](/1.3/documentation/cli/connection_parameters.md) * [Source Info](/1.3/documentation/cli/source_info.md) * [Output Info](/1.3/documentation/cli/output_info.md) * [CSV Formatting](/1.3/documentation/cli/csv_formatting.md) * [Parquet Formatting](/1.3/documentation/cli/parquet_formatting.md) * [Cloud Options](/1.3/documentation/cli/cloud_options.md) * [Parallel Parameters](/1.3/documentation/cli/parallel_parameters.md) * [Advanced Parameters](/1.3/documentation/cli/advanced_parameters.md) * [License](/1.3/documentation/cli/license.md) * Environment Variables * [Overview](/1.3/documentation/environment-variables/overview.md) * [FASTBCP\_CLOUD\_ISBUFFERED](/1.3/documentation/environment-variables/fastbcp-cloud-isbuffered.md) * [FASTBCP\_TMPPATH](/1.3/documentation/environment-variables/fastbcp-tmppath.md) * [FASTBCP\_CLOUD\_MAXUPLOADTHREAD\_PER\_STREAM](/1.3/documentation/environment-variables/fastbcp-cloud-maxuploadthread-per-stream.md) * [FASTBCP\_RGSIZE](/1.3/documentation/environment-variables/fastbcp-rgsize.md) * [FASTBCP\_UID\_STRING\_CASING](/1.3/documentation/environment-variables/fastbcp-uid-string-casing.md) * [FASTBCP\_DATEFORMAT](/1.3/documentation/environment-variables/fastbcp-dateformat.md) * [FASTBCP\_ADBC\_BATCHCELLS](/1.3/documentation/environment-variables/fastbcp-adbc-batchcells.md) * [FASTBCP\_SYSTEMINFO\_COLLECT](/1.3/documentation/environment-variables/fastbcp-systeminfo-collect.md) * [FASTBCP\_PERFORMANCE\_COLLECT](/1.3/documentation/environment-variables/fastbcp-performance-collect.md) * [FASTBCP\_DBPARTITION\_TARGET\_MODE](/1.3/documentation/environment-variables/fastbcp-dbpartition-target-mode.md) * Cloud Connectivity * [Overview](/1.3/documentation/cloud-connectivity/overview.md) * [AWS S3](/1.3/documentation/cloud-connectivity/aws-s3.md) * [Azure](/1.3/documentation/cloud-connectivity/azure.md) * [Google Cloud Storage](/1.3/documentation/cloud-connectivity/google-cloud.md) * [OneLake](/1.3/documentation/cloud-connectivity/onelake.md) * Logging * [Overview](/1.3/documentation/logging/Overview.md) * [Logs Level](/1.3/documentation/logging/logs-level.md) * [Log Database](/1.3/documentation/logging/log-database.md) * [Log Files Names Mapping using variables](/1.3/documentation/logging/log-files-names-mapping-using-variables.md) * [OpenTelemetry](/1.3/documentation/logging/OpenTelemetry.md) * [Examples](/1.3/documentation/logging/examples.md) * Examples * [SQL Server Examples](/1.3/documentation/examples/sql-server.md) * [PostgreSQL Examples](/1.3/documentation/examples/postgresql.md) * [MySQL Examples](/1.3/documentation/examples/mysql.md) * [Oracle Examples](/1.3/documentation/examples/oracle.md) * [DB2 Examples](/1.3/documentation/examples/db2.md) * [Other Databases](/1.3/documentation/examples/other-databases.md) * [Output Formats](/1.3/documentation/examples/output-formats.md) * [Cloud Storage](/1.3/documentation/examples/cloud-storage.md) * [Advanced Scenarios](/1.3/documentation/examples/advanced-scenarios.md) * Compatibility * [Sources & Platforms](/1.3/documentation/compatibility/sources_platforms.md) * [Operating Systems](/1.3/documentation/compatibility/operating_systems.md) ## Datatypes Conversion[​](#datatypes-conversion "Direct link to Datatypes Conversion") * [Overview](/1.3/datatypes-conversion/overview.md) * SQL Server * [mssql](/1.3/datatypes-conversion/mssql/parquet.md) * [adbc\_mssql](/1.3/datatypes-conversion/mssql/adbc-parquet.md) * MySQL * [mysql](/1.3/datatypes-conversion/mysql/parquet.md) * Oracle * [oraodp](/1.3/datatypes-conversion/oracle/parquet.md) * [adbc\_oraodp](/1.3/datatypes-conversion/oracle/adbc-parquet.md) * PostgreSQL * [pgsql](/1.3/datatypes-conversion/postgresql/parquet.md) * [pgcopy](/1.3/datatypes-conversion/postgresql-copy/parquet.md) * [adbc\_pgsql](/1.3/datatypes-conversion/postgresql/adbc-parquet.md) * SAP HANA * [hana](/1.3/datatypes-conversion/saphana/parquet.md) * Teradata * [teradata](/1.3/datatypes-conversion/teradata/parquet.md) ## Integration[​](#integration "Direct link to Integration") * [Docker](/1.3/integration/docker-integration.md) * [Kestra](/1.3/integration/kestra-integration.md) * [Airflow](/1.3/integration/airflow-integration.md) * [PostgreSQL](/1.3/integration/postgresql-integration.md) ## Release Notes[​](#release-notes "Direct link to Release Notes") * [Release Notes 1.3](/1.3/release-notes/release-notes-1.3.md) * [Release Notes 1.2](/1.3/release-notes/release-notes-1.2.md) * [Release Notes 1.1](/1.3/release-notes/release-notes-1.1.md) * [Release Notes 1.0](/1.3/release-notes/release-notes-1.0.md) * [Release Notes 0.32](/1.3/release-notes/release-notes-0.32.md) ## AI Integrations[​](#ai-integrations "Direct link to AI Integrations") * [FastBCP Agent Skill](/1.3/ai/agent-skills.md) ## [Sitemap](/1.3/sitemap.md)[​](#sitemap-1 "Direct link to sitemap-1") --- # FastBCP Command Wizard Expand All\[ ] ### PlatformWindows Windows ![Linux](/img/tux.svg)Linux ### Connection ParametersMS SQL Server Connection Type? : ADBC (High Performance) MS SQL Server (Arpe.io ADBC FastDriver) PostgreSQL (Arpe.io ADBC FastDriver) Oracle (Arpe.io ADBC FastDriver) Netezza (Arpe.io ADBC FastDriver) Standard Drivers ClickHouse MS SQL Server MySQL Netezza ODBC OLEDB Oracle (ODP) PostgreSQL (pgcopy) PostgreSQL (pgsql) SAP HANA Teradata | Provider? : | SQLOLEDB | | ------------------------ | ----------------------------- | | Server? : | mss-server,1433 | | Source Connect String? : | Server=myserver;Database=mydb | | DSN? : | MyDSN | | Trusted? : | \[ ] | | User? : | username | | Password? : | password | | Database? : | mydb | | Application Intent? : | ReadOnlyReadWrite | ### Source Query / Table ### Output Options ### Format Options ### Parquet Options ### Cloud Options ### Parallel Parameters ### Advanced Parameters ### License ### Generated Command Multi-line\[x] generate config sharecopy ``` ``` --- # Getting Started with FastBCP If you haven't installed FastBCP yet, please check the [Installation](/1.4/installation.md) section first. You can also build your first FastBCP command using our interactive [Command Builder Wizard](/latest/wizard.md). [FastBCP Tutorial](https://www.youtube.com/embed/Tpmc6NrTtuM) --- # FastBCP Agent Skill arpe.io publishes official agent skills in the [arpe-io/arpeio-skills](https://github.com/arpe-io/arpeio-skills) GitHub repository. The [`fastbcp`](https://github.com/arpe-io/arpeio-skills/tree/main/plugins/fastbcp/skills/fastbcp) skill teaches your AI agent how to build, explain and troubleshoot FastBCP commands: which parameters exist, which options fit together, which parallel method to choose, and which mistakes to avoid. The same repository also has skills for FastTransfer, MigratorXpress, LakeXpress and the arpe.io ADBC drivers. Skill or MCP server? The skill is a set of instructions: it teaches the agent how FastBCP works, and the agent writes the command. The [arpe.io MCP server](/1.4/ai/mcp-server.md) gives the agent tools that build, validate and, if you allow it, run FastBCP 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 fastbcp --marketplace arpe-io/arpeio-skills ``` Or in two steps: ``` /plugin marketplace add arpe-io/arpeio-skills /plugin install fastbcp@arpe-io ``` Then just ask, for example: *"Export dbo.Orders from SQL Server to Parquet on S3 with FastBCP, in parallel"*. To get the latest version of the skill later: ``` /plugin marketplace update arpe-io /plugin update fastbcp@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/fastbcp/skills/fastbcp / ``` For agents without skill support, paste the content of [`SKILL.md`](https://github.com/arpe-io/arpeio-skills/blob/main/plugins/fastbcp/skills/fastbcp/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 FastBCP version its facts were checked against. Before building a command, it asks the agent to check the installed version (`FastBCP --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 FastBCP version, the prompt you gave, and the command the agent produced (with passwords and licence text removed). --- # FastBCP 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 FastBCP, the assistant can ask the server to validate a set of parameters and render the exact FastBCP command, look up what FastBCP supports, read the release notes and search this documentation. If FastBCP 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 FastBCP 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 FastBCP 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.4/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 FastBCP from the assistant[​](#run-fastbcp-from-the-assistant "Direct link to Run FastBCP from the assistant") To let the assistant run FastBCP, install the server on the machine where FastBCP 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 FASTBCP_PATH=/path/to/FastBCP arpeio -- arpeio-mcp ``` In Claude Desktop, and in other clients that use the `mcpServers` format: ``` { "mcpServers": { "arpeio": { "command": "arpeio-mcp", "env": { "FASTBCP_PATH": "/path/to/FastBCP" } } } } ``` | Variable | Description | | ----------------- | ------------------------------------------------------------------------ | | `FASTBCP_PATH` | Path to the FastBCP binary. Without it, the server only builds commands. | | `FASTBCP_TIMEOUT` | Execution timeout, in seconds. Optional. | | `FASTBCP_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 | | ------------------------ | ------------------------------------------------------------------------------------------------------------------- | | `fastbcp_info` | Reference information, picked with `action`: supported formats, parallel methods, workflow tips, version detection. | | `fastbcp_preview_export` | Validates the parameters and renders the FastBCP command. When no parallel method is given, it suggests one. | | `fastbcp_execute_export` | Runs the previewed command. Needs a local FastBCP 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: *"Export the Sales.Orders table from PostgreSQL to Parquet files in an S3 bucket, split in 8 parallel parts"*. 2. The assistant calls `fastbcp_preview_export`. The tool checks the parameters and returns the FastBCP command, an explanation, and warnings when an option does not exist in the FastBCP version you run. 3. You review the command. Passwords are masked in the displayed version. 4. If execution is enabled, the assistant calls `fastbcp_execute_export`. 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: `export-table` for FastBCP, and `troubleshoot` to explain a failed run from its error message. The server also exposes the FastBCP capability matrix as the MCP resource `arpeio://capabilities/fastbcp-formats`. ## 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). --- # SQL Server (ADBC) → Parquet Datatypes conversion mapping when exporting from **SQL Server** using the ADBC connector (`--connectiontype adbc_mssql`) to **Parquet** format. Platform availability The ADBC FastDriver connectors (`adbc_mssql`, `adbc_pgsql`) are available on **Windows x64** and **Linux x64** only. They are **not** supported on **Linux ARM64**. info The ADBC connector does not map every type the way the standard [`mssql`](/1.4/datatypes-conversion/mssql/parquet.md) driver does. Compare both pages before switching. | | | | --------------- | ------------------------ | | **Source** | SQL Server (adbc\_mssql) | | **Format** | Parquet | | **FastBCP** | 1.4.0.0 | | **Test Status** | PARTIAL (30/31 Nullable) | Failed Types The following datatype is **not supported** with this connector: * `SQL_VARIANT` — export fails ## Parquet Schema: testdatatypes\_nullable[​](#parquet-schema-testdatatypes_nullable "Direct link to Parquet Schema: testdatatypes_nullable") | name | physical\_type | converted\_type | logical\_type | | --------------------- | ----------------------- | ----------------- | --------------------------------------------- | | col\_bigint | INT64 | — | — | | col\_int | INT32 | — | — | | col\_smallint | INT32 | INT\_16 | IntType(bitWidth=16, isSigned=1) | | col\_tinyint | INT32 | UINT\_8 | IntType(bitWidth=8, isSigned=0) | | col\_bit | BOOLEAN | — | — | | col\_decimal | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=2, precision=18) | | col\_numeric | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=2, precision=18) | | col\_money | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=4, precision=19) | | col\_smallmoney | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=4, precision=10) | | col\_float | DOUBLE | — | — | | col\_real | FLOAT | — | — | | col\_date | INT32 | DATE | DateType() | | col\_time | INT64 | — | TimeType(isAdjustedToUTC=0, unit=NANOS) | | col\_datetime | INT64 | TIMESTAMP\_MILLIS | TimestampType(isAdjustedToUTC=0, unit=MILLIS) | | col\_datetime2 | INT64 | — | TimestampType(isAdjustedToUTC=0, unit=NANOS) | | col\_datetimeoffset | INT64 | — | TimestampType(isAdjustedToUTC=1, unit=NANOS) | | col\_smalldatetime | INT64 | TIMESTAMP\_MILLIS | TimestampType(isAdjustedToUTC=0, unit=MILLIS) | | col\_char | BYTE\_ARRAY | UTF8 | StringType() | | col\_varchar | BYTE\_ARRAY | UTF8 | StringType() | | col\_nchar | BYTE\_ARRAY | UTF8 | StringType() | | col\_nvarchar | BYTE\_ARRAY | UTF8 | StringType() | | col\_text | BYTE\_ARRAY | UTF8 | StringType() | | col\_ntext | BYTE\_ARRAY | UTF8 | StringType() | | col\_binary | BYTE\_ARRAY | — | — | | col\_varbinary | BYTE\_ARRAY | — | — | | col\_image | BYTE\_ARRAY | — | — | | col\_uniqueidentifier | BYTE\_ARRAY | UTF8 | StringType() | | col\_xml | BYTE\_ARRAY | UTF8 | StringType() | | col\_geography | BYTE\_ARRAY | — | — | | col\_geometry | BYTE\_ARRAY | — | — | --- # SQL Server → Parquet Datatypes conversion mapping when exporting from **SQL Server** (`--connectiontype mssql`) to **Parquet** format. | | | | --------------- | ------------------ | | **Source** | SQL Server (mssql) | | **Format** | Parquet | | **FastBCP** | 1.4.0.0 | | **Test Status** | PASS (Nullable) | ## Parquet Schema: testdatatypes\_nullable[​](#parquet-schema-testdatatypes_nullable "Direct link to Parquet Schema: testdatatypes_nullable") | name | physical\_type | converted\_type | logical\_type | | --------------------- | ----------------------- | ----------------- | ---------------------------------------- | | col\_bigint | INT64 | INT\_64 | IntType(bitWidth=64, isSigned=1) | | col\_int | INT32 | INT\_32 | IntType(bitWidth=32, isSigned=1) | | col\_smallint | INT32 | INT\_16 | IntType(bitWidth=16, isSigned=1) | | col\_tinyint | INT32 | UINT\_8 | IntType(bitWidth=8, isSigned=0) | | col\_bit | BOOLEAN | — | — | | col\_decimal | INT64 | DECIMAL | DecimalType(scale=2, precision=18) | | col\_numeric | INT64 | DECIMAL | DecimalType(scale=2, precision=18) | | col\_money | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=4, precision=19) | | col\_smallmoney | INT64 | DECIMAL | DecimalType(scale=4, precision=10) | | col\_float | DOUBLE | — | — | | col\_real | FLOAT | — | — | | col\_date | INT32 | DATE | — | | col\_time | INT64 | — | TimeType(isAdjustedToUTC=0, unit=MICROS) | | col\_datetime | INT64 | TIMESTAMP\_MILLIS | — | | col\_datetime2 | INT64 | TIMESTAMP\_MILLIS | — | | col\_datetimeoffset | BYTE\_ARRAY | UTF8 | StringType() | | col\_smalldatetime | INT64 | TIMESTAMP\_MILLIS | — | | col\_char | BYTE\_ARRAY | UTF8 | StringType() | | col\_varchar | BYTE\_ARRAY | UTF8 | StringType() | | col\_nchar | BYTE\_ARRAY | UTF8 | StringType() | | col\_nvarchar | BYTE\_ARRAY | UTF8 | StringType() | | col\_text | BYTE\_ARRAY | UTF8 | StringType() | | col\_ntext | BYTE\_ARRAY | UTF8 | StringType() | | col\_binary | BYTE\_ARRAY | — | — | | col\_varbinary | BYTE\_ARRAY | — | — | | col\_image | BYTE\_ARRAY | — | — | | col\_uniqueidentifier | BYTE\_ARRAY | UTF8 | StringType() | | col\_xml | BYTE\_ARRAY | UTF8 | StringType() | | col\_sql\_variant | BYTE\_ARRAY | UTF8 | StringType() | | col\_geography | BYTE\_ARRAY | UTF8 | StringType() | | col\_geometry | BYTE\_ARRAY | UTF8 | StringType() | --- # MySQL → Parquet Datatypes conversion mapping when exporting from **MySQL** (`--connectiontype mysql`) to **Parquet** format. | | | | --------------- | --------------- | | **Source** | MySQL (mysql) | | **Format** | Parquet | | **FastBCP** | 1.4.0.0 | | **Test Status** | PASS (Nullable) | ## Parquet Schema: testdatatypes\_nullable[​](#parquet-schema-testdatatypes_nullable "Direct link to Parquet Schema: testdatatypes_nullable") | name | physical\_type | converted\_type | logical\_type | | --------------- | -------------- | ----------------- | ---------------------------------- | | col\_bigint | INT64 | INT\_64 | IntType(bitWidth=64, isSigned=1) | | col\_int | INT32 | INT\_32 | IntType(bitWidth=32, isSigned=1) | | col\_mediumint | INT32 | INT\_32 | IntType(bitWidth=32, isSigned=1) | | col\_smallint | INT32 | INT\_16 | IntType(bitWidth=16, isSigned=1) | | col\_tinyint | BYTE\_ARRAY | UTF8 | StringType() | | col\_bit | BYTE\_ARRAY | UTF8 | StringType() | | col\_decimal | INT64 | DECIMAL | DecimalType(scale=2, precision=18) | | col\_float | FLOAT | — | — | | col\_double | DOUBLE | — | — | | col\_date | INT64 | TIMESTAMP\_MILLIS | — | | col\_time | BYTE\_ARRAY | UTF8 | StringType() | | col\_datetime | INT64 | TIMESTAMP\_MILLIS | — | | col\_timestamp | INT64 | TIMESTAMP\_MILLIS | — | | col\_year | INT32 | INT\_32 | IntType(bitWidth=32, isSigned=1) | | col\_char | BYTE\_ARRAY | UTF8 | StringType() | | col\_varchar | BYTE\_ARRAY | UTF8 | StringType() | | col\_tinytext | BYTE\_ARRAY | UTF8 | StringType() | | col\_text | BYTE\_ARRAY | UTF8 | StringType() | | col\_mediumtext | BYTE\_ARRAY | UTF8 | StringType() | | col\_longtext | BYTE\_ARRAY | UTF8 | StringType() | | col\_binary | BYTE\_ARRAY | — | — | | col\_varbinary | BYTE\_ARRAY | — | — | | col\_tinyblob | BYTE\_ARRAY | — | — | | col\_blob | BYTE\_ARRAY | — | — | | col\_mediumblob | BYTE\_ARRAY | — | — | | col\_longblob | BYTE\_ARRAY | — | — | | col\_enum | BYTE\_ARRAY | UTF8 | StringType() | | col\_set | BYTE\_ARRAY | UTF8 | StringType() | | col\_json | BYTE\_ARRAY | UTF8 | StringType() | | col\_geometry | BYTE\_ARRAY | — | — | | col\_point | BYTE\_ARRAY | — | — | | col\_linestring | BYTE\_ARRAY | — | — | | col\_polygon | BYTE\_ARRAY | — | — | --- # Oracle (ADBC) → Parquet Datatypes conversion mapping when exporting from **Oracle** using the ADBC connector (`--connectiontype adbc_oracle`) to **Parquet** format. Platform availability The ADBC FastDriver connectors are available on **Windows x64** and **Linux x64** only. They are **not** supported on **Linux ARM64**. info The ADBC connector does not map every type the way the standard [`oraodp`](/1.4/datatypes-conversion/oracle/parquet.md) driver does. Compare both pages before switching. | | | | --------------- | ------------------------ | | **Source** | Oracle (adbc\_oracle) | | **Format** | Parquet | | **FastBCP** | 1.4.0.0 | | **Test Status** | PARTIAL (21/25 Nullable) | Failed Types The following datatypes are **not supported** with this connector: * `ROWID` — export fails * `UROWID` — export fails * `XMLTYPE` — export fails * `BFILE` — export fails ## Parquet Schema: testdatatypes\_nullable[​](#parquet-schema-testdatatypes_nullable "Direct link to Parquet Schema: testdatatypes_nullable") | name | physical\_type | converted\_type | logical\_type | | ------------------- | ----------------------- | ----------------- | --------------------------------------------- | | COL\_NUMBER | BYTE\_ARRAY | UTF8 | StringType() | | COL\_NUMBER10 | INT64 | — | — | | COL\_NUMBER18\_2 | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=2, precision=18) | | COL\_FLOAT | BYTE\_ARRAY | UTF8 | StringType() | | COL\_BINARY\_FLOAT | FLOAT | — | — | | COL\_BINARY\_DOUBLE | DOUBLE | — | — | | COL\_CHAR | BYTE\_ARRAY | UTF8 | StringType() | | COL\_VARCHAR2 | BYTE\_ARRAY | UTF8 | StringType() | | COL\_NCHAR | BYTE\_ARRAY | UTF8 | StringType() | | COL\_NVARCHAR2 | BYTE\_ARRAY | UTF8 | StringType() | | COL\_CLOB | BYTE\_ARRAY | UTF8 | StringType() | | COL\_NCLOB | BYTE\_ARRAY | UTF8 | StringType() | | COL\_BLOB | BYTE\_ARRAY | — | — | | COL\_RAW | BYTE\_ARRAY | — | — | | COL\_LONG\_RAW | BYTE\_ARRAY | — | — | | COL\_DATE | INT64 | TIMESTAMP\_MILLIS | TimestampType(isAdjustedToUTC=0, unit=MILLIS) | | COL\_TIMESTAMP | INT64 | TIMESTAMP\_MICROS | TimestampType(isAdjustedToUTC=0, unit=MICROS) | | COL\_TIMESTAMP\_TZ | INT64 | TIMESTAMP\_MICROS | TimestampType(isAdjustedToUTC=1, unit=MICROS) | | COL\_TIMESTAMP\_LTZ | INT64 | TIMESTAMP\_MICROS | TimestampType(isAdjustedToUTC=1, unit=MICROS) | | COL\_INTERVAL\_YM | INT64 | — | — | | COL\_INTERVAL\_DS | BYTE\_ARRAY | UTF8 | StringType() | --- # Oracle → Parquet Datatypes conversion mapping when exporting from **Oracle** (`--connectiontype oraodp`) to **Parquet** format. | | | | --------------- | --------------- | | **Source** | Oracle (oraodp) | | **Format** | Parquet | | **FastBCP** | 1.4.0.0 | | **Test Status** | PASS (Nullable) | ## Parquet Schema: testdatatypes\_nullable[​](#parquet-schema-testdatatypes_nullable "Direct link to Parquet Schema: testdatatypes_nullable") | name | physical\_type | converted\_type | logical\_type | | ------------------- | ----------------------- | ----------------- | ----------------------------------- | | COL\_NUMBER | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=18, precision=38) | | COL\_NUMBER10 | INT64 | INT\_64 | IntType(bitWidth=64, isSigned=1) | | COL\_NUMBER18\_2 | INT64 | DECIMAL | DecimalType(scale=2, precision=18) | | COL\_FLOAT | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=18, precision=38) | | COL\_BINARY\_FLOAT | FLOAT | — | — | | COL\_BINARY\_DOUBLE | DOUBLE | — | — | | COL\_CHAR | BYTE\_ARRAY | UTF8 | StringType() | | COL\_VARCHAR2 | BYTE\_ARRAY | UTF8 | StringType() | | COL\_NCHAR | BYTE\_ARRAY | UTF8 | StringType() | | COL\_NVARCHAR2 | BYTE\_ARRAY | UTF8 | StringType() | | COL\_CLOB | BYTE\_ARRAY | UTF8 | StringType() | | COL\_NCLOB | BYTE\_ARRAY | UTF8 | StringType() | | COL\_BLOB | BYTE\_ARRAY | — | — | | COL\_RAW | BYTE\_ARRAY | — | — | | COL\_LONG\_RAW | BYTE\_ARRAY | — | — | | COL\_DATE | INT64 | TIMESTAMP\_MILLIS | — | | COL\_TIMESTAMP | INT64 | TIMESTAMP\_MILLIS | — | | COL\_TIMESTAMP\_TZ | BYTE\_ARRAY | UTF8 | StringType() | | COL\_TIMESTAMP\_LTZ | INT64 | TIMESTAMP\_MILLIS | — | | COL\_INTERVAL\_YM | INT64 | INT\_64 | IntType(bitWidth=64, isSigned=1) | | COL\_INTERVAL\_DS | BYTE\_ARRAY | UTF8 | StringType() | | COL\_ROWID | BYTE\_ARRAY | UTF8 | StringType() | | COL\_UROWID | BYTE\_ARRAY | UTF8 | StringType() | | COL\_XMLTYPE | BYTE\_ARRAY | UTF8 | StringType() | | COL\_BFILE | BYTE\_ARRAY | — | — | --- # Datatypes Conversion When FastBCP exports a table, every native source column type is mapped to a type in the target output format. This section documents the **exact mappings** FastBCP produces. These pages are not a specification: each one is the Parquet schema read back from a real export of a test table covering all of the source's native datatypes. ## Supported Sources[​](#supported-sources "Direct link to Supported Sources") Sources are grouped by database system. A system can be read through several connection types (`--connectiontype`), and each one has its own page because the mappings it produces can differ — `pgcopy` produces exactly the same mappings as `pgsql`, while the ADBC connectors differ from their standard counterparts on several types. | Database | Connection Types | | ---------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | SQL Server | [`mssql`](/1.4/datatypes-conversion/mssql/parquet.md) · [`adbc_mssql`](/1.4/datatypes-conversion/mssql/adbc-parquet.md) | | MySQL | [`mysql`](/1.4/datatypes-conversion/mysql/parquet.md) | | Oracle | [`oraodp`](/1.4/datatypes-conversion/oracle/parquet.md) · [`adbc_oracle`](/1.4/datatypes-conversion/oracle/adbc-parquet.md) | | PostgreSQL | [`pgsql`](/1.4/datatypes-conversion/postgresql/parquet.md) · [`pgcopy`](/1.4/datatypes-conversion/postgresql-copy/parquet.md) · [`adbc_pgsql`](/1.4/datatypes-conversion/postgresql/adbc-parquet.md) | | SAP HANA | [`hana`](/1.4/datatypes-conversion/saphana/parquet.md) | | Teradata | [`teradata`](/1.4/datatypes-conversion/teradata/parquet.md) | Parquet is the only output format documented here. ## How to Read a Page[​](#how-to-read-a-page "Direct link to How to Read a Page") Each page opens with a summary of the export it documents — source, output format, the FastBCP build used and the test status — followed by the Parquet schema produced from the **`testdatatypes_nullable`** table, in which every column accepts `NULL`. | Column | Description | | ------------------- | ------------------------------------------------------------------------------------------------------------------------- | | **name** | The column name in the source table | | **physical\_type** | The Parquet physical storage type: `BOOLEAN`, `INT32`, `INT64`, `FLOAT`, `DOUBLE`, `BYTE_ARRAY` or `FIXED_LEN_BYTE_ARRAY` | | **converted\_type** | The legacy Parquet annotation on top of it (`UTF8`, `DECIMAL`, `DATE`, `TIMESTAMP_MILLIS`, …) | | **logical\_type** | The modern Parquet annotation (`StringType()`, `DecimalType(scale=2, precision=18)`, `IntType(…)`, …) | A `—` means the column carries no annotation of that kind, so the physical type alone describes it. NOT NULL columns Declaring the source columns `NOT NULL` does not change the mapping. The only difference is the Parquet repetition level (REQUIRED instead of OPTIONAL), which these tables do not show. --- # PostgreSQL COPY → Parquet Datatypes conversion mapping when exporting from **PostgreSQL** using the COPY protocol (`--connectiontype pgcopy`) to **Parquet** format. info The COPY protocol variant produces the same type mappings as the standard PostgreSQL driver. See also [PostgreSQL (pgsql)](/1.4/datatypes-conversion/postgresql/parquet.md). | | | | --------------- | ------------------------ | | **Source** | PostgreSQL COPY (pgcopy) | | **Format** | Parquet | | **FastBCP** | 1.4.0.0 | | **Test Status** | PASS (Nullable) | ## Parquet Schema: testdatatypes\_nullable[​](#parquet-schema-testdatatypes_nullable "Direct link to Parquet Schema: testdatatypes_nullable") | name | physical\_type | converted\_type | logical\_type | | ---------------------- | ----------------------- | ----------------- | ---------------------------------------- | | col\_bigint | INT64 | INT\_64 | IntType(bitWidth=64, isSigned=1) | | col\_integer | INT32 | INT\_32 | IntType(bitWidth=32, isSigned=1) | | col\_smallint | INT32 | INT\_16 | IntType(bitWidth=16, isSigned=1) | | col\_boolean | BOOLEAN | — | — | | col\_numeric | INT64 | DECIMAL | DecimalType(scale=2, precision=18) | | col\_real | FLOAT | — | — | | col\_double\_precision | DOUBLE | — | — | | col\_money | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=4, precision=19) | | col\_date | INT32 | DATE | — | | col\_time | INT32 | TIME\_MILLIS | TimeType(isAdjustedToUTC=0, unit=MILLIS) | | col\_timestamp | INT64 | TIMESTAMP\_MILLIS | — | | col\_timestamptz | BYTE\_ARRAY | UTF8 | StringType() | | col\_interval | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | col\_char | BYTE\_ARRAY | UTF8 | StringType() | | col\_varchar | BYTE\_ARRAY | UTF8 | StringType() | | col\_text | BYTE\_ARRAY | UTF8 | StringType() | | col\_bytea | BYTE\_ARRAY | — | — | | col\_uuid | BYTE\_ARRAY | UTF8 | StringType() | | col\_json | BYTE\_ARRAY | UTF8 | StringType() | | col\_jsonb | BYTE\_ARRAY | — | — | | col\_xml | BYTE\_ARRAY | UTF8 | StringType() | | col\_inet | BYTE\_ARRAY | UTF8 | StringType() | | col\_cidr | BYTE\_ARRAY | UTF8 | StringType() | | col\_macaddr | BYTE\_ARRAY | UTF8 | StringType() | | col\_point | BYTE\_ARRAY | UTF8 | StringType() | | col\_line | BYTE\_ARRAY | UTF8 | StringType() | | col\_lseg | BYTE\_ARRAY | UTF8 | StringType() | | col\_box | BYTE\_ARRAY | UTF8 | StringType() | | col\_path | BYTE\_ARRAY | UTF8 | StringType() | | col\_polygon | BYTE\_ARRAY | UTF8 | StringType() | | col\_circle | BYTE\_ARRAY | UTF8 | StringType() | | col\_int4range | BYTE\_ARRAY | UTF8 | StringType() | | col\_int8range | BYTE\_ARRAY | UTF8 | StringType() | | col\_numrange | BYTE\_ARRAY | UTF8 | StringType() | | col\_tsrange | BYTE\_ARRAY | UTF8 | StringType() | | col\_tstzrange | BYTE\_ARRAY | UTF8 | StringType() | | col\_daterange | BYTE\_ARRAY | UTF8 | StringType() | | col\_bit | BYTE\_ARRAY | UTF8 | StringType() | | col\_bit\_varying | BYTE\_ARRAY | UTF8 | StringType() | | col\_oid | BYTE\_ARRAY | UTF8 | StringType() | | col\_int\_array | BYTE\_ARRAY | UTF8 | StringType() | --- # PostgreSQL (ADBC) → Parquet Datatypes conversion mapping when exporting from **PostgreSQL** using the ADBC connector (`--connectiontype adbc_pgsql`) to **Parquet** format. Platform availability The ADBC FastDriver connectors (`adbc_mssql`, `adbc_pgsql`) are available on **Windows x64** and **Linux x64** only. They are **not** supported on **Linux ARM64**. info The ADBC connector does not map every type the way the standard [`pgsql`](/1.4/datatypes-conversion/postgresql/parquet.md) driver does. Compare both pages before switching. | | | | --------------- | ------------------------ | | **Source** | PostgreSQL (adbc\_pgsql) | | **Format** | Parquet | | **FastBCP** | 1.4.0.0 | | **Test Status** | PARTIAL (40/41 Nullable) | Failed Types The following datatype is **not supported** with this connector: * `INTERVAL` — export fails ## Parquet Schema: testdatatypes\_nullable[​](#parquet-schema-testdatatypes_nullable "Direct link to Parquet Schema: testdatatypes_nullable") | name | physical\_type | converted\_type | logical\_type | | ---------------------- | ----------------------- | ----------------- | --------------------------------------------- | | col\_bigint | INT64 | — | — | | col\_integer | INT32 | — | — | | col\_smallint | INT32 | INT\_16 | IntType(bitWidth=16, isSigned=1) | | col\_boolean | BOOLEAN | — | — | | col\_numeric | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=2, precision=18) | | col\_real | FLOAT | — | — | | col\_double\_precision | DOUBLE | — | — | | col\_money | BYTE\_ARRAY | — | — | | col\_date | INT32 | DATE | DateType() | | col\_time | INT64 | — | TimeType(isAdjustedToUTC=0, unit=MICROS) | | col\_timestamp | INT64 | TIMESTAMP\_MICROS | TimestampType(isAdjustedToUTC=0, unit=MICROS) | | col\_timestamptz | INT64 | TIMESTAMP\_MICROS | TimestampType(isAdjustedToUTC=1, unit=MICROS) | | col\_char | BYTE\_ARRAY | UTF8 | StringType() | | col\_varchar | BYTE\_ARRAY | UTF8 | StringType() | | col\_text | BYTE\_ARRAY | UTF8 | StringType() | | col\_bytea | BYTE\_ARRAY | — | — | | col\_uuid | BYTE\_ARRAY | UTF8 | StringType() | | col\_json | BYTE\_ARRAY | UTF8 | StringType() | | col\_jsonb | BYTE\_ARRAY | UTF8 | StringType() | | col\_xml | BYTE\_ARRAY | UTF8 | StringType() | | col\_inet | BYTE\_ARRAY | UTF8 | StringType() | | col\_cidr | BYTE\_ARRAY | UTF8 | StringType() | | col\_macaddr | BYTE\_ARRAY | UTF8 | StringType() | | col\_point | BYTE\_ARRAY | — | — | | col\_line | BYTE\_ARRAY | — | — | | col\_lseg | BYTE\_ARRAY | — | — | | col\_box | BYTE\_ARRAY | — | — | | col\_path | BYTE\_ARRAY | — | — | | col\_polygon | BYTE\_ARRAY | — | — | | col\_circle | BYTE\_ARRAY | — | — | | col\_int4range | BYTE\_ARRAY | — | — | | col\_int8range | BYTE\_ARRAY | — | — | | col\_numrange | BYTE\_ARRAY | — | — | | col\_tsrange | BYTE\_ARRAY | — | — | | col\_tstzrange | BYTE\_ARRAY | — | — | | col\_daterange | BYTE\_ARRAY | — | — | | col\_bit | BYTE\_ARRAY | UTF8 | StringType() | | col\_bit\_varying | BYTE\_ARRAY | UTF8 | StringType() | | col\_oid | INT32 | — | — | | col\_int\_array | BYTE\_ARRAY | — | — | --- # PostgreSQL → Parquet Datatypes conversion mapping when exporting from **PostgreSQL** (`--connectiontype pgsql`) to **Parquet** format. info [PostgreSQL COPY](/1.4/datatypes-conversion/postgresql-copy/parquet.md) (`--connectiontype pgcopy`) produces identical type mappings. The [ADBC connector](/1.4/datatypes-conversion/postgresql/adbc-parquet.md) (`--connectiontype adbc_pgsql`) does not. | | | | --------------- | ------------------ | | **Source** | PostgreSQL (pgsql) | | **Format** | Parquet | | **FastBCP** | 1.4.0.0 | | **Test Status** | PASS (Nullable) | ## Parquet Schema: testdatatypes\_nullable[​](#parquet-schema-testdatatypes_nullable "Direct link to Parquet Schema: testdatatypes_nullable") | name | physical\_type | converted\_type | logical\_type | | ---------------------- | ----------------------- | ----------------- | ---------------------------------------- | | col\_bigint | INT64 | INT\_64 | IntType(bitWidth=64, isSigned=1) | | col\_integer | INT32 | INT\_32 | IntType(bitWidth=32, isSigned=1) | | col\_smallint | INT32 | INT\_16 | IntType(bitWidth=16, isSigned=1) | | col\_boolean | BOOLEAN | — | — | | col\_numeric | INT64 | DECIMAL | DecimalType(scale=2, precision=18) | | col\_real | FLOAT | — | — | | col\_double\_precision | DOUBLE | — | — | | col\_money | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=4, precision=19) | | col\_date | INT32 | DATE | — | | col\_time | INT32 | TIME\_MILLIS | TimeType(isAdjustedToUTC=0, unit=MILLIS) | | col\_timestamp | INT64 | TIMESTAMP\_MILLIS | — | | col\_timestamptz | BYTE\_ARRAY | UTF8 | StringType() | | col\_interval | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | col\_char | BYTE\_ARRAY | UTF8 | StringType() | | col\_varchar | BYTE\_ARRAY | UTF8 | StringType() | | col\_text | BYTE\_ARRAY | UTF8 | StringType() | | col\_bytea | BYTE\_ARRAY | — | — | | col\_uuid | BYTE\_ARRAY | UTF8 | StringType() | | col\_json | BYTE\_ARRAY | UTF8 | StringType() | | col\_jsonb | BYTE\_ARRAY | — | — | | col\_xml | BYTE\_ARRAY | UTF8 | StringType() | | col\_inet | BYTE\_ARRAY | UTF8 | StringType() | | col\_cidr | BYTE\_ARRAY | UTF8 | StringType() | | col\_macaddr | BYTE\_ARRAY | UTF8 | StringType() | | col\_point | BYTE\_ARRAY | UTF8 | StringType() | | col\_line | BYTE\_ARRAY | UTF8 | StringType() | | col\_lseg | BYTE\_ARRAY | UTF8 | StringType() | | col\_box | BYTE\_ARRAY | UTF8 | StringType() | | col\_path | BYTE\_ARRAY | UTF8 | StringType() | | col\_polygon | BYTE\_ARRAY | UTF8 | StringType() | | col\_circle | BYTE\_ARRAY | UTF8 | StringType() | | col\_int4range | BYTE\_ARRAY | UTF8 | StringType() | | col\_int8range | BYTE\_ARRAY | UTF8 | StringType() | | col\_numrange | BYTE\_ARRAY | UTF8 | StringType() | | col\_tsrange | BYTE\_ARRAY | UTF8 | StringType() | | col\_tstzrange | BYTE\_ARRAY | UTF8 | StringType() | | col\_daterange | BYTE\_ARRAY | UTF8 | StringType() | | col\_bit | BYTE\_ARRAY | UTF8 | StringType() | | col\_bit\_varying | BYTE\_ARRAY | UTF8 | StringType() | | col\_oid | BYTE\_ARRAY | UTF8 | StringType() | | col\_int\_array | BYTE\_ARRAY | UTF8 | StringType() | --- # SAP HANA → Parquet Datatypes conversion mapping when exporting from **SAP HANA** (`--connectiontype hana`) to **Parquet** format. | | | | --------------- | --------------- | | **Source** | SAP HANA (hana) | | **Format** | Parquet | | **FastBCP** | 1.4.0.0 | | **Test Status** | PASS (Nullable) | ## Parquet Schema: testdatatypes\_nullable[​](#parquet-schema-testdatatypes_nullable "Direct link to Parquet Schema: testdatatypes_nullable") | name | physical\_type | converted\_type | logical\_type | | ----------------- | -------------- | ----------------- | ---------------------------------- | | COL\_TINYINT | INT32 | UINT\_8 | IntType(bitWidth=8, isSigned=0) | | COL\_SMALLINT | INT32 | INT\_16 | IntType(bitWidth=16, isSigned=1) | | COL\_INTEGER | INT32 | INT\_32 | IntType(bitWidth=32, isSigned=1) | | COL\_BIGINT | INT64 | INT\_64 | IntType(bitWidth=64, isSigned=1) | | COL\_DECIMAL | INT64 | DECIMAL | DecimalType(scale=2, precision=18) | | COL\_SMALLDECIMAL | INT64 | DECIMAL | DecimalType(scale=0, precision=16) | | COL\_REAL | FLOAT | — | — | | COL\_DOUBLE | DOUBLE | — | — | | COL\_FLOAT | DOUBLE | — | — | | COL\_BOOLEAN | BOOLEAN | — | — | | COL\_DATE | INT64 | TIMESTAMP\_MILLIS | — | | COL\_TIME | BYTE\_ARRAY | UTF8 | StringType() | | COL\_TIMESTAMP | INT64 | TIMESTAMP\_MILLIS | — | | COL\_SECONDDATE | INT64 | TIMESTAMP\_MILLIS | — | | COL\_CHAR | BYTE\_ARRAY | UTF8 | StringType() | | COL\_VARCHAR | BYTE\_ARRAY | UTF8 | StringType() | | COL\_NCHAR | BYTE\_ARRAY | UTF8 | StringType() | | COL\_NVARCHAR | BYTE\_ARRAY | UTF8 | StringType() | | COL\_ALPHANUM | BYTE\_ARRAY | UTF8 | StringType() | | COL\_CLOB | BYTE\_ARRAY | UTF8 | StringType() | | COL\_NCLOB | BYTE\_ARRAY | UTF8 | StringType() | | COL\_BLOB | BYTE\_ARRAY | — | — | | COL\_BINARY | BYTE\_ARRAY | — | — | | COL\_VARBINARY | BYTE\_ARRAY | — | — | | COL\_ST\_GEOMETRY | BYTE\_ARRAY | — | — | | COL\_ST\_POINT | BYTE\_ARRAY | — | — | | COL\_SHORTTEXT | BYTE\_ARRAY | UTF8 | StringType() | --- # Teradata → Parquet Datatypes conversion mapping when exporting from **Teradata** (`--connectiontype teradata`) to **Parquet** format. | | | | --------------- | ------------------- | | **Source** | Teradata (teradata) | | **Format** | Parquet | | **FastBCP** | 1.4.0.0 | | **Test Status** | PASS (Nullable) | ## Parquet Schema: testdatatypes\_nullable[​](#parquet-schema-testdatatypes_nullable "Direct link to Parquet Schema: testdatatypes_nullable") | name | physical\_type | converted\_type | logical\_type | | ------------------------ | ----------------------- | ----------------- | ---------------------------------------- | | col\_byteint | INT32 | INT\_16 | IntType(bitWidth=16, isSigned=1) | | col\_smallint | INT32 | INT\_16 | IntType(bitWidth=16, isSigned=1) | | col\_integer | INT32 | INT\_32 | IntType(bitWidth=32, isSigned=1) | | col\_bigint | INT64 | INT\_64 | IntType(bitWidth=64, isSigned=1) | | col\_decimal18\_2 | INT64 | DECIMAL | DecimalType(scale=2, precision=18) | | col\_float | DOUBLE | — | — | | col\_number | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=18, precision=38) | | col\_number18\_2 | INT64 | DECIMAL | DecimalType(scale=2, precision=18) | | col\_date | INT32 | DATE | — | | col\_time | INT64 | — | TimeType(isAdjustedToUTC=0, unit=MICROS) | | col\_timestamp | INT64 | TIMESTAMP\_MILLIS | — | | col\_timestamp\_tz | BYTE\_ARRAY | UTF8 | StringType() | | tdintervalyear | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | tdintervalyeartomonth | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | tdintervalmonth | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | tdintervalday | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | tdintervaldaytohour | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | tdintervaldaytominute | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | tdintervaldaytosecond | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | tdintervalhour | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | tdintervalhourtominute | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | tdintervalhourtosecond | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | tdintervalminute | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | tdintervalminutetosecond | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | tdintervalsecond | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | col\_real | DOUBLE | — | — | | col\_double\_precision | DOUBLE | — | — | | col\_char | BYTE\_ARRAY | UTF8 | StringType() | | col\_varchar | BYTE\_ARRAY | UTF8 | StringType() | | col\_clob | BYTE\_ARRAY | UTF8 | StringType() | | col\_byte | BYTE\_ARRAY | — | — | | col\_varbyte | BYTE\_ARRAY | — | — | | col\_blob | BYTE\_ARRAY | — | — | | col\_period\_date | BYTE\_ARRAY | UTF8 | StringType() | | col\_period\_timestamp | BYTE\_ARRAY | UTF8 | StringType() | | col\_json | BYTE\_ARRAY | UTF8 | StringType() | | col\_xml | BYTE\_ARRAY | UTF8 | StringType() | | col\_st\_geometry | BYTE\_ARRAY | UTF8 | StringType() | --- # Advanced Parameters This section covers advanced configuration options for FastBCP. ## Run ID[​](#run-id "Direct link to Run ID") The Run ID parameter `--runid` is a unique identifier for the current export operation. It can be used for tracking, logging, and monitoring purposes. Information If not specified, FastBCP will generate a unique Run ID automatically. Tips If possible, inject the RunId provided by the caller (e.g., SSIS, Airflow, or any scheduler that supports a run identifier). This will greatly facilitate log correlation and troubleshooting. ``` ./FastBCP \ ... --runid "export-2024-01-09-001" \ ... ``` **Syntax:** * Long form only: `--runid ""` ## Log Level[​](#log-level "Direct link to Log Level") The Log Level parameter `--loglevel` controls the verbosity of logging output during export operations. **Available values:** * `Information` (default): Standard logging with key operation details * `Debug`: Verbose logging with detailed diagnostic information ``` ./FastBCP \ ... --loglevel "Debug" \ ... ``` **Syntax:** * Long form only: `--loglevel ""` note If a settings file is specified with `--settingsfile`, the log level defined in the settings file takes precedence unless overridden by the command-line parameter. Information See [Logging Overview](/1.4/documentation/logging/Overview.md) for detailed information about logging configuration and output. ## Settings File[​](#settings-file "Direct link to Settings File") The Settings File parameter `--settingsfile` allows you to store all FastBCP parameters in a configuration file, making it easier to manage complex exports and reuse configurations. ``` ./FastBCP \ ... --settingsfile "/path/to/config/export-config.json" \ ... ``` **Syntax:** * Long form only: `--settingsfile ""` Information See [Logging Overview](/1.4/documentation/logging/Overview.md) for examples of settings file configuration. ## Config File[​](#config-file "Direct link to Config File") The Config File parameter `--config` allows you to define all FastBCP parameters in a YAML configuration file. This provides a more structured and readable way to manage export configurations compared to JSON settings files. * Windows * Linux ``` .\FastBCP.exe --config samples\sample_mssql_to_csv.yaml ``` ``` ./FastBCP --config samples/sample_mssql_to_csv.yaml ``` **Syntax:** * Long form only: `--config ""` ### YAML Configuration Example[​](#yaml-configuration-example "Direct link to YAML Configuration Example") Here's a complete example of a YAML configuration file: ``` # FastBCP – MSSQL to CSV using RangeId parallel method # # Usage: # .\FastBCP.exe --config samples\sample_mssql_to_csv.yaml connection: type: mssql server: localhost database: tpch10_collation_bin2 trusted: true source: schema: dbo table: orders output: file: "mssql_orders_{startdate}.csv" directory: 'D:\temp\{database}\{schema}\{table}\full\' delimiter: "|" decimal_separator: "." date_format: "yyyy-MM-dd HH:mm:ss" encoding: UTF-8 performance: method: RangeId degree: -2 distribute_key_column: o_orderkey merge: false logging: run_id: mssql_to_csv_parallel-2_rangeid ``` Benefits of YAML Configuration * **Structured and readable**: YAML format is more human-friendly than JSON * **Comments support**: Add documentation directly in your configuration files * **Reusable configurations**: Version control your export settings * **Simplified command-line**: Reduce complex exports to a single `--config` parameter ## Traceparent[​](#traceparent "Direct link to Traceparent") The `--traceparent` parameter accepts a [W3C Trace Context](https://www.w3.org/TR/trace-context/) traceparent identifier from an external caller. This enables distributed trace correlation between FastBCP and upstream systems such as orchestrators, APIs, or CI/CD pipelines. Information See [OpenTelemetry](/1.4/documentation/logging/OpenTelemetry.md) for detailed information about configuring OpenTelemetry tracing and log export. ``` ./FastBCP \ ... --traceparent "00-abcdef1234567890abcdef1234567890-1234567890abcdef-01" \ ... ``` **Syntax:** * Long form only: `--traceparent ""` ## No Banner[​](#no-banner "Direct link to No Banner") Disable the FastBCP banner display in the command line output. This is useful for scripting or when you want cleaner output in automated processes. **Example:** ``` ./FastBCP \ ... --nobanner \ ... ``` **Syntax:** * Long form: `--nobanner` Clean Output Using `--nobanner` is recommended when running FastBCP 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 ``` .\FastBCP.exe ` --connectiontype "oraodp" ` --server "localhost:1521/OraService" ` --database "tpch" ` --user "FastUser" ` --password "FastPassword" ` --sourceschema "TPCH" ` --sourcetable "ORDERS" ` --directory "D:\temp" ` --fileoutput "orders.xlsx" ` --encoding "UTF-8" ` --parallelmethod "Physical" ` --paralleldegree 7 ` --merge false ` --loglevel "Debug" ` --runid "oracle_to_excel_parallel_physical" ` --settingsfile "C:\config\oracle-export.json" ` --nobanner ``` ``` ./FastBCP \ --connectiontype "oraodp" \ --server "localhost:1521/OraService" \ --database "tpch" \ --user "FastUser" \ --password "FastPassword" \ --sourceschema "TPCH" \ --sourcetable "ORDERS" \ --directory "/temp" \ --fileoutput "orders.xlsx" \ --encoding "UTF-8" \ --parallelmethod "Physical" \ --paralleldegree 7 \ --merge false \ --loglevel "Debug" \ --runid "oracle_to_excel_parallel_physical" \ --settingsfile "/config/oracle-export.json" \ --nobanner ``` This example: * Connects to an Oracle database using the Physical parallel method (resolved to Rowid on Oracle) * Exports ORDERS table to Excel format with UTF-8 encoding * Uses 7 parallel threads with separate files (merge=false) * Enables Debug logging for detailed diagnostics * Uses a custom Run ID for tracking * Loads additional configuration from a settings file * Disables the banner for cleaner output --- # Authentication FastBCP supports two types of authentication methods depending on your database platform. ## Authentication Methods[​](#authentication-methods "Direct link to Authentication Methods") ### 1. Trusted Connection[​](#1-trusted-connection "Direct link to 1. Trusted Connection") Uses the current Windows user's credentials or the operating system authentication if allowed by the RDBMS. ``` .\FastBCP.exe ` ... --trusted ` ... ``` **Syntax:** * Short form: `-A` * Long form: `--trusted` Warning This method is only available if your RDBMS supports trusted/integrated authentication (e.g., SQL Server with Windows Authentication). ### 2. SQL Login with Username and Password[​](#2-sql-login-with-username-and-password "Direct link to 2. SQL Login with Username and Password") Standard database authentication with explicit credentials. ``` ./FastBCP ` ... --user "myuser" ` --password "mypassword" ` ... ``` **Syntax:** * Username: `-U "username"` or `--user "username"` * Password: `-X "password"` or `--password "password"` ### Alternative: Connection String Parameter[​](#alternative-connection-string-parameter "Direct link to Alternative: Connection String Parameter") You can also use the `--sourceconnectstring` parameter where you pass the user and password directly in the connection string. This parameter will be covered in detail in the [Connection Parameters](/1.4/documentation/cli/connection_parameters.md#source-connection-string) section. Password Security in Logs All passwords passed either through the `--password` parameter or within the `--sourceconnectstring` parameter 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 FASTBCP\_USER and FASTBCP\_PASSWORD for exemple or store the password in an encrypted file. Up to you to decrypt the file and it’s content before using it in a shell variable that will be used with FastBCP. --- # Cloud Options FastBCP supports direct exports to cloud storage platforms: AWS S3, Azure Blob Storage, Azure Data Lake Gen2, and Google Cloud Storage. For detailed cloud authentication setup and configuration, see the [Cloud Connectivity](/1.4/documentation/cloud-connectivity/overview.md) documentation. note FastBCP will use multi-part uploads for all cloud provider Warning Since FastBCP 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**. ## Supported Cloud Platforms[​](#supported-cloud-platforms "Direct link to Supported Cloud Platforms") To export data to a cloud storage service, use the URI scheme specific to your target destination with the `--directory` value | Platform | URI Scheme | Example | | ------------------------ | ------------ | ----------------------------------------------------------- | | **AWS S3** | `s3://` | `s3://my-bucket/data/` | | **Azure Blob** | `abs://` | `abs://myaccount.blob.core.windows.net/mycontainer/mydir/` | | **Azure Data Lake Gen2** | `abfss://` | `abfss://myaccount.dfs.core.windows.net/mycontainer/mydir/` | | **Google Cloud Storage** | `gs://` | `gs://my-bucket/data/` | | **S3-Compatible** | `s3://` | `s3://mybucket/export/` (MinIO, OVH, etc.) | | **OneLake** | `onelake://` | `onelake://MyWorSpace/MyLakeHouse/MyDir/` | ## Cloud Profile[​](#cloud-profile "Direct link to Cloud Profile") You can use the `--cloudprofile` parameter to specify which cloud credentials profile to use. ``` ./FastBCP \ ... --directory "s3://my-bucket/exports" \ --fileoutput "orders.parquet" \ --cloudprofile "production" \ ... ``` **Syntax:** * Long form: `--cloudprofile ` --- # Connection Parameters FastBCP requires connection information to access your database. This page covers all connection-related parameters. ## Connection Type[​](#connection-type "Direct link to Connection Type") Specify the type of database connection driver to use. This parameter determines how FastBCP connects to your database. ``` ./FastBCP \ ... --connectiontype mssql \ ... ``` **Syntax:** * Short form: `-C "connection_type"` * Long form: `--connectiontype "connection_type"` **Available Connection Types:** | Connection Type | Description | | --------------- | ------------------------------------------------------------------------------------------------------- | | `adbc_mssql` | Microsoft SQL Server via ADBC (Arpe.io ADBC FastDriver) - 2x faster for Parquet exports | | `adbc_pgsql` | PostgreSQL via ADBC (Arpe.io ADBC FastDriver) - ultra-fast Parquet exports | | `adbc_oracle` | Oracle via ADBC (Arpe.io ADBC FastDriver) - ultra-fast Parquet exports | | `adbc_netezza` | Netezza / IBM NPS via ADBC (embedded ArpeNetezza driver) - no NZdotNET needed, works with IBM Cloud NPS | | `adbc_teradata` | Teradata via ADBC (embedded ArpeTeradata driver) - TLS logon needs no Teradata client software | | `clickhouse` | ClickHouse database | | `hana` | SAP HANA database | | `mssql` | Microsoft SQL Server (default) | | `mysql` | MySQL/MariaDB database | | `nzsql` | IBM Netezza | | `odbc` | Generic ODBC connection | | `oledb` | Generic OLE DB connection | | `oraodp` | Oracle Data Provider | | `pgcopy` | PostgreSQL with COPY protocol | | `pgsql` | PostgreSQL standard connection | | `teradata` | Teradata database | Platform availability The ADBC FastDriver connectors (`adbc_mssql`, `adbc_pgsql`, `adbc_oracle`, `adbc_netezza`, `adbc_teradata`) are available on **Windows x64** and **Linux x64** only. They are **not** supported on **Linux ARM64**. Parquet-only output ADBC connectors (`adbc_mssql`, `adbc_pgsql`, `adbc_oracle`, `adbc_netezza`, `adbc_teradata`) only support exporting to **Parquet** format. No other output format is supported with these connection types. ADBC end to end Since FastBCP 1.3, the ADBC connectors run fully on their ADBC driver: the metadata and planning step (row counts, column types, `Ntile`, `Random`, `Timepartition`, `DBPartition`, …) uses the same driver and the same connection string as the data step. No SqlClient, Npgsql, ODP.NET or NZdotNET is involved. ## DSN (Data Source Name)[​](#dsn-data-source-name "Direct link to DSN (Data Source Name)") If you have chosen an ODBC connection type, you must define the DSN with the `-N` or `--dsn` parameter, or alternatively define a connection string using `-g` or `--sourceconnectstring`. ``` ./FastBCP \ ... --connectiontype odbc \ --dsn "MyODBCDataSource" \ ... ``` **Syntax:** * Short form: `-N "DSN_name"` * Long form: `--dsn "DSN_name"` ## Provider[​](#provider "Direct link to Provider") If you have chosen an OLEDB connection type, you must define the OLEDB provider with the `-P` or `--provider` parameter. ``` ./FastBCP \ ... --connectiontype oledb \ --provider MSOLEDBSQL \ ... ``` ``` ./FastBCP \ ... --connectiontype oledb \ --provider NZOLEDB \ ... ``` **Syntax:** * Short form: `-P "provider_name"` * Long form: `--provider "provider_name"` ## Server[​](#server "Direct link to Server") Except if you have defined a connection string (`-g` or `--sourceconnectstring`), you must define a server (or could also be a TNS entry for Oracle). **Syntax:** * Short form: `-S "server"` * Long form: `--server "server"` ### Server Format Examples[​](#server-format-examples "Direct link to Server Format Examples") The server parameter accepts different formats depending on your database: **IP address or DNS name:** ``` ./FastBCP \ ... --server "myserver.mydomain.com" \ ... ``` **IP address or DNS name with port number:** ``` ./FastBCP \ ... --server "myserver.mydomain.com:2433" \ ... ``` or ``` ./FastBCP \ ... --server "myserver.mydomain.com,2433" \ ... ``` **IP address or DNS name with named instance:** ``` ./FastBCP \ ... --server "myserver.mydomain.com\myinstance" \ ... ``` **For Oracle - Easy Connect string:** ``` ./FastBCP \ ... --server "myserver.mydomain.com:1521/myinstance" \ ... ``` ## Trusted or User & Password[​](#trusted-or-user--password "Direct link to Trusted or User & Password") ### Trusted[​](#trusted "Direct link to Trusted") You can used a trusted (Windows or Kerberos Authentication) using the `--trusted` switch parameter. ``` ./FastBCP \ ... --server "myserver.mydomain.com\myinstance \ --trusted \ --database MySourceDB" \ ... ``` ### User and Password[​](#user-and-password "Direct link to User and Password") You can also provide a user and password the `--user` and `--password` can be used like this ``` ./FastBCP \ ... --server "myserver.mydomain.com\myinstance \ --user "FastUser" \ --password "FastPassword" \ --database MySourceDB" \ ... ``` ## 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 database. This connection string will override any other connection parameters and can be used if the other authentication mode are not enougth for your case You can use the connection string for any connection type. The connection string must be enclosed in double quotes. **Example:** ``` ./FastBCP \ ... --sourceconnectstring "Server=myserver;Database=mydb;User ID=FastUser;Password=FastPassword;Encrypt=True;TrustServerCertificate=True" ... ``` **Syntax:** * Short form: `-g "connection_string"` * Long form: `--sourceconnectstring "connection_string"` Passwords in logs Passwords are masked in logs and telemetry, including quoted passwords containing `;` (e.g. `Password="p;w=1"`). ### Connection Strings with ADBC Connectors[​](#connection-strings-with-adbc-connectors "Direct link to Connection Strings with ADBC Connectors") With the ADBC connection types (`adbc_mssql`, `adbc_pgsql`, `adbc_oracle`, `adbc_netezza`, `adbc_teradata`), `--sourceconnectstring` accepts: * The **native syntax** of the database (ADO.NET-style `Key=Value;` pairs), translated to the driver keys * Explicit **`adbc.*` / `arpeio.*` keys**, which win over translated keys * A **whole-connection** `uri` / `adbc..connection_string` Native keys with no driver equivalent (e.g. `Pooling=false`) are dropped with a warning. With a whole-connection `uri` / `connection_string`, native keys are dropped with a warning: put them inside the URI / connection string instead. A `Driver=` path in `--sourceconnectstring` is used for both the metadata and the data step. #### adbc\_netezza[​](#adbc_netezza "Direct link to adbc_netezza") Keys do not need the `adbc.arpenz.` prefix. All of the following are accepted: | Kind | Keys | | ----------------------- | ----------------------------------------------------------------------------------------------------------- | | Friendly / ADO.NET keys | `Server`, `Host`, `host:port`, `Port`, `Database`, `User ID`, `Password`, `SSL Mode`, `Application Name`, … | | Plain driver keys | `sslmode`, `tls_min_version`, `char_encoding`, `login_timeout`, … | | Whole connection | `uri`, `connection_string` | Keys the driver does not support (e.g. `propagate`, `Pooling`) are ignored, with a single warning. `Application Name` defaults to `FastBCP`. ``` ./FastBCP \ --connectiontype adbc_netezza \ --sourceconnectstring "Server=nps-host;Port=5480;Database=SALES;User ID=admin;Password=FastPassword;SSL Mode=require" \ ... ``` NPS 7.x NPS 7.x servers only offer TLS 1.0/1.1. Add `tls_min_version=1.0` to the connection string to connect to them. #### adbc\_pgsql[​](#adbc_pgsql "Direct link to adbc_pgsql") Like `-C pgsql`, `-C adbc_pgsql` honours `PGUSER`, `PGPASSWORD`, `PGPASSFILE` / `~/.pgpass` and `PGSSLROOTCERT` when `-U` / `-X` / `-g` do not provide them. A `NaN` in a `NUMERIC` column fails the read. Add `adbc.arpepgsql.numeric_special=null` to `--sourceconnectstring` to read it as `NULL` instead. #### adbc\_oracle[​](#adbc_oracle "Direct link to adbc_oracle") Like `-C oraodp`, `-C adbc_oracle` resolves TNS aliases through `tnsnames.ora` (looked up in `TNS_ADMIN`, then `$ORACLE_HOME/network/admin`), so `--server` can be a TNS alias. Network encryption and data integrity are negotiated with `encryption=accepted` and `data_integrity=accepted`, so the server decides, as with `-C oraodp`. Use the `FASTBCP_ADBC_ENCRYPTION` / `FASTBCP_ADBC_DATA_INTEGRITY` environment variables or explicit keys to override this. #### adbc\_teradata[​](#adbc_teradata "Direct link to adbc_teradata") `-C adbc_teradata` reads Teradata through the embedded **ArpeTeradata** ADBC driver, for both the metadata step and the data step. It uses the Teradata SQL dialect, like `-C teradata`. **Connection:** * `--server host[:port]` (legacy port, default `1025`), `--user`, `--password` and an optional `--database`, or a `--sourceconnectstring` in the Teradata provider spelling. * Keys translated from `--sourceconnectstring`: `Host` / `Server` / `Data Source`, `Port` / `DBS Port` / `Port Number`, `Database` / `Initial Catalog`, `User Id` / `User Name` / `UID`, `Password` / `PWD`, `SSL Mode`, `HTTPS Port`, `SSL CA`, `SSL CA Path`, `TMODE`, `Login Timeout` / `Connect Timeout` / `Connection Timeout`, `Query Timeout`, `TTU Path`. Explicit `adbc.arpeteradata.*` keys are passed as is and win. * Trusted authentication (`--trusted` / `-A`) is **not supported**: FastBCP stops with `-C adbc_teradata does not support trusted (-A) authentication: give -U and -X`. **Logon and Teradata Tools and Utilities (TTU):** * The default logon (`sslmode=prefer`) uses TLS on the HTTPS port (443) and needs no Teradata client software. * When the server has no TLS, the driver falls back to the legacy port (1025). `sslmode=disable` in `--sourceconnectstring` always uses the legacy port. The legacy-port logon needs the customer's TTU (CLIv2). * **Linux:** FastBCP looks for TTU in the [`FASTBCP_TTU_PATH`](/1.4/documentation/environment-variables/fastbcp-ttu-path.md) environment variable, then in a `ttu` or `TeradataToolsAndUtilitiesBase` directory next to the FastBCP binary. The library directory found is passed to the driver (`adbc.arpeteradata.ttu_path`) and logged. When nothing is found, the driver searches itself (`ARPETERADATA_TTU_PATH`, `/opt/teradata/client`, the system library path). * **Windows:** FastBCP passes nothing; the driver finds `wincli32.dll` itself (`ARPETERADATA_TTU_PATH`, its own directory, the registered TTU installation). See [FASTBCP\_TTU\_PATH](/1.4/documentation/environment-variables/fastbcp-ttu-path.md) for the TTU folder layouts accepted on Linux and how to prepare Teradata's TTU download without installing it. ``` ./FastBCP \ --connectiontype adbc_teradata \ --server "td-host" \ --user "FastUser" \ --password "FastPassword" \ --database "TPCH" \ ... ``` ## Database[​](#database "Direct link to Database") Optionally define a source database. **Example:** ``` ./FastBCP \ ... --database "AdventureWorks" \ ... ``` **Syntax:** * Short form: `-I "database_name"` * Long form: `--database "database_name"` ## Application Intent[​](#application-intent "Direct link to Application Intent") Specifies the application workload type when connecting to SQL Server. This parameter is only applicable for SQL Server (`mssql`, `adbc_mssql`) and OLEDB (`oledb`) connection types. With `adbc_mssql`, an `ApplicationIntent` key in `--sourceconnectstring` is also passed to the driver. **Syntax:** * Long form: `--applicationintent "ReadOnly|ReadWrite"` **Values:** * `ReadOnly` (default) - Declares the read-only workload type when connecting to a read-only replica in an Always On availability group * `ReadWrite` - Declares a read-write workload type (standard connection) **Example (Read-Only):** ``` ./FastBCP \ --connectiontype mssql \ --server "myserver.mydomain.com" \ --applicationintent ReadOnly \ --database "AdventureWorks" \ ... ``` **Example (Read-Write):** ``` ./FastBCP \ --connectiontype mssql \ --server "myserver.mydomain.com" \ --applicationintent ReadWrite \ --database "AdventureWorks" \ ... ``` info When using `ReadOnly`, the connection will be routed to a read-only replica if available in an Always On availability group configuration. This is useful for offloading reporting and export workloads from the primary replica. --- # CSV Formatting When exporting to CSV format (`.csv` extension), FastBCP provides extensive formatting options. ## Delimiter[​](#delimiter "Direct link to Delimiter") Use the `-d` or `--delimiter` parameter to specify the character(s) used to separate fields. ``` ./FastBCP \ ... --fileoutput "data.csv" \ --delimiter "," \ ... ``` **Syntax:** * Short form: `-d "delimiter"` * Long form: `--delimiter "delimiter"` **Default:** `,` (comma) ### Common Delimiters[​](#common-delimiters "Direct link to Common Delimiters") * Comma (CSV) * Tab (TSV) * Pipe * Semicolon ``` --delimiter "," ``` ``` --delimiter "\t" ``` ``` --delimiter "|" ``` ``` --delimiter ";" ``` ## Use Quotes[​](#use-quotes "Direct link to Use Quotes") Use the `-t` or `--quotes` switch to enclose string fields in double quotes. ``` ./FastBCP \ ... --fileoutput "products.csv" \ --quotes \ ... ``` **Syntax:** * Short form: `-t` * Long form: `--quotes` **Default:** Without quotes * Without --quotes * With --quotes ``` ProductID,ProductName,Description,Price 1,Widget A,Small widget,19.99 2,Widget B,Large widget,29.99 ``` ``` "ProductID","ProductName","Description","Price" "1","Widget A","Small widget","19.99" "2","Widget B","Large widget","29.99" ``` Information When `--quotes`, any double quotes (`"`) in the data are escaped with backslash (`\"`). ## Date Format[​](#date-format "Direct link to Date Format") Use the `-f` or `--dateformat` parameter to specify how dates and timestamps are formatted. ``` ./FastBCP \ ... --fileoutput "orders.csv" --dateformat "yyyy-MM-dd HH:mm:ss" \ ... ``` **Syntax:** * Short form: `-f "format"` * Long form: `--dateformat "format"` **Default:** `yyyy-MM-dd HH:mm:sszzz` Auto-adaptive formatting The date format is auto-adaptive based on the column type: * **Date-only** columns will always output as `yyyy-MM-dd` regardless of the format string * **Timestamp/DateTime** columns will output as `yyyy-MM-dd HH:mm:ss` even if a timezone token (`zzz`) is present in the format string * **DateTimeOffset** columns will include the timezone offset as specified ### Format Codes[​](#format-codes "Direct link to Format Codes") | Code | Description | Example | | ------ | ---------------- | -------- | | `yyyy` | 4-digit year | `2026` | | `MM` | Month (01-12) | `01` | | `dd` | Day (01-31) | `07` | | `HH` | Hour 24h (00-23) | `14` | | `mm` | Minute (00-59) | `30` | | `ss` | Second (00-59) | `22` | | `zzz` | UTC offset | `+02:00` | ## Decimal Separator[​](#decimal-separator "Direct link to Decimal Separator") Use the `-n` or `--decimalseparator` parameter to specify the decimal separator for numeric values. ``` ./FastBCP \ ... --fileoutput "products.csv" --decimalseparator "," ... ``` **Syntax:** * Short form: `-n "separator"` * Long form: `--decimalseparator "separator"` **Default:** `.` (period/dot) ## No Header[​](#no-header "Direct link to No Header") Use the `-h` or `--noheader` parameter to exclude column headers from the output. ``` ./FastBCP \ ... --fileoutput "customers.csv" \ --noheader \ ... ``` **Syntax:** * Short form: `-h` * Long form: `--noheader` - Without --noheader (default) - With --noheader ``` CustomerID,CustomerName,Email 1,John Doe,john@example.com 2,Jane Smith,jane@example.com ``` ``` 1,John Doe,john@example.com 2,Jane Smith,jane@example.com ``` ## Boolean Format[​](#boolean-format "Direct link to Boolean Format") Use the `-b` or `--boolformat` parameter to specify how boolean values are represented. ``` ./FastBCP \ ... --fileoutput "products.csv" \ --boolformat "1/0" \ ... ``` **Syntax:** * Short form: `-b "format"` * Long form: `--boolformat "format"` **Default:** `True/False` **Options:** * `true/false` * `True/False` (default) * `t/f` * `1/0` * `yes/no` * `y/n` **With `--boolformat "true/false"` (default):** ``` ProductID,ProductName,InStock,Discontinued 1,Widget A,true,false 2,Widget B,false,true ``` **With `--boolformat "1/0"`:** ``` ProductID,ProductName,InStock,Discontinued 1,Widget A,1,0 2,Widget B,0,1 ``` **With `--boolformat "yes/no"`:** ``` ProductID,ProductName,InStock,Discontinued 1,Widget A,yes,no 2,Widget B,no,yes ``` ## Complete Example[​](#complete-example "Direct link to Complete Example") * Windows * Linux ``` .\FastBCP.exe ` --connectiontype mssql ` --server "localhost" ` --database "AdventureWorks" ` --trusted ` --query "SELECT OrderID, OrderDate, CustomerName, TotalAmount, IsShipped FROM Sales.Orders WHERE OrderDate >= '2024-01-01'" ` --directory "C:\exports\sales" ` --fileoutput "orders_{startdate}.csv" ` --delimiter "," ` --quotes ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --decimalseparator "." ` --boolformat "1/0" ` --encoding "UTF-8" ``` ``` ./FastBCP \ --connectiontype mssql \ --server "localhost" \ --database "AdventureWorks" \ --trusted \ --query "SELECT OrderID, OrderDate, CustomerName, TotalAmount, IsShipped FROM Sales.Orders WHERE OrderDate >= '2024-01-01'" \ --directory "/exports/sales" \ --fileoutput "orders_{startdate}.csv" \ --delimiter "," \ --quotes \ --dateformat "yyyy-MM-dd HH:mm:ss" \ --decimalseparator "." \ --boolformat "1/0" \ --encoding "UTF-8" ``` **Output (orders\_20260107.csv):** ``` "OrderID","OrderDate","CustomerName","TotalAmount","IsShipped" "1001","2026-01-05 10:30:00","John Doe","299.99","1" "1002","2026-01-05 11:15:00","Jane Smith","149.50","0" "1003","2026-01-06 09:20:00","Bob Johnson","599.00","1" ``` tip For Excel compatibility, use `.xlsx` format instead: `--fileoutput "data.xlsx"` --- # License Configure how FastBCP 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 FastBCP license. By default, FastBCP will try to use the license file named `FastBCP.lic` in the same directory as the FastBCP executable. You can specify a custom license file using the `--license` parameter. ### License Sources[​](#license-sources "Direct link to License Sources") FastBCP 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 ``` .\FastBCP.exe ` ... --license "C:\licenses\FastBCP.lic" ` ... ``` ``` ./FastBCP \ ... --license "/path/to/licenses/FastBCP.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 ``` .\FastBCP.exe ` ... --license "https://licenseserve.yourdomain.lan/fastbcp.lic" ` ... ``` ``` ./FastBCP \ ... --license "https://licenseserve.yourdomain.lan/fastbcp.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:FASTBCP_LICENSE = "LICENSE_CONTENT_HERE" .\FastBCP.exe ` ... --license $env:FASTBCP_LICENSE ` ... # Using variable $license = Get-Content "C:\licenses\FastBCP.lic" -Raw .\FastBCP.exe ` ... --license $license ` ... ``` ``` # Using environment variable export FASTBCP_LICENSE="LICENSE_CONTENT_HERE" ./FastBCP \ ... --license "$FASTBCP_LICENSE" \ ... # Using variable license=$(cat /path/to/licenses/FastBCP.lic) ./FastBCP \ ... --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 parallel export: * Windows * Linux ``` .\FastBCP.exe ` --connectiontype pgsql ` --server "localhost:15432" ` --database "tpch10" ` --user "FastUser" ` --password "FastPassword" ` --query "SELECT * FROM dbo.orders" ` --directory "D:\temp" ` --fileoutput "pgsql_orders.parquet" ` --parallelmethod DataDriven ` --distributekeycolumn "YEAR(o_orderdate)" ` --paralleldegree 7 ` --merge false ` --runid "pgsql_to_parquet_parallel_datadriven" ` --license "//SharedUnc/licenses/fastbcp/fastbcp.lic" ``` ``` ./FastBCP \ --connectiontype pgsql \ --server "localhost:15432" \ --database "tpch10" \ --user "FastUser" \ --password "FastPassword" \ --query "SELECT * FROM dbo.orders" \ --directory "/temp" \ --fileoutput "pgsql_orders.parquet" \ --parallelmethod DataDriven \ --distributekeycolumn "YEAR(o_orderdate)" \ --paralleldegree 7 \ --merge false \ --runid "pgsql_to_parquet_parallel_datadriven" \ --license "//SharedUnc/licenses/fastbcp/fastbcp.lic" ``` This example: * Retrieves the license from a remote unc path * Connects to a PostgreSQL database * Exports orders data using DataDriven parallel method with 7 threads * Uses a YEAR expression on the distribute key column * Keeps distributed files separate (merge=false) --- # Output Info Configure where and how FastBCP saves exported data. ## Directory[​](#directory "Direct link to Directory") Use the `-D` or `--directory` parameter to specify where the output file(s) will be saved. ### Local Paths[​](#local-paths "Direct link to Local Paths") * Windows * Linux ``` .\FastBCP.exe \ ... --directory "C:\exports\sales\orders" \ ... ``` ``` ./FastBCP \ ... --directory "/exports/sales/orders" \ ... ``` ### UNC Paths[​](#unc-paths "Direct link to UNC Paths") For Windows network shares, you can use UNC paths: ``` .\FastBCP.exe \ ... --directory "\\server\share\exports\orders" \ ... ``` ### Cloud Paths[​](#cloud-paths "Direct link to Cloud Paths") FastBCP supports direct export to cloud storage: * AWS S3 * Azure Blob * Azure Data Lake Gen2 * Google Cloud Storage * S3-Compatible (MinIO, OVH) * OneLake ``` ./FastBCP \ ... --directory "s3://my-bucket/exports/orders" \ ... ``` ``` ./FastBCP \ ... --directory "abs://mystorageaccount.blob.core.windows.net/container/path" \ ... ``` ``` ./FastBCP \ ... --directory "abfss://mystorageaccount.dfs.core.windows.net/container/path/to/data" \ ... ``` ``` ./FastBCP \ ... --directory "gs://my-bucket/exports/orders" \ ... ``` ``` ./FastBCP \ ... --directory "s3://my-bucket/exports" \ ... ``` ``` ./FastBCP \ ... --directory "onelake://myworkspace.dfs.core.windows.net/lakehouse/path/to/data" \ ... ``` Information See [Cloud Options](/1.4/documentation/cli/cloud_options.md) for authentication and configuration details. **Syntax:** * Short form: `-D "path"` * Long form: `--directory "path"` ## Output File[​](#output-file "Direct link to Output File") Use the `-o` or `--fileoutput` parameter to specify the name of the output file. The file extension determines the output format. ``` ./FastBCP \ ... --fileoutput "orders.parquet" \ ... ``` **Syntax:** * Short form: `-o "filename"` * Long form: `--fileoutput "filename"` ### Supported Formats[​](#supported-formats "Direct link to Supported Formats") | Extension | Format | Description | | ---------- | ------------ | --------------------------------------------------- | | `.parquet` | Parquet | Columnar, compressed (recommended) | | `.csv` | CSV | Delimiter-separated values | | `.tsv` | TSV | Tab-separated values | | `.json` | JSON | JavaScript Object Notation | | `.bson` | BSON | Binary JSON | | `.xlsx` | Excel | Microsoft Excel format | | `.bin` | Binary | PostgreSQL COPY binary format | | `.csv.gz` | CSV Gzipped | Delimiter-separated values and compressed with Gzip | | `.tsv.gz` | TSV Gzipped | Tab delimited values and compressed with Gzip | | `.json.gz` | JSON Gzipped | JavaScript Object Notation with Gzip | ## Tokens[​](#tokens "Direct link to Tokens") Use tokens in `--directory` and `--fileoutput` parameters for dynamic paths and filenames. ``` ./FastBCP \ ... --directory "/exports/{sourcedatabase}/{sourceschema}" \ --fileoutput "{sourcetable}_{startdate}.parquet" \ ... ``` **Syntax:** Tokens are enclosed in curly braces `{token_name}` ### Available Tokens[​](#available-tokens "Direct link to Available Tokens") | Token | Description | Example Value | | ------------------------- | ---------------------------------- | ------------------------------------ | | `{sourcedatabase}` | Value from `--database` | `AdventureWorks` | | `{sourceschema}` | Value from `--sourceschema` | `Sales` | | `{sourcetable}` | Value from `--sourcetable` | `Orders` | | `{starttimestamp}` | Job start (yyyyMMddHHmmss) | `20260107143022` | | `{starttimestamp:FORMAT}` | Custom timestamp format | [See below](#timestamp-format-codes) | | `{startdate}` | Job start date (yyyyMMdd) | `20260107` | | `{starttime}` | Job start time (HHmmss) | `143022` | | `{starthour}` | Job start hour (HH) | `14` | | `{user}` | Username (from `--user` or system) | `dbuser` | | `{filetype}` | Output format extension | `parquet` | | `{datadrivencolumn}` | Data-driven split value | Varies | ### Timestamp Format Codes[​](#timestamp-format-codes "Direct link to Timestamp Format Codes") Use `{starttimestamp:FORMAT}` with custom format: | Format | Description | Example | | ------ | ---------------- | ------- | | `yyyy` | 4-digit year | `2026` | | `yy` | 2-digit year | `26` | | `MM` | Month (01-12) | `01` | | `dd` | Day (01-31) | `07` | | `HH` | Hour 24h (00-23) | `14` | | `mm` | Minute (00-59) | `30` | | `ss` | Second (00-59) | `22` | **Examples:** ``` # yyyyMMdd format ./FastBCP \ ... --fileoutput "orders_{starttimestamp:yyyyMMdd}.parquet" \ ... # yyyy-MM-dd format ./FastBCP \ ... --fileoutput "orders_{starttimestamp:yyyy-MM-dd}.parquet" \ ... # yyyyMMddHH format (hourly) ./FastBCP \ ... --fileoutput "logs_{starttimestamp:yyyyMMddHH}.parquet" \ ... ``` ## Timestamped Output[​](#timestamped-output "Direct link to Timestamped Output") Use the `-x` or `--timestamped` parameter to automatically add a timestamp to the filename. ``` ./FastBCP \ ... --fileoutput "orders.parquet" \ --timestamped \ ... ``` **Syntax:** * Short form: `-x` * Long form: `--timestamped` tip `--timestamped` automatically appends `_yyyyMMddHHmmss` to the filename. For more control over format and placement, use timestamp tokens instead. ## Encoding[​](#encoding "Direct link to Encoding") Use the `-e` or `--encoding` parameter to specify character encoding for text formats (CSV, JSON, TSV). ``` ./FastBCP \ ... --fileoutput "orders.csv" \ --encoding "UTF-8" \ ... ``` **Syntax:** * Short form: `-e "encoding"` * Long form: `--encoding "encoding"` **Default:** `UTF-8` note Encoding is not applicable to Parquet files (they use UTF-8 internally). --- # Parallel Parameters FastBCP 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 ``` .\FastBCP.exe ` ... --parallelmethod Ntile ` ... ``` ``` ./FastBCP \ ... --parallelmethod Ntile \ ... ``` **Syntax:** * Short form: `-m ` * Long form: `--parallelmethod ` ### Methods Comparison[​](#methods-comparison "Direct link to Methods Comparison") | Method | Parallel | Needs Distributed Column | Database Source Type | | ---------------------------- | -------- | ------------------------ | --------------------------------------------------------------------------------- | | `None` | | | Any | | `Random` | | | Any | | `DataDriven` | | | Any | | `RangeId` | | | Any | | `Ntile` | | | Any | | `Physical` | | | PostgreSQL, Oracle, SQL Server, Netezza (see [Physical](#physical-method)) | | `Ctid` *(deprecated)* | | | PostgreSQL (pgsql/pgcopy) | | `Physloc` *(deprecated)* | | | SQL Server (mssql) | | `Rowid` *(deprecated)* | | | Oracle (oraodp/adbc\_oracle) | | `NZDataSlice` *(deprecated)* | | | Netezza (nzsql/adbc\_netezza) | | `DBPartition` | | | SQL Server, PostgreSQL, Oracle, MySQL, Teradata (and their `adbc_*` counterparts) | | `Timepartition` | | | Any | ### Available Methods[​](#available-methods "Direct link to Available Methods") **None** - No parallel processing. Data is exported sequentially. **DataDriven** - Uses all values of a column (or a given list provided by `--datadrivenquery`) to split the export. If the number of values is greater than the degree of parallelism, throttling will be applied. tip You can use an expression in the distribute key column instead of a column name.
Example: `YEAR(o_orderdate)` **Ntile** - Uses the distributed column field and ntile values to retrieve evenly distributed chunks of data. Each parallel thread exports a portion based on a range built using the distributed column values. The uniqueness of the distributed column is not mandatory. **RangeId** - Uses the distributed column field and its min/max values to retrieve chunks of data. Each parallel thread exports a portion based on a range built using the distributed column values. **Random** - Requires a distribution column that must be an integer/bigint with many values (at least as many as the degree of parallelism). **Physical** *(recommended)* - Splits the data on the physical row location of the source engine. The strategy (Ctid, Rowid, Physloc or NZDataSlice) is picked from the connection type. See [Physical Method](#physical-method) below. #### Deprecated engine-specific methods[​](#deprecated-engine-specific-methods "Direct link to Deprecated engine-specific methods") The four engine-specific values below are still accepted, but they are **deprecated** and will be removed in **FastBCP 2.0**. Use [`Physical`](#physical-method) instead: it picks the same strategy from the connection type. Their description is kept here for reference. **Ctid** *(deprecated)* - Uses an internal hidden field to retrieve chunks of data. Each parallel thread exports a portion based on the CTID range. Deprecated `Ctid` is deprecated and will be removed in 2.0. Use `--parallelmethod Physical`, which resolves to Ctid on PostgreSQL (`pgsql`, `pgcopy`, `adbc_pgsql`). note PostgreSQL databases only (and some compatible PostgreSQL databases). **Physloc** *(deprecated)* - Uses an internal hidden field (`%%physloc%%`) to retrieve chunks of data. Each parallel thread exports a portion based on the Physloc value. Deprecated `Physloc` is deprecated and will be removed in 2.0. Use `--parallelmethod Physical`, which resolves to Physloc on SQL Server (`mssql`, `msoledbsql`, `adbc_mssql`). note `Physloc` parallel method is for SQL Server databases only. Since FastBCP 1.4, it requires `--sourceschema` and `--sourcetable` (directly or through `Physical`). * On a rowstore table, the rows are distributed on the two low bytes of the page id, so runs of 256 pages go to each chunk. * On a **clustered columnstore** table, `%%physloc%%` is a row id, not a page address. FastBCP detects the clustered columnstore index and distributes the rows on the whole row id instead (logged as `Physloc : . is a clustered columnstore, splitting on the columnstore row id`). If the check fails, FastBCP logs a warning and uses the rowstore key. **Rowid** *(deprecated)* - Uses an internal hidden field to retrieve chunks of data. Each parallel thread exports a portion based on the ROWID range. Deprecated `Rowid` is deprecated and will be removed in 2.0. Use `--parallelmethod Physical`, which resolves to Rowid on Oracle (`oraodp`, `adbc_oracle`). note `RowId` parallel method is for Oracle databases only (`oraodp` and `adbc_oracle` connection types). Since FastBCP 1.4, it requires `--sourceschema` and `--sourcetable` (directly or through `Physical`); it used to crash when they were missing. **NZDataSlice** *(deprecated)* - Uses the native Netezza data slices to retrieve chunks of data. Each parallel thread exports a portion based on the data slice distribution. Slices go through a shared work queue: an idle thread takes the next waiting slice, which keeps all threads busy when slices are uneven. After the first failure, no new slice is started. Deprecated `NZDataSlice` is deprecated and will be removed in 2.0. Use `--parallelmethod Physical`, which resolves to NZDataSlice on Netezza (`nzsql`, `nzcopy`, `nzoledb`, `adbc_netezza`). note `NZDataSlice` parallel method is for Netezza databases only (`nzsql` and `adbc_netezza` connection types). When a deprecated value is used, FastBCP runs the export as before and logs a warning: ``` Parallel method Ctid is deprecated and will be removed in 2.0 ==> use --parallelmethod Physical ``` **DBPartition** - Runs one extraction per native partition / subpartition of the source table. The largest partitions are scheduled first, based on the catalog row estimates. | Source | Partitioning used | | -------------------------------------------- | --------------------------------------------- | | SQL Server (`mssql`, `adbc_mssql`) | `$PARTITION` | | PostgreSQL (`pgsql`, `pgcopy`, `adbc_pgsql`) | Leaf tables | | Oracle (`oraodp`, `adbc_oracle`) | `PARTITION (...)` | | MySQL (`mysql`) | `PARTITION (...)` | | Teradata (`teradata`, `adbc_teradata`) | Row partitioning, single- and multi-level PPI | note `DBPartition` requires `--sourceschema` and `--sourcetable`; it does not need a distribute key column. It falls back to `None`, with a warning, when the table is not partitioned, has a single partition, or the source is not supported. tip The output file layout is controlled by the [`FASTBCP_DBPARTITION_TARGET_MODE`](/1.4/documentation/environment-variables/fastbcp-dbpartition-target-mode.md) environment variable: numbered chunks (`CHUNK`, default) or Hive-style directories named after each partition (`HIVE`). `--merge` works in both modes. **Timepartition** - Uses a date/datetime column to partition data into time-based chunks. Each parallel thread exports data for a specific time period (year, month, week, or day). The distributed key column must be specified in a special format: `(datecolumn, year, month)`, `(datecolumn, year, month, day)`, `(datecolumn, year)`, or `(datecolumn, year, week)`. tip This method is ideal for time-series data and allows efficient parallel export based on temporal ranges. ## Physical Method[​](#physical-method "Direct link to Physical Method") `--parallelmethod Physical` is the recommended way to split a table on its physical row location, without a distribute key column. FastBCP picks the physical-location strategy of the source engine from the connection type (`-C` / `--connectiontype`): | Source | Connection types | Resolved strategy | | ---------- | -------------------------------------------- | ----------------- | | PostgreSQL | `pgsql`, `pgcopy`, `adbc_pgsql` | `Ctid` | | Oracle | `oraodp`, `adbc_oracle` | `Rowid` | | SQL Server | `mssql`, `msoledbsql`, `adbc_mssql` | `Physloc` | | Netezza | `nzsql`, `nzcopy`, `nzoledb`, `adbc_netezza` | `NZDataSlice` | The resolved strategy behaves exactly like the deprecated engine-specific method of the same name (see [Deprecated engine-specific methods](#deprecated-engine-specific-methods)). **Requirements:** * `--sourceschema` and `--sourcetable` are required. `--query` can be added to filter the table (simple query with a WHERE clause). FastBCP stops with an error when one of them is missing: ``` ERROR in command line parameters : With Physical (Ctid) Method you must define source schema (--sourceschema) and source table (--sourcetable) ==> With Physical (Ctid) Method --sourceschema and --sourcetable are both mandatory ``` * `--distributekeycolumn` is not used. **Unsupported sources:** any other connection type (`odbc`, `oledb`, `mysql`, `clickhouse`, `hana`, `teradata`, `adbc_teradata`) stops with an error: ``` ERROR in command line parameters : Physical method is not supported for connection type 'mysql' ==> supported sources are PostgreSQL, Oracle, SQL Server and Netezza ``` With `odbc` and `oledb`, FastBCP cannot know which engine is behind the driver, so the error asks for a native connection type: ``` ERROR in command line parameters : Physical method cannot identify the source engine behind connection type 'odbc' ==> use a native connection type (pgsql, pgcopy, oraodp, mssql, msoledbsql, nzsql, nzcopy, nzoledb or their adbc_* counterpart) ``` **Logs:** the resolved strategy is written to the log as the distribute method: ``` Distribute Method : Physical (Ctid) ``` The OpenTelemetry spans carry the resolved method in `fastbcp.method`. When `Physical` was resolved, `fastbcp.method.requested` holds `Physical`. ### Physical Examples[​](#physical-examples "Direct link to Physical Examples") * Windows * Linux ``` # PostgreSQL: resolved to Ctid .\FastBCP.exe ` --connectiontype "pgsql" ` --server "localhost:5432" ` --database "tpch" ` --user "FastUser" ` --password "FastPassword" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --parallelmethod "Physical" ` --paralleldegree 8 ` --directory "D:\temp\orders" ` --fileoutput "orders.parquet" ` --merge "False" ``` ``` # SQL Server: resolved to Physloc .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "tpch" ` --trusted ` --sourceschema "dbo" ` --sourcetable "orders" ` --parallelmethod "Physical" ` --paralleldegree -2 ` --directory "D:\temp\orders" ` --fileoutput "orders.parquet" ` --merge "False" ``` ``` # PostgreSQL: resolved to Ctid ./FastBCP \ --connectiontype "pgsql" \ --server "localhost:5432" \ --database "tpch" \ --user "FastUser" \ --password "FastPassword" \ --sourceschema "tpch_10" \ --sourcetable "orders" \ --parallelmethod "Physical" \ --paralleldegree 8 \ --directory "/data/export/orders" \ --fileoutput "orders.parquet" \ --merge "False" ``` ``` # Oracle: resolved to Rowid ./FastBCP \ --connectiontype "oraodp" \ --server "dbserver:1521/ORCLPDB" \ --user "FastUser" \ --password "FastPassword" \ --sourceschema "SALES" \ --sourcetable "ORDERS" \ --parallelmethod "Physical" \ --paralleldegree 8 \ --directory "/data/export/orders" \ --fileoutput "orders.parquet" \ --merge "False" ``` ## Distribute Key Column[​](#distribute-key-column "Direct link to Distribute Key Column") Use the `-c` or `--distributekeycolumn` parameter to define the column (or computation) on the data source that will be used to split the data into several parts. FastBCP 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. It is not used by `Physical` (nor by the deprecated Ctid, Rowid, Physloc and NZDataSlice) or `DBPartition`. Timepartition Special Format When using the `Timepartition` method, the distribute key column must be specified in a special format: * `(datecolumn, year, month)` - Partition by year and month * `(datecolumn, year, month, day)` - Partition by year, month, and day * `(datecolumn, year)` - Partition by year only * `(datecolumn, year, week)` - Partition by year and week Example: `--distributekeycolumn "(o_orderdate, year, month)"` * Windows * Linux ``` # Using a column name .\FastBCP.exe ` ... --distributekeycolumn order_date ` ... # Using an expression .\FastBCP.exe ` ... --distributekeycolumn "YEAR(order_date)" ` ... ``` ``` # Using a column name ./FastBCP \ ... --distributekeycolumn order_date \ ... # Using an expression ./FastBCP \ ... --distributekeycolumn "YEAR(order_date)" \ ... ``` **Syntax:** * Short form: `-c ` * Long form: `--distributekeycolumn ` ## Degree of Parallelism[​](#degree-of-parallelism "Direct link to Degree of Parallelism") Use the `-p` or `--paralleldegree` 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 .\FastBCP.exe ` ... --paralleldegree 8 ` ... # Auto-detect based on CPU cores .\FastBCP.exe ` ... --paralleldegree 0 ` ... # Use half of available cores .\FastBCP.exe ` ... --paralleldegree -2 ` ... ``` ``` # Use 8 parallel threads ./FastBCP \ ... --paralleldegree 8 \ ... # Auto-detect based on CPU cores ./FastBCP \ ... --paralleldegree 0 \ ... # Use half of available cores ./FastBCP \ ... --paralleldegree -2 \ ... ``` **Syntax:** * Short form: `-p ` * Long form: `--paralleldegree ` **Default:** `-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. * Windows * Linux ``` .\FastBCP.exe ` ... --datadrivenquery "SELECT tagname FROM tags" ` ... ``` ``` ./FastBCP \ ... --datadrivenquery "SELECT tagname FROM tags" \ ... ``` * Windows * Linux ``` .\FastBCP.exe ` ... --datadrivenquery "SELECT o_orderdate FROM dim_date where ref_date > getdate() - 30" ` ... ``` ``` ./FastBCP \ ... --datadrivenquery "SELECT o_orderdate FROM dim_date where ref_date > getdate() - 30" \ ... ``` **Syntax:** * Long form only: `--datadrivenquery ""` ## Merge (boolean)[​](#merge-boolean "Direct link to Merge (boolean)") Use the `-M` or `--merge` true/false to specify if the files generated by the parallel export should be merged into a single output file (`true`) or kept as separate files (`false`). Default `false` warning Current version allows valid merge for CSV and Parquet formats only. warning Merge is not available for cloud destinations: `--merge true` is forced to `false` (with a warning in the log) when `--directory` is a cloud URI. warning Merge is not supported with gzip compressed output (`.csv.gz`, `.tsv.gz`, `.json.gz`): FastBCP stops with an error. * Windows * Linux ``` # Merge files after parallel export .\FastBCP.exe ` ... --merge true ` ... # Keep distributed files (default) .\FastBCP.exe ` ... --merge false ` ... ``` ``` # Merge files after parallel export ./FastBCP \ ... --merge true \ ... # Keep distributed files (default) ./FastBCP \ ... --merge false \ ... ``` **Syntax:** * Short form: `-M` * Long form: `--merge` **Default:** `false` ## Complete Example[​](#complete-example "Direct link to Complete Example") Here's a complete example using parallel parameters with the DataDriven method: * Windows * Linux ``` .\FastBCP.exe ` --connectiontype "pgcopy" ` --server "localhost:15432" ` --database "tpch" ` --user "FastUser" ` --password "FastPassword" ` --query "with T1 AS (select *, to_char(o_orderdate, 'YYYYMM') o_ordermonth from tpch_10.orders) SELECT * FROM T1" ` --directory "D:\temp\tpch\orders\" ` --fileoutput "pgcopy_orders.parquet" ` --method "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" ` --paralleldegree 10 ` --merge "False" ` --runid "pgcopy_to_parquet_parallel12_DataDriven" ``` ``` ./FastBCP \ --connectiontype "pgcopy" \ --server "localhost:15432" \ --database "tpch" \ --user "FastUser" \ --password "FastPassword" \ --query "with T1 AS (select *, to_char(o_orderdate, 'YYYYMM') o_ordermonth from tpch_10.orders) SELECT * FROM T1" \ --directory "/data/export/tpch/orders/" \ --fileoutput "pgcopy_orders.parquet" \ --method "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" \ --paralleldegree 10 \ --merge "False" \ --runid "pgcopy_to_parquet_parallel12_DataDriven" ``` This example: * Connects to a PostgreSQL database on localhost:15432 * Exports data from the dbo.orders table * Uses the DataDriven distribution method * Distributes work based on the month of the order date using an expression * Use a custom query to generate month values to extract from a light query (instead of a `SELECT DISTINCT o_ordermonth` from the source query) * Uses 10 parallel threads (even if there is 12 month to export) * Keeps distributed files without merging (--merge false) * Assigns a custom Run ID for tracking ## Timepartition Example[​](#timepartition-example "Direct link to Timepartition Example") Here's an example using the Timepartition method to partition data based on a date column: * Windows * Linux ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "tpch_copy" ` --user "FastUser" ` --password "FastPassword" ` --sourceschema "tpch_10" ` --sourcetable "orders_date_sorted" ` --directory "D:\temp\TestPartition" ` --fileoutput "orders.csv" ` --decimalseparator "," ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --method "Timepartition" ` --distributekeycolumn "(o_orderdate,year,month)" ` --paralleldegree 16 ` --merge "False" ` --runid "mssql_to_csv_parallel8_timepartition" ``` ``` ./FastBCP \ --connectiontype "mssql" \ --server "localhost" \ --database "tpch_copy" \ --user "FastUser" \ --password "FastPassword" \ --sourceschema "tpch_10" \ --sourcetable "orders_date_sorted" \ --directory "/data/export/TestPartition" \ --fileoutput "orders.csv" \ --decimalseparator "," \ --delimiter "|" \ --dateformat "yyyy-MM-dd HH:mm:ss" \ --encoding "UTF-8" \ --method "Timepartition" \ --distributekeycolumn "(o_orderdate,year,month)" \ --paralleldegree 16 \ --merge "False" \ --runid "mssql_to_csv_parallel8_timepartition" ``` This example: * Connects to a SQL Server database on localhost * Exports data from the tpch\_10.orders\_date\_sorted table * Uses the Timepartition distribution method * Partitions data by year and month based on the o\_orderdate column * Uses 16 parallel threads * Keeps distributed files without merging * Assigns a custom Run ID for tracking ## DBPartition Example[​](#dbpartition-example "Direct link to DBPartition Example") Here's an example using the DBPartition method to export each partition of a partitioned table into a Hive-style directory: * Windows * Linux ``` $env:FASTBCP_DBPARTITION_TARGET_MODE = "HIVE" .\FastBCP.exe ` --connectiontype "pgsql" ` --server "localhost:5432" ` --database "tpch" ` --user "FastUser" ` --password "FastPassword" ` --sourceschema "tpch_10" ` --sourcetable "orders_partitioned" ` --method "DBPartition" ` --paralleldegree 8 ` --directory "D:\temp\orders" ` --fileoutput "orders.parquet" ` --merge "False" ` --runid "pgsql_to_parquet_dbpartition" ``` ``` export FASTBCP_DBPARTITION_TARGET_MODE=HIVE ./FastBCP \ --connectiontype "pgsql" \ --server "localhost:5432" \ --database "tpch" \ --user "FastUser" \ --password "FastPassword" \ --sourceschema "tpch_10" \ --sourcetable "orders_partitioned" \ --method "DBPartition" \ --paralleldegree 8 \ --directory "/data/export/orders" \ --fileoutput "orders.parquet" \ --merge "False" \ --runid "pgsql_to_parquet_dbpartition" ``` This example: * Connects to a PostgreSQL database on localhost:5432 * Exports the partitioned table `tpch_10.orders_partitioned`, one extraction per leaf table * Starts with the largest partitions and runs up to 8 of them in parallel * Writes each partition to `partition=/orders.parquet` (`HIVE` mode) * Keeps distributed files without merging --- # Parquet Formatting [Apache Parquet](https://parquet.apache.org/) is a columnar storage format optimized for analytics. FastBCP automatically uses Parquet format when the output file has a `.parquet` extension. ## Parquet Compression[​](#parquet-compression "Direct link to Parquet Compression") Use the `--parquetcompression` parameter to specify the parquet compression codec. ``` ./FastBCP \ ... --fileoutput "orders.parquet" \ --parquetcompression Snappy \ ... ``` **Syntax:** * Long form: `--parquetcompression ` **Default:** `Zstd` (faster and better compression ratio than others) **Available Algorithms:** * `None` - No compression * `Snappy` - Fast, small compression, classic * `Gzip` - Smaller files, slower * `Lzo` - Slower, medium compression (rarely used) * `Lz4` - Slower, moderate compression * `Zstd` - Best compression and Fast (default) tip The **Zstd** (default) is best for most cases. It provides the best compression ratio with moderate speed, ideal for cloud storage to minimize storage costs and transfer time. * So no need to set this parameter to use Zstd. ## Row Group Size Configuration[​](#row-group-size-configuration "Direct link to Row Group Size Configuration") Available since version 0.30.1 This feature is available starting from FastBCP version 0.30.1. You can control the Parquet row group size using the `FASTBCP_RGSIZE` environment variable. Row groups are the unit of parallelization in Parquet files, and their size can impact query performance and memory usage. **Environment Variable:** `FASTBCP_RGSIZE` **Default Value:** `max(2^18/sqrt(degree),64000)` **Usage:** * Windows * Linux ``` # Set the row group size to 500,000 rows $env:FASTBCP_RGSIZE = "500000" # Run FastBCP .\FastBCP.exe --connectiontype mssql --server "localhost" ... ``` ``` # Set the row group size to 500,000 rows export FASTBCP_RGSIZE=500000 # Run FastBCP ./FastBCP --connectiontype mssql --server "localhost" ... ``` ## Complete Example[​](#complete-example "Direct link to Complete Example") * Windows * Linux ``` $env:FASTBCP_RGSIZE = "500000" .\FastBCP.exe ` --connectiontype mssql ` --server "localhost" ` --database "sales" ` --trusted ` --query "SELECT * FROM orders WHERE OrderDate >= '2024-01-01'" ` --directory "C:\exports" ` --fileoutput "orders.parquet" ` --parquetcompression Snappy ``` ``` export FASTBCP_RGSIZE=500000 ./FastBCP \ --connectiontype mssql \ --server "localhost" \ --database "sales" \ --trusted \ --query "SELECT * FROM orders WHERE OrderDate >= '2024-01-01'" \ --directory "/exports" \ --fileoutput "orders.parquet" \ --parquetcompression Snappy ``` --- # Source Info FastBCP offers multiple ways to define your data source for extraction. You can use a query, an input file, or specify schema and table names directly. ## Query[​](#query "Direct link to Query") Use the `-q` or `--query` parameter to specify your extraction as a SELECT statement. ``` ./FastBCP \ ... --query "SELECT * FROM Sales.Orders WHERE OrderDate >= '2024-01-01'" \ ... ``` **Syntax:** * Short form: `-q "SELECT_statement"` * Long form: `--query "SELECT_statement"` ## Input File[​](#input-file "Direct link to Input File") Use the `-F` or `--fileinput` parameter to specify an input file that contains only one query. ``` ./FastBCP \ ... --fileinput "/sources/sql/queries/my_extraction.sql" \ ... ``` **Syntax:** * Short form: `-F "file_path"` * Long form: `--fileinput "file_path"` Warning The query in the input file must not end with a semicolon (`;`). ## Source Schema[​](#source-schema "Direct link to Source Schema") If no query or input file is used, you can specify the source schema with the `-s` or `--sourceschema` parameter. Combined with the source table, this will extract data from `sourceschema.sourcetable`. ``` ./FastBCP \ ... --sourceschema "Sales" \ --sourcetable "Orders" \ ... ``` **Syntax:** * Short form: `-s "schema_name"` * Long form: `--sourceschema "schema_name"` Information This field is mandatory with the `Physical` (and the deprecated `Ctid`, `Rowid`, `Physloc`) and `DBPartition` parallel methods. See **[Parallel Parameters](/1.4/documentation/cli/parallel_parameters.md#physical-method)** for more details. ## Source Table[​](#source-table "Direct link to Source Table") If no query or input file is used, you can specify the source table with the `-T` or `--sourcetable` parameter. Combined with the source schema, this will extract data from `sourceschema.sourcetable`. ``` ./FastBCP \ ... --sourceschema "Sales" \ --sourcetable "Orders" \ ... ``` **Syntax:** * Short form: `-T "table_name"` * Long form: `--sourcetable "table_name"` Information This field is mandatory with the `Physical` (and the deprecated `Ctid`, `Rowid`, `Physloc`) and `DBPartition` parallel methods. See **[Parallel Parameters](/1.4/documentation/cli/parallel_parameters.md#physical-method)** for more details. Warning if you use the placeholder `{sourceschema}` and `{sourcetable}` in the `--directory` or `--fileoutput` (See **[Output Info](/1.4/documentation/cli/output_info.md)**) then you must set the `--sourceschema `and the `--sourcetable `even you use `--query `or `--inputfile` --- # AWS S3 Configuration Complete guide for configuring AWS S3 connectivity with FastBCP. ## Authentication Methods[​](#authentication-methods "Direct link to Authentication Methods") FastBCP 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 FastBCP:** ``` # Use default profile ./FastBCP \ ... --directory "s3://my-bucket/exports" \ --fileoutput "data.parquet" \ ... # Use production profile ./FastBCP \ ... --directory "s3://prod-bucket/exports" \ --cloudprofile "production" \ --fileoutput "data.parquet" \ ... # Use development profile ./FastBCP \ ... --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 FastBCP .\FastBCP.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 FastBCP ./FastBCP \ ... --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 FastBCP 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 FastBCP:** ``` { "Version": "2012-10-17", "Statement": [ { "Sid": "FastBCPRequired", "Comment": "REQUIRED - actual operations performed by FastBCP (multipart upload)", "Effect": "Allow", "Action": [ "s3:PutObject", "s3:AbortMultipartUpload" ], "Resource": "arn:aws:s3:::MY-BUCKET/exports/*" }, { "Sid": "FastBCPOptionalConvenience", "Comment": "OPTIONAL - operational convenience, not required by the code", "Effect": "Allow", "Action": [ "s3:GetObject", "s3:ListBucket" ], "Resource": [ "arn:aws:s3:::MY-BUCKET/exports/*", "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 ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "orders" ` --directory "s3://my-bucket/exports/{sourcetable}" ` --fileoutput "{sourcetable}.parquet" ``` ``` ./FastBCP \ --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 ``` .\FastBCP.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" ``` ``` ./FastBCP \ --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 ``` .\FastBCP.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 ``` ``` ./FastBCP \ --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") FastBCP 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/*" } } } ] } ``` ## Server-Side Encryption with AWS KMS (SSE-KMS)[​](#server-side-encryption-with-aws-kms-sse-kms "Direct link to Server-Side Encryption with AWS KMS (SSE-KMS)") FastBCP can write to buckets encrypted with SSE-KMS. Encryption is done by S3 on the server side, so FastBCP never calls AWS KMS directly: S3 calls KMS on behalf of the identity that uploads the files. Encryption can come from: * **Bucket default encryption:** the bucket is configured with SSE-KMS as its default encryption, and S3 encrypts every new object with the configured key. Nothing needs to be set on the FastBCP side. * **App-driven encryption:** the upload request itself asks for SSE-KMS (and optionally a specific KMS key). The required permissions are the same. ### KMS Permissions[​](#kms-permissions "Direct link to KMS Permissions") FastBCP uploads files with S3 multipart uploads. With SSE-KMS, a multipart upload needs both `kms:GenerateDataKey` and `kms:Decrypt` on the KMS key, in addition to the S3 permissions above. | Key type | What to configure | | ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | **AWS managed key** (`aws/s3`) | Nothing more: its key policy already lets any principal of the account use it through S3. It cannot be used across accounts. | | **Customer managed key** | Allow `kms:GenerateDataKey` and `kms:Decrypt` in the IAM policy of the identity running FastBCP **and** make sure the key policy allows that identity (or delegates to IAM policies). | **Example IAM policy for a customer managed key:** ``` { "Version": "2012-10-17", "Statement": [ { "Sid": "FastBCPS3Upload", "Effect": "Allow", "Action": [ "s3:PutObject", "s3:AbortMultipartUpload" ], "Resource": "arn:aws:s3:::MY-BUCKET/exports/*" }, { "Sid": "FastBCPKmsForSSE", "Effect": "Allow", "Action": [ "kms:GenerateDataKey", "kms:Decrypt" ], "Resource": "arn:aws:kms:eu-west-1:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab", "Condition": { "StringEquals": { "kms:ViaService": "s3.eu-west-1.amazonaws.com" } } } ] } ``` S3 Bucket Keys Enabling **S3 Bucket Keys** on the bucket reduces the number of calls from S3 to KMS, and therefore KMS costs and throttling, which matters for parallel exports that write many files. With Bucket Keys, the KMS encryption context is the bucket ARN instead of the object ARN: update any `kms:EncryptionContext` condition in your policies accordingly. ### Network / Egress[​](#network--egress "Direct link to Network / Egress") Since S3 calls KMS itself, FastBCP only needs network access to the S3 endpoint, not to the KMS endpoint. In a private VPC, an S3 gateway or interface endpoint is enough. --- # Azure Configuration Complete guide for configuring Azure Blob Storage and Azure Data Lake Gen2 connectivity with FastBCP. ## 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") FastBCP 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) 5. **SAS URL** (scoped, time-limited access) For direct commit to Azure Blob Storage, FastBCP uses `AZURE_STORAGE_CONNECTION_STRING` or `AZURE_STORAGE_SAS_URL` when one of them is set, and falls back to `DefaultAzureCredential` (Azure CLI, Managed Identity, environment credentials, …) otherwise. The selected authentication method is written to the log. ### 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 ``` FastBCP will automatically use the Azure CLI's authentication credentials. **Using with FastBCP:** ``` # No additional configuration needed - just run FastBCP ./FastBCP \ ... --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 FastBCP .\FastBCP.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 FastBCP ./FastBCP \ ... --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 FastBCP .\FastBCP.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 FastBCP ./FastBCP \ ... --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 FastBCP 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}" ``` ### 5. SAS URL[​](#5-sas-url "Direct link to 5. SAS URL") Since FastBCP 1.3, you can authenticate to Azure Blob Storage with a Shared Access Signature (SAS) URL, set in the `AZURE_STORAGE_SAS_URL` environment variable. A SAS grants scoped, time-limited access without sharing the account key. **Generate a container SAS URL:** * Azure Portal * Azure CLI 1. Navigate to your Storage Account → **Containers** → your container 2. Go to **Shared access tokens** 3. Select the **Create** and **Write** permissions and an expiry date 4. Click **Generate SAS token and URL** and copy the **Blob SAS URL** ``` az storage container generate-sas \ --account-name mystorageaccount \ --name mycontainer \ --permissions cw \ --expiry 2026-12-31T23:59Z \ --auth-mode key \ --output tsv # Then build the URL: https://mystorageaccount.blob.core.windows.net/mycontainer? ``` **Set the SAS URL:** * Windows (PowerShell) * Linux/macOS ``` $env:AZURE_STORAGE_SAS_URL="https://mystorageaccount.blob.core.windows.net/mycontainer?sv=...&sig=..." # Run FastBCP .\FastBCP.exe ` ... --directory "abs://mystorageaccount.blob.core.windows.net/mycontainer/exports" ` --fileoutput "data.parquet" ` ... ``` ``` export AZURE_STORAGE_SAS_URL="https://mystorageaccount.blob.core.windows.net/mycontainer?sv=...&sig=..." # Run FastBCP ./FastBCP \ ... --directory "abs://mystorageaccount.blob.core.windows.net/mycontainer/exports" \ --fileoutput "data.parquet" \ ... ``` tip Quote the SAS URL: it contains `&` characters that the shell would otherwise interpret. ## 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 ``` .\FastBCP.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" ``` ``` ./FastBCP \ --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 ``` .\FastBCP.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 ``` ``` ./FastBCP \ --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 ``` .\FastBCP.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" ``` ``` ./FastBCP \ --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 ``` .\FastBCP.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 ``` ``` ./FastBCP \ --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) ### Container Access[​](#container-access "Direct link to Container Access") FastBCP creates the target container if it does not exist. When the container already exists, a missing permission to create it (HTTP 403 or 409 on the create call) is tolerated, so an identity or SAS that can only write blobs into an existing container is enough. ### Troubleshooting 403 Errors[​](#troubleshooting-403-errors "Direct link to Troubleshooting 403 Errors") A `403 Forbidden` from Azure Storage usually comes from one of the following: * **Firewall:** the storage account's network rules do not allow the IP address or virtual network FastBCP runs from. * **RBAC:** the identity used by `DefaultAzureCredential` has no data-plane role (such as **Storage Blob Data Contributor**) on the account or container. Management roles such as *Owner* or *Contributor* are not enough. Role assignments can take a few minutes to apply. * **SAS permissions:** the SAS token is expired, is scoped to another container, or lacks the **Create** / **Write** permissions. FastBCP logs the authentication method it used, which helps tell these cases apart. ### 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 FastBCP. ## Authentication Methods[​](#authentication-methods "Direct link to Authentication Methods") FastBCP 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 ``` FastBCP will automatically use the gcloud CLI's authentication credentials. **Using with FastBCP:** ``` # No additional configuration needed - just run FastBCP ./FastBCP \ ... --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., "fastbcp-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 fastbcp-export \ --display-name="FastBCP Export Service Account" # Grant Storage Object Admin role gcloud projects add-iam-policy-binding my-project-id \ --member="serviceAccount:fastbcp-export@my-project-id.iam.gserviceaccount.com" \ --role="roles/storage.objectAdmin" # Create and download key file gcloud iam service-accounts keys create ~/fastbcp-key.json \ --iam-account=fastbcp-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\fastbcp-key.json" # Run FastBCP .\FastBCP.exe ` ... --directory "gs://my-bucket/exports" ` --fileoutput "data.parquet" ` ... ``` ``` # Set path to service account key file export GOOGLE_APPLICATION_CREDENTIALS="/path/to/fastbcp-key.json" # Run FastBCP ./FastBCP \ ... --directory "gs://my-bucket/exports" \ --fileoutput "data.parquet" \ ... ``` ### 3. Default Application Credentials[​](#3-default-application-credentials "Direct link to 3. Default Application Credentials") When FastBCP 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 ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Orders" ` --directory "gs://my-bucket/exports/orders" ` --fileoutput "orders.parquet" ``` ``` ./FastBCP \ --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 ``` .\FastBCP.exe ` --connectiontype "pgsql" ` --server "localhost" ` --port "5432" ` --database "analytics" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "events" ` --query "SELECT * FROM events WHERE event_date >= '2024-01-01'" ` --directory "gs://analytics-bucket/events/2024" ` --fileoutput "events.parquet" ` --parallelmethod "Physical" ` --paralleldegree 10 ``` ``` ./FastBCP \ --connectiontype "pgsql" \ --server "localhost" \ --port "5432" \ --database "analytics" \ --user "postgres" \ --password "postgres" \ --sourceschema "public" \ --sourcetable "events" \ --query "SELECT * FROM events WHERE event_date >= '2024-01-01'" \ --directory "gs://analytics-bucket/events/2024" \ --fileoutput "events.parquet" \ --parallelmethod "Physical" \ --paralleldegree 10 ``` ### Export with Date Partitioning[​](#export-with-date-partitioning "Direct link to Export with Date Partitioning") * Windows * Linux ``` .\FastBCP.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 ``` ``` ./FastBCP \ --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 the Physical parallel method[​](#export-from-oracle-to-gcs-using-the-physical-parallel-method "Direct link to Export from Oracle to GCS using the Physical parallel method") * Windows * Linux ``` .\FastBCP.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 "Physical" ` --paralleldegree 8 ``` ``` ./FastBCP \ --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 "Physical" \ --paralleldegree 8 \ --merge "False" ``` ## 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:fastbcp-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 FastBCP 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" .\FastBCP.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 "onelake://myworkspace/mylakehouse/{sourcedatabase}/{sourceschema}/{sourcetable}/year=2024/" ` --fileoutput "orders_2024.parquet" ` --parallelmethod "Physical" ` --paralleldegree 8 ``` ``` export AZURE_TENANT_ID="YOUR_TENANT_ID" export AZURE_CLIENT_ID="APPLICATION_ENTRA_ID" export AZURE_CLIENT_SECRET="Your_AZCLient_Secret" ./FastBCP ` --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 "onelake://myworkspace/mylakehouse/{sourcedatabase}/{sourceschema}/{sourcetable}/year=2024/" \ --fileoutput "orders_2024.parquet" \ --parallelmethod "Physical" \ --paralleldegree 8 ``` --- # Cloud Connectivity Overview FastBCP 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 FastBCP will use multi-part uploads for all cloud provider Warning Since FastBCP 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") FastBCP 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](/1.4/documentation/cloud-connectivity/aws-s3.md) * [Azure Setup](/1.4/documentation/cloud-connectivity/azure.md) * [Google Cloud Storage Setup](/1.4/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 ./FastBCP / ... --directory "s3://my-bucket/exports" / --fileoutput "data.parquet" / ... ``` ``` # Azure Blob ./FastBCP \ ... --directory "abs://account.blob.core.windows.net/container/exports/" \ --fileoutput "data.parquet" \ ... ``` ``` # Azure Datalake Gen 2 ./FastBCP \ ... --directory "abs://account.dfs.core.windows.net/container/exports/" \ --fileoutput "data.parquet" \ ... ``` ``` # Google Cloud Storage ./FastBCP \ ... --directory "gs://my-bucket/exports" \ --fileoutput "data.parquet" \ ... ``` ``` # OneLake ./FastBCP \ ... --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: ``` ./FastBCP \ ... --directory "s3://prod-bucket/exports" \ --cloudprofile "production" \ ... ./FastBCP \ ... --directory "s3://dev-bucket/exports" \ --cloudprofile "development" ... ``` --- # Operating Systems FastBCP supports Windows and Linux 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 | | ------------------------ | -------------------------- | ------------- | --------- | | Amazon Linux | 2023 (Kernel 6.1) | Arm64, x64 | | | 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 FastBCP supports a wide range of database systems across different platforms. ## Supported Databases & Platforms[​](#supported-databases--platforms "Direct link to Supported Databases & Platforms") | Database | Windows AMD64 | Linux AMD64 | Linux ARM64 | | --------------------- | ------------- | ----------- | ----------- | | **SQL Server** | | | | | **SQL Server (ADBC)** | | | | | **PostgreSQL** | | | | | **PostgreSQL (ADBC)** | | | | | **MySQL** | | | | | **Oracle** | | | | | **Oracle (ADBC)** | | | | | **ClickHouse** | | | | | **DuckDB** | | | | | **Teradata** | | | | | **Teradata (ADBC)** | | | | | **Netezza** | | | | | **Netezza (ADBC)** | | | | | **SAP HANA** | | | | | **ODBC** | | | | | **OLEDB** | | | | The ADBC FastDriver connectors (**SQL Server (ADBC)**, **PostgreSQL (ADBC)**, **Oracle (ADBC)**, **Netezza (ADBC)** and **Teradata (ADBC)**) are not supported on **Linux ARM64**. --- # FASTBCP\_ADBC\_BATCHCELLS ## Overview[​](#overview "Direct link to Overview") The `FASTBCP_ADBC_BATCHCELLS` environment variable controls the size of the Arrow record batches fetched by the ADBC connectors (`adbc_mssql`, `adbc_pgsql`), expressed in **cells** (rows × columns) rather than rows alone. Because a batch's memory footprint depends on both its row count and its column count, sizing by cell count keeps memory usage predictable across tables of very different widths: a narrow table fetches more rows per batch, a wide table fewer, for a comparable memory footprint. ## Syntax[​](#syntax "Direct link to Syntax") * Windows * Linux ``` $env:FASTBCP_ADBC_BATCHCELLS = 1000000 ``` ``` export FASTBCP_ADBC_BATCHCELLS=1000000 ``` ## Configuration[​](#configuration "Direct link to Configuration") | Property | Value | | -------------- | ------------------------------------------------------------------- | | **Type** | Integer (> 0) | | **Default** | `500000` (500,000 cells) | | **Applies to** | `adbc_mssql` and `adbc_pgsql` connections (Arpe.io ADBC FastDriver) | | **Since** | FastBCP 1.2 | ## How Batch Size Is Derived[​](#how-batch-size-is-derived "Direct link to How Batch Size Is Derived") For a given table, the effective number of rows per Arrow record batch is computed as: ``` rows per batch = FASTBCP_ADBC_BATCHCELLS / number of columns ``` For example, with the default `500000` cells: | Columns | Rows per batch | | ------- | -------------- | | 10 | 50,000 | | 50 | 10,000 | | 500 | 1,000 | ## When to Change It[​](#when-to-change-it "Direct link to When to Change It") * **Increase** the value to reduce the number of round trips for very wide or very narrow tables when more memory is available, which can improve throughput. * **Decrease** the value to lower peak memory usage in constrained environments (containers, small VMs) or when exporting extremely wide tables. ## Examples[​](#examples "Direct link to Examples") ### Increase batch size for higher throughput[​](#increase-batch-size-for-higher-throughput "Direct link to Increase batch size for higher throughput") * Windows * Linux ``` $env:FASTBCP_ADBC_BATCHCELLS = 2000000 fastbcp -S myserver.database.windows.net ` -d MyDatabase ` -T dbo.MyTable ` -C adbc_mssql ` --fileoutput "output.parquet" ``` ``` export FASTBCP_ADBC_BATCHCELLS=2000000 fastbcp -S myserver.database.windows.net \ -d MyDatabase \ -T dbo.MyTable \ -C adbc_mssql \ --fileoutput "output.parquet" ``` ### Reduce batch size to limit memory usage[​](#reduce-batch-size-to-limit-memory-usage "Direct link to Reduce batch size to limit memory usage") * Windows * Linux ``` $env:FASTBCP_ADBC_BATCHCELLS = 100000 fastbcp -S pg-server:5432 ` -d MyDatabase ` -Q "SELECT * FROM public.orders" ` -C adbc_pgsql ` --fileoutput "orders.parquet" ``` ``` export FASTBCP_ADBC_BATCHCELLS=100000 fastbcp -S pg-server:5432 \ -d MyDatabase \ -Q "SELECT * FROM public.orders" \ -C adbc_pgsql \ --fileoutput "orders.parquet" ``` Platform availability This variable only applies to the ADBC FastDriver connectors (`adbc_mssql`, `adbc_pgsql`), available on **Windows x64** and **Linux x64** only. See [Connection Parameters](/1.4/documentation/cli/connection_parameters.md#connection-type) for details. --- # FASTBCP\_CLOUD\_ISBUFFERED ## Overview[​](#overview "Direct link to Overview") The `FASTBCP_CLOUD_ISBUFFERED` environment variable controls whether FastBCP uses buffered uploads when writing to cloud storage. ## Syntax[​](#syntax "Direct link to Syntax") * Windows * Linux ``` $env:FASTBCP_CLOUD_ISBUFFERED = "True" # or "False" ``` ``` export FASTBCP_CLOUD_ISBUFFERED=True # or False ``` ## Configuration[​](#configuration "Direct link to Configuration") | Property | Value | | -------------- | --------------------------------------------------------------------- | | **Type** | Boolean (`True` / `False`) | | **Default** | `False` | | **Applies to** | Azure Data Lake Storage (ADLS), OneLake, AWS S3, Google Cloud Storage | | **Since** | FastBCP 1.0 | ## Behavior[​](#behavior "Direct link to Behavior") ### When `False` (Default)[​](#when-false-default "Direct link to when-false-default") FastBCP uses the cloud SDK's `OpenWriteAsync` streaming upload: * Data is written directly to the cloud storage in chunks * Each chunk blocks the writer until acknowledged * **Simpler** but can be **slower** for Azure storage ### When `True` (Recommended for Azure)[​](#when-true-recommended-for-azure "Direct link to when-true-recommended-for-azure") FastBCP uses buffered uploads: * Data is first written to a local temporary file (see [`FASTBCP_TMPPATH`](/1.4/documentation/environment-variables/fastbcp-tmppath.md)) * When the stream is closed, the file is uploaded in parallel blocks (azcopy-like pattern) * **Significantly faster** for Azure Data Lake Storage and OneLake * Requires temporary disk space --- # FASTBCP\_CLOUD\_MAXUPLOADTHREAD\_PER\_STREAM ## Overview[​](#overview "Direct link to Overview") The `FASTBCP_CLOUD_MAXUPLOADTHREAD_PER_STREAM` environment variable controls the maximum number of parallel threads used to upload each file to cloud storage during buffered uploads. ## Syntax[​](#syntax "Direct link to Syntax") * Windows * Linux ``` $env:FASTBCP_CLOUD_MAXUPLOADTHREAD_PER_STREAM = 16 ``` ``` export FASTBCP_CLOUD_MAXUPLOADTHREAD_PER_STREAM=16 ``` ## Configuration[​](#configuration "Direct link to Configuration") | Property | Value | | -------------- | -------------------------------------------------------------------------------------------------------------------------- | | **Type** | Integer (> 0) | | **Default** | `8` when `parallelmethod=None`, `2` otherwise | | **Applies to** | Cloud uploads when [`FASTBCP_CLOUD_ISBUFFERED=True`](/1.4/documentation/environment-variables/fastbcp-cloud-isbuffered.md) | | **Since** | FastBCP 1.0 | ## Behavior[​](#behavior "Direct link to Behavior") ### Default Values[​](#default-values "Direct link to Default Values") FastBCP automatically adjusts the default based on the parallel extraction method: | Parallel Method | Default Threads | Reason | | --------------------------- | --------------- | ---------------------------------------------------------------------------------------------- | | `None` (single stream) | `8` | FastBCP itself is not parallelized, so more bandwidth can be allocated to upload | | `Ntile`, `DataDriven`, etc. | `2` | FastBCP is already extracting in parallel, so limit upload threads to avoid saturating network | ### How It Works[​](#how-it-works "Direct link to How It Works") When [`FASTBCP_CLOUD_ISBUFFERED=True`](/1.4/documentation/environment-variables/fastbcp-cloud-isbuffered.md): 1. Data is written to a local temporary file 2. On stream close, the file is uploaded in parallel blocks 3. `FASTBCP_CLOUD_MAXUPLOADTHREAD_PER_STREAM` controls how many threads upload blocks concurrently 4. Maps to `StorageTransferOptions.MaximumConcurrency` in Azure SDK --- # FASTBCP\_DATEFORMAT ## Overview[​](#overview "Direct link to Overview") The `FASTBCP_DATEFORMAT` environment variable lets you specify a custom format string for converting date values to strings in the output. When not set, FastBCP uses the default `yyyy-MM-dd HH:mm:sszzz`. The format string follows [.NET standard and custom date/time format patterns](https://learn.microsoft.com/en-us/dotnet/standard/base-types/custom-date-and-time-format-strings). ## Syntax[​](#syntax "Direct link to Syntax") * Windows * Linux ``` $env:FASTBCP_DATEFORMAT = "yyyyMMdd" ``` ``` export FASTBCP_DATEFORMAT=yyyyMMdd ``` ## Configuration[​](#configuration "Direct link to Configuration") | Property | Value | | -------------- | --------------------------------------------------------------------------- | | **Type** | Format string | | **Default** | `yyyy-MM-dd HH:mm:sszzz` | | **Applies to** | All output formats that serialize date columns as strings (CSV, JSON, etc.) | | **Since** | FastBCP 1.0 | Auto-adaptive formatting The date format is auto-adaptive based on the column type: * **Date-only** columns will always output as `yyyy-MM-dd` regardless of the format string * **Timestamp/DateTime** columns will output as `yyyy-MM-dd HH:mm:ss` even if a timezone token (`zzz`) is present in the format string * **DateTimeOffset** columns will include the timezone offset as specified ## Format Examples[​](#format-examples "Direct link to Format Examples") | Format string | Example output | | ---------------------------------- | --------------------------- | | `yyyy-MM-dd HH:mm:sszzz` (default) | `2026-06-28 14:30:22+02:00` | | `yyyy-MM-dd` | `2026-06-28` | | `yyyyMMdd` | `20260628` | | `dd/MM/yyyy` | `28/06/2026` | | `MM-dd-yyyy` | `06-28-2026` | | `yyyy/MM/dd` | `2026/06/28` | | `yyyy-MM-dd HH:mm:ss` | `2026-06-28 14:30:22` | ## Examples[​](#examples "Direct link to Examples") ### Compact date format — no separators[​](#compact-date-format--no-separators "Direct link to Compact date format — no separators") * Windows * Linux ``` $env:FASTBCP_DATEFORMAT = "yyyyMMdd" fastbcp -S myserver.database.windows.net ` -d MyDatabase ` -T dbo.MyTable ` --fileoutput "output.csv" ``` ``` export FASTBCP_DATEFORMAT=yyyyMMdd fastbcp -S myserver.database.windows.net \ -d MyDatabase \ -T dbo.MyTable \ --fileoutput "output.csv" ``` Output column value: `20260628` ### Restore default ISO 8601 format[​](#restore-default-iso-8601-format "Direct link to Restore default ISO 8601 format") * Windows * Linux ``` Remove-Item Env:FASTBCP_DATEFORMAT ``` ``` unset FASTBCP_DATEFORMAT ``` --- # FASTBCP\_DBPARTITION\_TARGET\_MODE ## Overview[​](#overview "Direct link to Overview") The `FASTBCP_DBPARTITION_TARGET_MODE` environment variable controls how the files produced by the [`DBPartition`](/1.4/documentation/cli/parallel_parameters.md#available-methods) parallel method are named and laid out. `DBPartition` runs one extraction per native partition / subpartition of the source table. Each extraction writes its own file, either as a numbered chunk (`CHUNK`) or in a Hive-style directory named after the partition (`HIVE`). ## Syntax[​](#syntax "Direct link to Syntax") * Windows * Linux ``` $env:FASTBCP_DBPARTITION_TARGET_MODE = "HIVE" ``` ``` export FASTBCP_DBPARTITION_TARGET_MODE=HIVE ``` ## Configuration[​](#configuration "Direct link to Configuration") | Property | Value | | -------------- | ---------------- | | **Type** | `CHUNK` / `HIVE` | | **Default** | `CHUNK` | | **Applies to** | `-m DBPartition` | | **Since** | FastBCP 1.3 | ## Modes[​](#modes "Direct link to Modes") ### CHUNK (default)[​](#chunk-default "Direct link to CHUNK (default)") Each partition is written as a numbered chunk next to the target file: ``` _chunk_NNN. ``` For example, with `--fileoutput "orders.parquet"`: ``` orders_chunk_001.parquet orders_chunk_002.parquet orders_chunk_003.parquet ``` ### HIVE[​](#hive "Direct link to HIVE") Each partition is written into a Hive-style directory named after the partition, and the subpartition when there is one: ``` partition=

/[subpartition=/]. ``` Some sources use their own directory naming: | Source | Directory layout | | ------------------------- | ------------------------------------------------ | | SQL Server | `bounds=_/.` | | Teradata | `L1=/[L2=/].` | | PostgreSQL, Oracle, MySQL | `partition=

/[subpartition=/].` | For example, an Oracle table partitioned by month, with `--fileoutput "orders.parquet"`: ``` partition=ORDERS_2024_01/orders.parquet partition=ORDERS_2024_02/orders.parquet partition=ORDERS_2024_03/orders.parquet ``` tip The `HIVE` layout can be read directly as a partitioned dataset by engines such as Spark, DuckDB, Trino or Athena. `--merge` works in both modes. ## Example[​](#example "Direct link to Example") * Windows * Linux ``` $env:FASTBCP_DBPARTITION_TARGET_MODE = "HIVE" .\FastBCP.exe ` --connectiontype oraodp ` --server "dbserver:1521/ORCLPDB" ` --user "FastUser" ` --password "FastPassword" ` --sourceschema "SALES" ` --sourcetable "ORDERS" ` --directory "D:\export\orders" ` --fileoutput "orders.parquet" ` --parallelmethod DBPartition ` --paralleldegree 8 ` --merge false ``` ``` export FASTBCP_DBPARTITION_TARGET_MODE=HIVE ./FastBCP \ --connectiontype oraodp \ --server "dbserver:1521/ORCLPDB" \ --user "FastUser" \ --password "FastPassword" \ --sourceschema "SALES" \ --sourcetable "ORDERS" \ --directory "/data/export/orders" \ --fileoutput "orders.parquet" \ --parallelmethod DBPartition \ --paralleldegree 8 \ --merge false ``` --- # FASTBCP\_PERFORMANCE\_COLLECT ## Overview[​](#overview "Direct link to Overview") The `FASTBCP_PERFORMANCE_COLLECT` environment variable controls whether FastBCP collects performance information about the machine (CPU usage, memory usage, etc.) during the run. ## Syntax[​](#syntax "Direct link to Syntax") * Windows * Linux ``` $env:FASTBCP_PERFORMANCE_COLLECT = $True ``` ``` export FASTBCP_PERFORMANCE_COLLECT=True ``` ## Configuration[​](#configuration "Direct link to Configuration") | Property | Value | | ----------- | -------------------------- | | **Type** | Boolean (`True` / `False`) | | **Default** | `False` (disabled) | | **Since** | FastBCP 1.2 | ## Behavior[​](#behavior "Direct link to Behavior") ### When `False` (Default)[​](#when-false-default "Direct link to when-false-default") No performance information is collected during the run. ### When `True`[​](#when-true "Direct link to when-true") FastBCP collects performance information of the machine (CPU, memory usage, etc.) while the run is in progress. tip Use together with [`FASTBCP_SYSTEMINFO_COLLECT`](/1.4/documentation/environment-variables/fastbcp-systeminfo-collect.md) to also capture system information during the run. --- # FASTBCP\_RGSIZE ## Overview[​](#overview "Direct link to Overview") The `FASTBCP_RGSIZE` environment variable controls the row group size for Parquet file exports. Row groups are the primary unit for organizing data within a Parquet file and significantly impact query performance and compression efficiency. ## Syntax[​](#syntax "Direct link to Syntax") * Windows * Linux ``` $env:FASTBCP_RGSIZE = 500000 ``` ``` export FASTBCP_RGSIZE=500000 ``` ## Configuration[​](#configuration "Direct link to Configuration") | Property | Value | | -------------- | ------------------------------ | | **Type** | Integer (> 0) | | **Default** | `max(2^18/sqrt(degree),64000)` | | **Applies to** | Parquet file exports | | **Since** | FastBCP 0.30 | ## What is a Row Group?[​](#what-is-a-row-group "Direct link to What is a Row Group?") A **row group** is a horizontal partition of data in a Parquet file: * Parquet files are divided into one or more row groups * Each row group contains a subset of rows * Column data within a row group is compressed together * Query engines can skip entire row groups based on metadata ``` Parquet File Structure: ├── Row Group 1 (1M rows) │ ├── Column A (compressed) │ ├── Column B (compressed) │ └── Column C (compressed) ├── Row Group 2 (1M rows) │ ├── Column A (compressed) │ ├── Column B (compressed) │ └── Column C (compressed) └── Footer (metadata) ``` --- # FASTBCP\_SYSTEMINFO\_COLLECT ## Overview[​](#overview "Direct link to Overview") The `FASTBCP_SYSTEMINFO_COLLECT` environment variable controls whether FastBCP collects information about the machine it runs on (CPU, memory, OS, etc.) during the run. ## Syntax[​](#syntax "Direct link to Syntax") * Windows * Linux ``` $env:FASTBCP_SYSTEMINFO_COLLECT = $True ``` ``` export FASTBCP_SYSTEMINFO_COLLECT=True ``` ## Configuration[​](#configuration "Direct link to Configuration") | Property | Value | | ----------- | -------------------------- | | **Type** | Boolean (`True` / `False`) | | **Default** | `False` (disabled) | | **Since** | FastBCP 1.2 | ## Behavior[​](#behavior "Direct link to Behavior") ### When `False` (Default)[​](#when-false-default "Direct link to when-false-default") No system information is collected during the run. ### When `True`[​](#when-true "Direct link to when-true") FastBCP collects system information about the machine (CPU, memory, OS, etc.) while the run is in progress. tip Use together with [`FASTBCP_PERFORMANCE_COLLECT`](/1.4/documentation/environment-variables/fastbcp-performance-collect.md) to also capture performance metrics during the run. --- # FASTBCP\_TMPPATH ## Overview[​](#overview "Direct link to Overview") The `FASTBCP_TMPPATH` environment variable specifies the base directory where FastBCP creates temporary files during buffered cloud uploads. ## Syntax[​](#syntax "Direct link to Syntax") * Windows * Linux ``` $env:FASTBCP_TMPPATH = "D:\temp\fastbcp" ``` ``` export FASTBCP_TMPPATH=/tmp/fastbcp ``` ## Configuration[​](#configuration "Direct link to Configuration") | Property | Value | | -------------- | -------------------------------------------------------------------------------------------------------------------------- | | **Type** | Directory path (absolute or relative) | | **Default** | System temp directory (`%TEMP%` on Windows, `$TMPDIR` on Linux/macOS) | | **Applies to** | Cloud uploads when [`FASTBCP_CLOUD_ISBUFFERED=True`](/1.4/documentation/environment-variables/fastbcp-cloud-isbuffered.md) | | **Since** | FastBCP 1.0 | ## Behavior[​](#behavior "Direct link to Behavior") ### Default Behavior (Not Set)[​](#default-behavior-not-set "Direct link to Default Behavior (Not Set)") FastBCP uses the system's default temporary directory: * **Windows**: `%TEMP%` (typically `C:\Users\\AppData\Local\Temp`) * **Linux/macOS**: `$TMPDIR` (typically `/tmp`) ### Custom Path[​](#custom-path "Direct link to Custom Path") When set, FastBCP creates a unique subdirectory per process: ``` /fastbcp_/ ``` **Example:** ``` D:\temp\fastbcp\fastbcp_a1b2c3d4-e5f6-7890-abcd-ef1234567890\ ``` ### Automatic Cleanup[​](#automatic-cleanup "Direct link to Automatic Cleanup") * Subdirectories are created automatically * Temporary files are deleted after successful upload * In case of errors, files may remain and need manual cleanup --- # FASTBCP\_TTU\_PATH ## Overview[​](#overview "Direct link to Overview") The `FASTBCP_TTU_PATH` environment variable tells FastBCP where to find the customer's **Teradata Tools and Utilities (TTU)** for the [`adbc_teradata`](/1.4/documentation/cli/connection_parameters.md#adbc_teradata) connection type. The embedded ArpeTeradata driver needs TTU (CLIv2, `libcliv2.so`) only for the **legacy-port logon**: `sslmode=disable`, or the fallback of the default `sslmode=prefer` when the server has no TLS. The default TLS logon on the HTTPS port never uses TTU. Linux only The lookup only runs on Linux. On Windows, FastBCP passes nothing and the driver finds `wincli32.dll` itself (`ARPETERADATA_TTU_PATH`, its own directory, the registered TTU installation). ## Syntax[​](#syntax "Direct link to Syntax") ``` export FASTBCP_TTU_PATH=/opt/teradata/client/20.00 ``` ## Configuration[​](#configuration "Direct link to Configuration") | Property | Value | | -------------- | --------------------------- | | **Type** | Directory path | | **Default** | Not set | | **Applies to** | `-C adbc_teradata` on Linux | | **Since** | FastBCP 1.4 | ## Search Order[​](#search-order "Direct link to Search Order") FastBCP looks for TTU in this order and uses the first match: 1. The `FASTBCP_TTU_PATH` environment variable. If the directory does not exist or holds no `libcliv2.so`, FastBCP logs a warning and goes on. 2. A `ttu` directory next to the FastBCP binary. 3. A `TeradataToolsAndUtilitiesBase` directory next to the FastBCP binary (the folder of Teradata's Linux download). 4. Nothing found: no TTU path is passed, and the driver searches itself (`ARPETERADATA_TTU_PATH`, `/opt/teradata/client`, the system library path). The library directory found is passed to the driver as `adbc.arpeteradata.ttu_path` and logged: ``` TTU (adbc_teradata legacy-port logon): /opt/teradata/client/20.00/lib64 (from FASTBCP_TTU_PATH) ``` ## Accepted Layouts[​](#accepted-layouts "Direct link to Accepted Layouts") Give a **full TTU client directory**, not only `libcliv2.so`. Each location can hold: * the client directory itself, e.g. `/opt/teradata/client/20.00` (with its `lib64` directory); * the library directory itself, e.g. `/opt/teradata/client/20.00/lib64`; * a directory above the client directory laid out as `/`, `client//`, `teradata/client//` or `opt/teradata/client//` (the last one is what unpacking the TTU RPMs gives). When several versions are found, the newest wins. Keep the version folder name CLIv2 reaches its own files through `lib64/tdclientdir` (which holds `../..`) and appends its version, so the client directory must keep its version name (for example `20.00`). A copy of an installed TTU next to the binary must be `ttu/20.00`, not `ttu/` alone. ## Using Teradata's TTU Download Without Installing It[​](#using-teradatas-ttu-download-without-installing-it "Direct link to Using Teradata's TTU Download Without Installing It") Teradata's Linux download is a set of RPMs. To use it without installing it, run these commands next to the FastBCP binary. They unpack CLIv2 and its ICU libraries into `TeradataToolsAndUtilitiesBase/opt/teradata/client/20.00` and add the two things the TTU installer would add: `lib64/tdclientdir` and the ICU links. Adapt the file name to your TTU version. ``` tar xzf TeradataToolsAndUtilitiesBase__linux_x8664.20.00.39.00-1.tar.gz cd TeradataToolsAndUtilitiesBase for r in Linux/x8664/cliv2*.rpm Linux/x8664/tdicu*.rpm; do rpm2cpio "$r" | cpio -idm; done cd opt/teradata/client/20.00/lib64 printf '../..' > tdclientdir for f in libicu*td.so.*.*; do ln -sf "$f" "${f%.*}"; ln -sf "$f" "${f%.so.*}.so"; done ``` FastBCP finds this `TeradataToolsAndUtilitiesBase` folder by itself; `FASTBCP_TTU_PATH` is not needed. FastBCP warns at startup when the TTU folder it found lacks `tdclientdir` or the ICU links (`libicu*td.so.65` and `libicu*td.so`), or when the client directory is not named after its version. CLIv2 would otherwise fail at logon with `DBCHINI failed`. ## Example[​](#example "Direct link to Example") ``` export FASTBCP_TTU_PATH=/opt/teradata/client/20.00 ./FastBCP \ --connectiontype adbc_teradata \ --sourceconnectstring "Server=td-host;Port=1025;User Id=FastUser;Password=FastPassword;SSL Mode=disable" \ --sourceschema "TPCH" \ --sourcetable "ORDERS" \ --directory "/data/export/orders" \ --fileoutput "orders.parquet" \ --parallelmethod Ntile \ --distributekeycolumn "o_orderkey" \ --paralleldegree 8 ``` --- # FASTBCP\_UID\_STRING\_CASING ## Overview[​](#overview "Direct link to Overview") The `FASTBCP_UID_STRING_CASING` environment variable controls whether UID (UUID) values are converted to lowercase or uppercase strings in the output. The default is lowercase, which follows [RFC 4122](https://www.rfc-editor.org/rfc/rfc4122) standard formatting (e.g. `550e8400-e29b-41d4-a716-446655440000`). ## Syntax[​](#syntax "Direct link to Syntax") * Windows * Linux ``` $env:FASTBCP_UID_STRING_CASING = "upper" ``` ``` export FASTBCP_UID_STRING_CASING=upper ``` ## Configuration[​](#configuration "Direct link to Configuration") | Property | Value | | -------------- | -------------------------------------------------------- | | **Type** | `lower` / `upper` | | **Default** | `lower` | | **Applies to** | All output formats that serialize UID columns as strings | | **Since** | FastBCP 1.0 | ## Values[​](#values "Direct link to Values") | Value | Output example | | ----------------- | -------------------------------------- | | `lower` (default) | `550e8400-e29b-41d4-a716-446655440000` | | `upper` | `550E8400-E29B-41D4-A716-446655440000` | ## Examples[​](#examples "Direct link to Examples") ### Export with uppercase UIDs[​](#export-with-uppercase-uids "Direct link to Export with uppercase UIDs") * Windows * Linux ``` $env:FASTBCP_UID_STRING_CASING = "upper" fastbcp -S myserver.database.windows.net ` -d MyDatabase ` -T dbo.MyTable ` --fileoutput "output.csv" ``` ``` export FASTBCP_UID_STRING_CASING=upper fastbcp -S myserver.database.windows.net \ -d MyDatabase \ -T dbo.MyTable \ --fileoutput "output.csv" ``` ### Restore default lowercase (RFC 4122)[​](#restore-default-lowercase-rfc-4122 "Direct link to Restore default lowercase (RFC 4122)") * Windows * Linux ``` $env:FASTBCP_UID_STRING_CASING = "lower" ``` ``` export FASTBCP_UID_STRING_CASING=lower ``` --- # Environment Variables Overview FastBCP supports several environment variables to customize its behavior. This page provides a comprehensive overview of all available environment variables. ## Quick Reference Table[​](#quick-reference-table "Direct link to Quick Reference Table") | Variable | Type | Default | Category | Description | | ---------------------------------------------------------------------------------------------------------------------------------- | ----------------- | ---------------------------- | ------------ | ------------------------------------------------------------------------------------------- | | [`FASTBCP_CLOUD_ISBUFFERED`](/1.4/documentation/environment-variables/fastbcp-cloud-isbuffered.md) | `True` / `False` | `False` | Cloud Upload | Enables buffered cloud uploads for better performance | | [`FASTBCP_TMPPATH`](/1.4/documentation/environment-variables/fastbcp-tmppath.md) | Directory path | System temp | Cloud Upload | Base directory for temporary files during buffered uploads | | [`FASTBCP_CLOUD_MAXUPLOADTHREAD_PER_STREAM`](/1.4/documentation/environment-variables/fastbcp-cloud-maxuploadthread-per-stream.md) | Integer (> 0) | `8` or `2` | Cloud Upload | Maximum parallel upload threads per cloud stream | | [`FASTBCP_RGSIZE`](/1.4/documentation/environment-variables/fastbcp-rgsize.md) | Integer (> 0) | max(2^18/sqrt(degree),64000) | Parquet | Row group size for Parquet files | | [`FASTBCP_UID_STRING_CASING`](/1.4/documentation/environment-variables/fastbcp-uid-string-casing.md) | `lower` / `upper` | `lower` | Output | Casing for UID-to-string conversion (RFC 4122) | | [`FASTBCP_DATEFORMAT`](/1.4/documentation/environment-variables/fastbcp-dateformat.md) | Format string | `yyyy-MM-dd HH:mm:sszzz` | Output | Custom date format string for date-to-string conversion | | [`FASTBCP_ADBC_BATCHCELLS`](/1.4/documentation/environment-variables/fastbcp-adbc-batchcells.md) | Integer (> 0) | `500000` | ADBC | Arrow record batch size (in cells) for ADBC connectors | | [`FASTBCP_SYSTEMINFO_COLLECT`](/1.4/documentation/environment-variables/fastbcp-systeminfo-collect.md) | `True` / `False` | `False` | Diagnostics | Collects system information about the machine during the run | | [`FASTBCP_PERFORMANCE_COLLECT`](/1.4/documentation/environment-variables/fastbcp-performance-collect.md) | `True` / `False` | `False` | Diagnostics | Collects performance information about the machine during the run | | [`FASTBCP_DBPARTITION_TARGET_MODE`](/1.4/documentation/environment-variables/fastbcp-dbpartition-target-mode.md) | `CHUNK` / `HIVE` | `CHUNK` | Parallel | Output file layout of the `DBPartition` parallel method | | [`FASTBCP_TTU_PATH`](/1.4/documentation/environment-variables/fastbcp-ttu-path.md) | Directory path | Not set | ADBC | Teradata Tools and Utilities (TTU) folder for the `adbc_teradata` legacy-port logon (Linux) | --- # Advanced Scenarios Advanced use cases, partition functions, and troubleshooting examples. ## SQL Server Partition Functions[​](#sql-server-partition-functions "Direct link to SQL Server Partition Functions") Use SQL Server partition functions for efficient parallel exports. ### Using Partition Function with DataDriven[​](#using-partition-function-with-datadriven "Direct link to Using Partition Function with DataDriven") Leverage existing partition functions to distribute work: ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "tpch10_collation_bin2" ` --trusted ` --sourceschema "dbo" ` --sourcetable "orders_part" ` --directory "D:\temp" ` --fileoutput "orders_partitioned.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "DataDriven" ` --distributekeycolumn "`$partition.PF_DATE(o_orderdate)" ` --paralleldegree 10 ` --merge "False" ``` Partition Function Syntax Use `` `$partition.FunctionName(ColumnName) `` to reference a partition function. The backtick escapes the dollar sign in PowerShell. ### Date-based Partitioning[​](#date-based-partitioning "Direct link to Date-based Partitioning") #### Partition by date ranges for time-series data using database partitions:[​](#partition-by-date-ranges-for-time-series-data-using-database-partitions "Direct link to Partition by date ranges for time-series data using database partitions:") ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "TimeSeriesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "SensorReadings" ` --directory "C:\temp" ` --fileoutput "sensor_readings.parquet" ` --parallelmethod "DataDriven" ` --distributekeycolumn "`$partition.PF_Monthly(reading_date)" ` --paralleldegree 12 ` --merge "False" ``` #### Partition by date ranges for time-series data using Timepartition FastBCP parallelmethod :[​](#partition-by-date-ranges-for-time-series-data-using-timepartition-fastbcp-parallelmethod-- "Direct link to Partition by date ranges for time-series data using Timepartition FastBCP parallelmethod :") ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "TimeSeriesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "SensorReadings" ` --directory "s3://mycorpexportbucket/raw/TimeSeriesDB/SensorReadings/" ` --fileoutput "sensor_readings.parquet" ` --cloudprofile "mycorps3profile" ` --parallelmethod "Timepartition" ` --distributekeycolumn "(reading_date,year,month,day)" ` --paralleldegree 12 ` --merge "False" ``` This technic will produce one file per day inside a directory structure (local or cloud) as a Hive partitionning directory : /year=2026/month=11/day=11/sensor\_readings.parquet You can after a full export use a query to filter your data and overwrite files that was already generated on the overlaping period. ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "TimeSeriesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "SensorReadings_Part" ` --query "SELECT * FROM dbo.SensorReadings_Part WHERE reading_date >= CAST(GETDATE() - 10 AS DATE)" ` --directory "s3://mycorpexportbucket/raw/TimeSeriesDB/SensorReadings/" ` --fileoutput "sensor_readings.parquet" ` --cloudprofile "mycorps3profile" ` --parallelmethod "Timepartition" ` --distributekeycolumn "(reading_date,year,month,day)" ` --paralleldegree 10 ` --merge "False" ``` ## Complex Queries[​](#complex-queries "Direct link to Complex Queries") ### Multi-table Joins[​](#multi-table-joins "Direct link to Multi-table Joins") Export data with a query with joins: ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --query "SELECT o.order_id, o.order_date, c.customer_name, od.product_id, od.quantity, od.unit_price FROM orders o INNER JOIN customers c ON o.customer_id = c.customer_id INNER JOIN order_details od ON o.order_id = od.order_id WHERE o.order_date >= '2024-01-01'" ` --directory "C:\temp" ` --fileoutput "sales_detail.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Ntile" ` --distributekeycolumn "o.order_id" ` --paralleldegree 8 ` --merge "False" ``` ### Aggregated Data[​](#aggregated-data "Direct link to Aggregated Data") Export pre-aggregated data: ``` .\FastBCP.exe ` --connectiontype "pgsql" ` --server "localhost" ` --port "5432" ` --database "analytics" ` --user "postgres" ` --password "postgres" ` --query "SELECT date_trunc('day', order_date) as order_day, customer_region, COUNT(*) as order_count, SUM(total_amount) as total_sales FROM orders GROUP BY date_trunc('day', order_date), customer_region" ` --directory "C:\temp" ` --fileoutput "daily_sales_by_region.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd" ` --encoding "UTF-8" ` --parallelmethod "None" ``` ## Performance Tuning[​](#performance-tuning "Direct link to Performance Tuning") ### Optimal Parallel Degree[​](#optimal-parallel-degree "Direct link to Optimal Parallel Degree") * Auto-detect * Manual Use negative values to auto-calculate based on CPU cores: ``` # Use all cores minus 2 .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "LargeDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "BigTable" ` --directory "C:\temp" ` --fileoutput "bigtable.parquet" ` --parallelmethod "RangeId" ` --distributekeycolumn "id" ` --paralleldegree -2 ` --merge "False" ``` Specify exact thread count: ``` # Use exactly 16 threads .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "LargeDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "BigTable" ` --directory "C:\temp" ` --fileoutput "bigtable.parquet" ` --parallelmethod "RangeId" ` --distributekeycolumn "id" ` --paralleldegree 16 ` --merge "False" ``` ### Parquet RowGroup Size[​](#parquet-rowgroup-size "Direct link to Parquet RowGroup Size") To reduce memory pressure and, in many cases, improve export performance, you can configure the Parquet row group size by setting the `FASTBCP_RGSIZE` environment variable. A smaller `FASTBCP_RGSIZE` value reduces memory usage during export. However, this comes with a trade-off: smaller row groups may reduce Parquet compression efficiency and can sometimes increase the final file size. Recommended values range from `1000` to `1_000_000`. In practice, values between 32,000 and 64,000 often provide a good balance between memory usage, performance, and compression efficiency. * Windows * Linux ``` $Env:FASTBCP_RGSIZE=32000 .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "LargeDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "BigTable" ` --directory "C:\temp" ` --fileoutput "bigtable.parquet" ` --parallelmethod "RangeId" ` --distributekeycolumn "id" ` --paralleldegree -2 ` --merge "False" ``` Specify exact thread count: ``` export FASTBCP_RGSIZE=32000 .\FastBCP / --connectiontype "mssql" / --server "mssqlhost.domain.lan,1433" / --database "LargeDB" / --user "FastUSer" / --password "FastPassword" / --sourceschema "dbo" / --sourcetable "BigTable" / --directory "/data/export/bigtable/" / --fileoutput "bigtable.parquet" / --parallelmethod "RangeId" / --distributekeycolumn "id" / --paralleldegree 16 / --merge "False" ``` ### Merge vs No-Merge[​](#merge-vs-no-merge "Direct link to Merge vs No-Merge") * With Merge * Without Merge Combine parallel outputs into single file: ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "DataDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Data" ` --directory "C:\temp" ` --fileoutput "data_merged.parquet" ` --parallelmethod "RangeId" ` --distributekeycolumn "id" ` --paralleldegree 8 ` --merge "True" ``` **Result**: Single file `data_merged.parquet`, slower and only OnPremise. Keep separate files for parallel processing: ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "DataDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Data" ` --directory "C:\temp" ` --fileoutput "data_part.parquet" ` --parallelmethod "RangeId" ` --distributekeycolumn "id" ` --paralleldegree 8 ` --merge "False" ``` **Result**: Multiple files `data_part_Chunk000.parquet`, `data_part_Chunk001.parquet`, etc. ### Enable Debug Logging[​](#enable-debug-logging "Direct link to Enable Debug Logging") Get detailed execution information: ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "TestDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "TestTable" ` --directory "C:\temp" ` --fileoutput "debug_export.csv" ` --parallelmethod "Random" ` --distributekeycolumn "id" ` --paralleldegree 4 ` --merge "False" ` --loglevel "Debug" ` --runid "debug_test_run" ``` Debug Mode Use `--loglevel "Debug"` to see detailed execution steps, connection strings (without passwords), and query generation details. tip Build your command with the [Wizard](/latest/wizard.md) --- # Cloud Storage Examples Examples for exporting data directly to cloud storage platforms. ## AWS S3[​](#aws-s3 "Direct link to AWS S3") Export data directly to Amazon S3 buckets using date-based placeholders. ### S3 with Date Placeholders[​](#s3-with-date-placeholders "Direct link to S3 with Date Placeholders") Automatically organize files by date using placeholder tokens: ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "DailySales" ` --directory "s3://my-bucket/data/sales/full/" ` --fileoutput "sales.parquet" ` --parallelmethod "RangeId" ` --distributekeycolumn "sale_id" ` --paralleldegree 8 ` --runid "sales_to_s3_daily" ``` ### S3 with Nested Structure[​](#s3-with-nested-structure "Direct link to S3 with Nested Structure") Create hierarchical folder structures: ``` .\FastBCP.exe ` --connectiontype "pgsql" ` --server "localhost" ` --port "5432" ` --database "ecommerce" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "orders" ` --directory "s3://analytics-bucket/exports/orders/" ` --fileoutput "orders.parquet" ` --parallelmethod "DataDriven" ` --distributekeycolumn "o_orderdate" ` --paralleldegree 10 ` --merge "False" ``` ### S3 with CSV Format[​](#s3-with-csv-format "Direct link to S3 with CSV Format") Export CSV files to S3 with manual date partitioning: ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "LogsDB" ` --trusted ` --query "SELECT * FROM ApplicationLogs WHERE log_date = '2024-05-01'" ` --directory "s3://logs-bucket/app-logs/appdate=2024-05-01/" ` --fileoutput "app_logs.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ``` ## Azure Blob Storage[​](#azure-blob-storage "Direct link to Azure Blob Storage") Export data to Azure Blob Storage containers. ### Azure with Date Partitioning[​](#azure-with-date-partitioning "Direct link to Azure with Date Partitioning") ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "AnalyticsDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Events" ` --directory "abs://mystorageaccount.blob.core.windows.net/datacontainer/events/full/" ` --fileoutput "events.parquet" ` --parallelmethod "Timepartition" ` --distributekeycolumn "event_timestamp(year,month)" ` --paralleldegree 10 ``` ### Azure Data Lake Gen2[​](#azure-data-lake-gen2 "Direct link to Azure Data Lake Gen2") Export to Azure Data Lake Storage Gen2: ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "AnalyticsDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Events" ` --directory "abfss://mystorageaccount.dfs.core.windows.net/datacontainer/events/full/" ` --fileoutput "events.parquet" ` --parallelmethod "Timepartition" ` --distributekeycolumn "event_timestamp(year,month)" ` --paralleldegree 10 ``` ## Hourly Exports[​](#hourly-exports "Direct link to Hourly Exports") Create exports with hourly granularity. ### Hourly Data Partition by Sensor with an incremental time range drived from outside[​](#hourly-data-partition-by-sensor-with-an-incremental-time-range-drived-from-outside "Direct link to Hourly Data Partition by Sensor with an incremental time range drived from outside") ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "StreamingDB" ` --trusted ` --query "SELECT * FROM SensorData WHERE reading_time >= '2024-02-03 14:00:00' and reading_time < '2024-02-03 15:00:00'" ` --directory "s3://iot-bucket/sensor-data/" ` --fileoutput "sensors_20240203140000_20240203150000.parquet" ` --parallelmethod "DataDriven" ` --distributekeycolumn "sensor_id" ` --datadrivenquery "SELECT sensor_id From SensorList" ` --paralleldegree 8 ` --runid "hourly_sensor_export_20240203140000_20240203150000" ``` ## Best for Cloud Exports[​](#best-for-cloud-exports "Direct link to Best for Cloud Exports") ### Performance Tips[​](#performance-tips "Direct link to Performance Tips") Parquet **Use Parquet for cloud storage**: Better compression and query performance, reduce network traffic Parallelism **Enable parallel execution when needed**: * if you need to split data on a business criteria * if you have a lots of data to extract Dynamic Parallel Degree Use negativ value for `--paralleldegree` to automatically set threads to (CPU cores / abs(degree)), leaving resources for other processes. eg `--paralleldegree -2` will use half of the core of the machine from where FastBCP is launched DataDriven Query \*\*Use `--datadrivenquery` to : * speedup the retrieval of the elements list to extract. * as a technic for incremental extraction by using a where in the `--datadrivenquery` instead of the main `--query` warning Keep the degree safe for your source, to avoid a total saturation. ### Example with All Best Practices[​](#example-with-all-best-practices "Direct link to Example with All Best Practices") ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "DataWarehouse" ` --trusted ` --sourceschema "dbo" ` --sourcetable "FactSales" ` --directory "s3://analytics-bucket/warehouse/sales/{sourcetable}" ` --fileoutput "FactSales.parquet" ` --parallelmethod "DataDriven" ` --datadrivenquery "SELECT ref_date from calendar where ref_date > cast(getdate()-30 as date)" ` --distributekeycolumn "sale_date" ` --paralleldegree -2 ` --runid "daily_sales_to_s3" ` --loglevel "Information" ``` tip Build your command with the [Wizard](/latest/wizard.md) --- # DB2 Examples Comprehensive examples for exporting data from IBM DB2 using the generic `odbc` connection type. DB2 ODBC Driver DB2 is not a native connection type, so FastBCP connects to it through ODBC. Install the IBM DB2 ODBC driver, then provide either a DSN (`--dsn`) or a full connection string (`--sourceconnectstring`) as shown below. ## Connection String[​](#connection-string "Direct link to Connection String") **Single-threaded export:** ``` .\FastBCP.exe ` --connectiontype "odbc" ` --sourceconnectstring "Driver={IBM DB2 ODBC DRIVER};Database=SAMPLE;Hostname=db2server.company.corp;Port=25010;Protocol=TCPIP;Uid=db2user;Pwd=password;CurrentSchema=DB2ADMIN" ` --query "SELECT * FROM DB2ADMIN.ORDERS" ` --directory "C:\temp" ` --fileoutput "db2_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` **Parallel export with Ntile method:** ``` .\FastBCP.exe ` --connectiontype "odbc" ` --sourceconnectstring "Driver={IBM DB2 ODBC DRIVER};Database=SAMPLE;Hostname=db2server.company.corp;Port=25010;Protocol=TCPIP;Uid=db2user;Pwd=password;CurrentSchema=DB2ADMIN" ` --query "SELECT * FROM DB2ADMIN.ORDERS" ` --directory "C:\temp" ` --fileoutput "db2_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Ntile" ` --distributekeycolumn "ORDER_ID" ` --paralleldegree -2 ` --merge "False" ``` **Parallel export with Random method:** ``` .\FastBCP.exe ` --connectiontype "odbc" ` --sourceconnectstring "Driver={IBM DB2 ODBC DRIVER};Database=SAMPLE;Hostname=db2server.company.corp;Port=25010;Protocol=TCPIP;Uid=db2user;Pwd=password;CurrentSchema=DB2ADMIN" ` --query "SELECT * FROM DB2ADMIN.ORDERS" ` --directory "C:\temp" ` --fileoutput "db2_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "ORDER_ID" ` --paralleldegree 8 ` --merge "False" ``` ## DSN Connection[​](#dsn-connection "Direct link to DSN Connection") If a DSN is already configured on the machine, you can use `--dsn` instead of `--sourceconnectstring`. ``` .\FastBCP.exe ` --connectiontype "odbc" ` --dsn "DB2_DSN" ` --query "SELECT * FROM DB2ADMIN.ORDERS" ` --directory "C:\temp" ` --fileoutput "db2_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` Quoting special identifiers If your DB2 schema or table name contains special characters (e.g. `HCR_BI."APER@XPSAHISTO"`), keep the double quotes around the identifier inside your `--query` value so DB2 treats it as a delimited identifier. tip Build your command with the [Wizard](/latest/wizard.md) --- # MySQL Examples Examples for exporting data from MySQL databases. ## Single-threaded Export[​](#single-threaded-export "Direct link to Single-threaded Export") Simple export without parallelization. ``` .\FastBCP.exe ` --connectiontype "mysql" ` --server "localhost" ` --port "3306" ` --database "test" ` --user "root" ` --password "password" ` --query "SELECT * FROM test_table LIMIT 1000" ` --directory "C:\temp" ` --fileoutput "mysql_test.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` ## Parallel Export - Random Method[​](#parallel-export---random-method "Direct link to Parallel Export - Random Method") Export using Random distribution. ``` .\FastBCP.exe ` --connectiontype "mysql" ` --server "localhost" ` --port "3306" ` --database "test" ` --user "root" ` --password "password" ` --sourceschema "test" ` --sourcetable "orders" ` --directory "C:\temp" ` --fileoutput "mysql_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "order_id" ` --paralleldegree 8 ` --merge "False" ` --runid "mysql_to_csv_parallel8_random" ``` ## Parallel Export - DataDriven Method[​](#parallel-export---datadriven-method "Direct link to Parallel Export - DataDriven Method") Export using DataDriven distribution based on distinct column values. ``` .\FastBCP.exe ` --connectiontype "mysql" ` --server "localhost" ` --port "3306" ` --database "test" ` --user "root" ` --password "password" ` --sourceschema "test" ` --sourcetable "orders" ` --directory "C:\temp" ` --fileoutput "mysql_orders_dd.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "DataDriven" ` --distributekeycolumn "status" ` --paralleldegree 10 ` --merge "False" ` --runid "mysql_to_csv_parallel10_datadriven" ``` ## Export to Parquet[​](#export-to-parquet "Direct link to Export to Parquet") Export MySQL data to Parquet format. ``` .\FastBCP.exe ` --connectiontype "mysql" ` --server "localhost" ` --port "3306" ` --database "test" ` --user "root" ` --password "password" ` --sourceschema "test" ` --sourcetable "orders" ` --directory "C:\temp" ` --fileoutput "mysql_orders.parquet" ` --parallelmethod "Random" ` --distributekeycolumn "order_id" ` --paralleldegree 6 ` --merge "False" ``` tip Build your command with the [Wizard](/latest/wizard.md) --- # Oracle Examples Comprehensive examples for exporting data from Oracle databases. ## Connection Types[​](#connection-types "Direct link to Connection Types") Oracle exports support multiple connection types: * **oraodp**: Native Oracle Data Provider (recommended) * **oledb**: Using Oracle OLEDB Provider (OraOLEDB) * **odbc**: Using ODBC DSN * **adbc\_oracle**: ADBC FastDriver — ultra-fast, Parquet-only export (see [ADBC Examples](#adbc-examples)) ADBC Support The `adbc_oracle` connection type uses the Arpe.io ADBC FastDriver for ultra-fast, Arrow-native Parquet exports, and also supports the `Physical` parallel method (resolved to Rowid). Output is Parquet-only — see the [ADBC Examples](#adbc-examples) section below. ## Single-threaded Export[​](#single-threaded-export "Direct link to Single-threaded Export") Simple export without parallelization. * Oracle Data Provider * OLEDB Provider ``` .\FastBCP.exe ` --connectiontype "oraodp" ` --server "localhost:1521/ORCLPDB1" ` --user "system" ` --password "password" ` --query "SELECT * FROM customers WHERE ROWNUM <= 1000" ` --directory "C:\temp" ` --fileoutput "oracle_customers.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` ``` .\FastBCP.exe ` --connectiontype "oledb" ` --provider "OraOLEDB.Oracle" ` --server "localhost:1521/ORCLPDB1" ` --user "system" ` --password "password" ` --query "SELECT * FROM customers WHERE ROWNUM <= 1000" ` --directory "C:\temp" ` --fileoutput "oracle_customers.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` ## Parallel Export - Physical Method[​](#parallel-export---physical-method "Direct link to Parallel Export - Physical Method") Parallel export using the physical row identifier (ROWID). Physical on Oracle With an Oracle connection type (`oraodp`, `adbc_oracle`), the `Physical` method resolves to the Oracle ROWID strategy (formerly `--parallelmethod Rowid`, now deprecated). It is very efficient for full table exports and does not require a distribute key column. `--sourceschema` and `--sourcetable` are required. **Full table export:** ``` .\FastBCP.exe ` --connectiontype "oraodp" ` --server "localhost:1521/ORCLPDB1" ` --user "system" ` --password "password" ` --sourceschema "SYSTEM" ` --sourcetable "ORDERS" ` --directory "C:\temp" ` --fileoutput "oracle_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Physical" ` --paralleldegree 8 ` --merge "False" ` --runid "oraodp_to_csv_parallel8_physical" ``` **With query filter:** ``` .\FastBCP.exe ` --connectiontype "oraodp" ` --server "localhost:1521/ORCLPDB1" ` --user "system" ` --password "password" ` --sourceschema "SYSTEM" ` --sourcetable "ORDERS" ` --query "SELECT * FROM SYSTEM.ORDERS WHERE order_date >= TO_DATE('2024-01-01', 'YYYY-MM-DD')" ` --directory "C:\temp" ` --fileoutput "oracle_orders_2024.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Physical" ` --paralleldegree 8 ` --merge "False" ` --runid "oraodp_to_csv_parallel8_physical_filtered" ``` ## Parallel Export - Random Method[​](#parallel-export---random-method "Direct link to Parallel Export - Random Method") Export using Random distribution with modulo operation. ``` .\FastBCP.exe ` --connectiontype "oraodp" ` --server "localhost:1521/ORCLPDB1" ` --user "system" ` --password "password" ` --sourceschema "SYSTEM" ` --sourcetable "ORDERS" ` --directory "C:\temp" ` --fileoutput "oracle_orders_random.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "order_id" ` --paralleldegree 8 ` --merge "False" ` --runid "oraodp_to_csv_parallel8_random" ``` ## Parallel Export - DataDriven Method[​](#parallel-export---datadriven-method "Direct link to Parallel Export - DataDriven Method") Export using DataDriven distribution based on distinct column values. ``` .\FastBCP.exe ` --connectiontype "oraodp" ` --server "localhost:1521/ORCLPDB1" ` --user "system" ` --password "password" ` --sourceschema "SYSTEM" ` --sourcetable "ORDERS" ` --directory "C:\temp" ` --fileoutput "oracle_orders_dd.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "DataDriven" ` --distributekeycolumn "order_status" ` --paralleldegree 10 ` --merge "False" ` --runid "oraodp_to_csv_parallel10_datadriven" ``` ## Export to Parquet[​](#export-to-parquet "Direct link to Export to Parquet") Export Oracle data to Parquet format. **Single-threaded:** ``` .\FastBCP.exe ` --connectiontype "oraodp" ` --server "localhost:1521/ORCLPDB1" ` --user "system" ` --password "password" ` --sourceschema "SYSTEM" ` --sourcetable "ORDERS" ` --directory "C:\temp" ` --fileoutput "oracle_orders.parquet" ` --parallelmethod "None" ``` **Parallel with Physical (Rowid):** ``` .\FastBCP.exe ` --connectiontype "oraodp" ` --server "localhost:1521/ORCLPDB1" ` --user "system" ` --password "password" ` --sourceschema "SYSTEM" ` --sourcetable "ORDERS" ` --directory "C:\temp" ` --fileoutput "oracle_orders.parquet" ` --parallelmethod "Physical" ` --paralleldegree 10 ` --merge "False" ``` ## OLEDB Connection Examples[​](#oledb-connection-examples "Direct link to OLEDB Connection Examples") Using Oracle OLEDB Provider for connections. **Single-threaded:** ``` .\FastBCP.exe ` --connectiontype "oledb" ` --provider "OraOLEDB.Oracle" ` --server "localhost:1521/ORCLPDB1" ` --user "system" ` --password "password" ` --query "SELECT * FROM SYSTEM.ORDERS WHERE ROWNUM <= 10000" ` --directory "C:\temp" ` --fileoutput "oracle_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` **Parallel Random:** ``` .\FastBCP.exe ` --connectiontype "oledb" ` --provider "OraOLEDB.Oracle" ` --server "localhost:1521/ORCLPDB1" ` --user "system" ` --password "password" ` --query "SELECT * FROM SYSTEM.ORDERS" ` --directory "C:\temp" ` --fileoutput "oracle_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "order_id" ` --paralleldegree 6 ` --merge "False" ``` **Parallel DataDriven:** ``` .\FastBCP.exe ` --connectiontype "oledb" ` --provider "OraOLEDB.Oracle" ` --server "localhost:1521/ORCLPDB1" ` --user "system" ` --password "password" ` --query "SELECT * FROM SYSTEM.ORDERS" ` --directory "C:\temp" ` --fileoutput "oracle_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "DataDriven" ` --distributekeycolumn "order_status" ` --paralleldegree 6 ` --merge "False" ``` ## ADBC Examples[​](#adbc-examples "Direct link to ADBC Examples") The `adbc_oracle` connection type uses the Arpe.io ADBC FastDriver for ultra-fast, Arrow-native exports. **Output is Parquet-only**, and the `Physical` parallel method (resolved to Rowid) is also supported — see [Connection Parameters](/1.4/documentation/cli/connection_parameters.md#connection-type) and [Parallel Parameters](/1.4/documentation/cli/parallel_parameters.md#parallel-method) for details. ``` ./FastBCP \ --connectiontype "adbc_oracle" \ --server "localhost:1521/orclpdb1" \ --user "MIG_EXPRESS" \ --password "FastPassword" \ --sourceschema "TPCH10" \ --sourcetable "LINEITEM" \ --directory "./" \ --fileoutput "{sourcetable}.parquet" \ --method "None" ``` tip Build your command with the [Wizard](/latest/wizard.md) --- # Other Databases Examples for exporting data from Clickhouse, SAP HANA, Netezza and Teradata databases. ## Clickhouse[​](#clickhouse "Direct link to Clickhouse") Export data from Clickhouse database. **Single-threaded export:** ``` .\FastBCP.exe ` --connectiontype "clickhouse" ` --server "localhost" ` --port "9000" ` --database "default" ` --user "default" ` --password "password" ` --query "SELECT * FROM orders LIMIT 1000" ` --directory "C:\temp" ` --fileoutput "clickhouse_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` **Parallel export with Random method:** ``` .\FastBCP.exe ` --connectiontype "clickhouse" ` --server "localhost" ` --port "9000" ` --database "default" ` --user "default" ` --password "password" ` --sourceschema "default" ` --sourcetable "orders" ` --directory "C:\temp" ` --fileoutput "clickhouse_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "order_id" ` --paralleldegree 8 ` --merge "False" ``` ## SAP HANA[​](#sap-hana "Direct link to SAP HANA") Export data from SAP HANA database using two connection types. ### HANA Connection Type[​](#hana-connection-type "Direct link to HANA Connection Type") Standard HANA connection for general exports. **Single-threaded export:** ``` .\FastBCP.exe ` --connectiontype "hana" ` --server "hanaserver:30015" ` --user "SYSTEM" ` --password "password" ` --query "SELECT * FROM ORDERS WHERE ORDER_DATE >= '2024-01-01'" ` --directory "C:\temp" ` --fileoutput "hana_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` **Parallel export with Random method:** ``` .\FastBCP.exe ` --connectiontype "hana" ` --server "hanaserver:30015" ` --user "SYSTEM" ` --password "password" ` --sourceschema "SYSTEM" ` --sourcetable "ORDERS" ` --directory "C:\temp" ` --fileoutput "hana_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "ORDER_ID" ` --paralleldegree 8 ` --merge "False" ``` ### HANA Export Connection Type[​](#hana-export-connection-type "Direct link to HANA Export Connection Type") Optimized HANA connection using native EXPORT functionality for faster bulk exports. HANA Export The `hanaexport` connection type uses SAP HANA's native EXPORT statement for optimized bulk data transfer. This is recommended for large datasets. **Single-threaded export:** ``` .\FastBCP.exe ` --connectiontype "hanaexport" ` --server "hanaserver:30015" ` --user "SYSTEM" ` --password "password" ` --query "SELECT * FROM ORDERS WHERE ORDER_DATE >= '2024-01-01'" ` --directory "C:\temp" ` --fileoutput "hana_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` **Parallel export with Random method:** ``` .\FastBCP.exe ` --connectiontype "hanaexport" ` --server "hanaserver:30015" ` --user "SYSTEM" ` --password "password" ` --sourceschema "SYSTEM" ` --sourcetable "ORDERS" ` --directory "C:\temp" ` --fileoutput "hana_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "ORDER_ID" ` --paralleldegree 8 ` --merge "False" ``` ## Netezza[​](#netezza "Direct link to Netezza") Export data from Netezza database using OLEDB provider. **Single-threaded export:** ``` .\FastBCP.exe ` --connectiontype "oledb" ` --provider "NZOLEDB" ` --server "netezza_server" ` --database "SYSTEM" ` --user "admin" ` --password "password" ` --query "SELECT * FROM orders" ` --directory "C:\temp" ` --fileoutput "netezza_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` **Parallel export with Random method:** ``` .\FastBCP.exe ` --connectiontype "oledb" ` --provider "NZOLEDB" ` --server "netezza_server" ` --database "SYSTEM" ` --user "admin" ` --password "password" ` --query "SELECT * FROM orders" ` --directory "C:\temp" ` --fileoutput "netezza_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "order_id" ` --paralleldegree 6 ` --merge "False" ``` **Parallel export with DataDriven method:** ``` .\FastBCP.exe ` --connectiontype "oledb" ` --provider "NZOLEDB" ` --server "netezza_server" ` --database "SYSTEM" ` --user "admin" ` --password "password" ` --query "SELECT * FROM orders" ` --directory "C:\temp" ` --fileoutput "netezza_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "DataDriven" ` --distributekeycolumn "region" ` --paralleldegree 6 ` --merge "False" ``` **Parallel export with Physical method (native Netezza connection):** With a native Netezza connection type (`nzsql`, `nzcopy`, `nzoledb`, `adbc_netezza`), `--parallelmethod Physical` resolves to the Netezza data slices (formerly `NZDataSlice`, now deprecated). It does not work through the generic `oledb` connection type, because FastBCP cannot know which engine is behind the provider. ``` .\FastBCP.exe ` --connectiontype "nzsql" ` --server "netezza_server" ` --database "SYSTEM" ` --user "admin" ` --password "password" ` --sourceschema "ADMIN" ` --sourcetable "ORDERS" ` --directory "C:\temp" ` --fileoutput "netezza_orders.parquet" ` --parallelmethod "Physical" ` --paralleldegree 8 ` --merge "False" ``` ## Teradata[​](#teradata "Direct link to Teradata") Export data from Teradata with the embedded .NET provider (`teradata`) or the embedded ArpeTeradata ADBC driver (`adbc_teradata`, Parquet output only). note `--parallelmethod Physical` is not available for Teradata. Use `Ntile`, `RangeId`, `Random`, `DataDriven`, `Timepartition` or `DBPartition`. **Single-threaded export (`teradata`):** ``` .\FastBCP.exe ` --connectiontype "teradata" ` --server "td-host:443" ` --database "TPCH" ` --user "FastUser" ` --password "FastPassword" ` --query "SELECT * FROM TPCH.ORDERS" ` --directory "C:\temp\teradata" ` --fileoutput "teradata_orders.parquet" ` --parallelmethod "None" ``` **Parallel export with RangeId (`teradata`):** ``` .\FastBCP.exe ` --connectiontype "teradata" ` --server "td-host:1025" ` --database "TPCH" ` --user "FastUser" ` --password "FastPassword" ` --query "SELECT * FROM TPCH.ORDERS" ` --directory "C:\temp\teradata" ` --fileoutput "teradata_orders.parquet" ` --parallelmethod "RangeId" ` --distributekeycolumn "o_orderkey" ` --paralleldegree 16 ``` **Parallel export with Ntile (`adbc_teradata`):** ``` .\FastBCP.exe ` --connectiontype "adbc_teradata" ` --server "td-host" ` --database "TPCH" ` --user "FastUser" ` --password "FastPassword" ` --sourceschema "TPCH" ` --sourcetable "ORDERS" ` --directory "C:\temp\teradata" ` --fileoutput "teradata_orders.parquet" ` --parallelmethod "Ntile" ` --distributekeycolumn "o_orderkey" ` --paralleldegree 8 ``` The default `adbc_teradata` logon uses TLS and needs no Teradata client software. For the legacy-port logon (no TLS on the server, or `SSL Mode=disable`), see [FASTBCP\_TTU\_PATH](/1.4/documentation/environment-variables/fastbcp-ttu-path.md) and [Connection Parameters](/1.4/documentation/cli/connection_parameters.md#adbc_teradata). tip Build your command with the [Wizard](/latest/wizard.md) --- # Output Formats Examples demonstrating different output formats supported by FastBCP. ## CSV Format[​](#csv-format "Direct link to CSV Format") Standard comma/delimiter-separated values format. ### Basic CSV Export[​](#basic-csv-export "Direct link to Basic CSV Export") ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Sales" ` --directory "C:\temp" ` --fileoutput "sales.csv" ` --decimalseparator "." ` --delimiter "," ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` ### CSV with Custom Delimiter[​](#csv-with-custom-delimiter "Direct link to CSV with Custom Delimiter") Using pipe delimiter for better data separation: ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Sales" ` --directory "C:\temp" ` --fileoutput "sales.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "sale_id" ` --paralleldegree 8 ` --merge "False" ``` ### CSV with European Format[​](#csv-with-european-format "Direct link to CSV with European Format") Using comma as decimal separator (common in European countries): ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Sales" ` --directory "C:\temp" ` --fileoutput "sales_european.csv" ` --decimalseparator "," ` --delimiter ";" ` --dateformat "dd/MM/yyyy HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "sale_id" ` --paralleldegree 8 ` --merge "False" ``` ## Parquet Format[​](#parquet-format "Direct link to Parquet Format") Columnar storage format optimized for analytical queries. ### Basic Parquet Export[​](#basic-parquet-export "Direct link to Basic Parquet Export") ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Sales" ` --directory "C:\temp" ` --fileoutput "sales.parquet" ` --parallelmethod "None" ``` ### Parallel Parquet Export[​](#parallel-parquet-export "Direct link to Parallel Parquet Export") Maximize performance with parallel execution: ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Sales" ` --directory "C:\temp" ` --fileoutput "sales.parquet" ` --parallelmethod "RangeId" ` --distributekeycolumn "sale_id" ` --paralleldegree 12 ` --merge "False" ``` ### Parquet with PostgreSQL[​](#parquet-with-postgresql "Direct link to Parquet with PostgreSQL") ``` .\FastBCP.exe ` --connectiontype "pgcopy" ` --server "localhost" ` --port "5432" ` --database "salesdb" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "sales" ` --directory "C:\temp" ` --fileoutput "pg_sales.parquet" ` --parallelmethod "Physical" ` --paralleldegree 10 ` --merge "False" ``` ### Parquet with Oracle[​](#parquet-with-oracle "Direct link to Parquet with Oracle") ``` .\FastBCP.exe ` --connectiontype "oraodp" ` --server "localhost:1521/ORCLPDB1" ` --user "system" ` --password "password" ` --sourceschema "SYSTEM" ` --sourcetable "SALES" ` --directory "C:\temp" ` --fileoutput "oracle_sales.parquet" ` --parallelmethod "Physical" ` --paralleldegree 8 ` --merge "False" ``` ## Excel Format[​](#excel-format "Direct link to Excel Format") Export data to Microsoft Excel format (.xlsx). Excel Format Excel exports automatically format data for spreadsheet applications. Large datasets may be split across multiple sheets if they exceed Excel's row limits. ### Basic Excel Export[​](#basic-excel-export "Direct link to Basic Excel Export") ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Sales" ` --directory "C:\temp" ` --fileoutput "sales.xlsx" ` --parallelmethod "None" ``` ### Parallel Excel Export[​](#parallel-excel-export "Direct link to Parallel Excel Export") ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Sales" ` --directory "C:\temp" ` --fileoutput "sales.xlsx" ` --parallelmethod "RangeId" ` --distributekeycolumn "sale_id" ` --paralleldegree 6 ` --merge "False" ``` ### Excel with Custom Query[​](#excel-with-custom-query "Direct link to Excel with Custom Query") Export filtered data to Excel: ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --query "SELECT * FROM dbo.Sales WHERE sale_date >= '2024-01-01' AND sale_date < '2025-01-01'" ` --directory "C:\temp" ` --fileoutput "sales_2024.xlsx" ` --parallelmethod "Ntile" ` --distributekeycolumn "sale_id" ` --paralleldegree 4 ` --merge "False" ``` tip Build your command with the [Wizard](/latest/wizard.md) --- # PostgreSQL Examples Comprehensive examples for exporting data from PostgreSQL using native connectors (pgsql, pgcopy). ## Connection Types[​](#connection-types "Direct link to Connection Types") PostgreSQL exports support three connection types: * **pgsql**: Standard PostgreSQL protocol * **pgcopy**: PostgreSQL COPY protocol (fastest for bulk exports) * **adbc\_pgsql**: ADBC FastDriver — ultra-fast, Parquet-only export (see [ADBC Examples](#adbc-examples)) ADBC Support The `adbc_pgsql` connection type uses the Arpe.io ADBC FastDriver for ultra-fast, Arrow-native Parquet exports. Output is Parquet-only — see the [ADBC Examples](#adbc-examples) section below. ## Single-threaded Export[​](#single-threaded-export "Direct link to Single-threaded Export") Simple export without parallelization. * Standard Protocol * COPY Protocol ``` .\FastBCP.exe ` --connectiontype "pgsql" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --query "SELECT * FROM lineitem LIMIT 1000" ` --directory "C:\temp" ` --fileoutput "pg_lineitem.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` ``` .\FastBCP.exe ` --connectiontype "pgcopy" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --query "SELECT * FROM lineitem LIMIT 1000" ` --directory "C:\temp" ` --fileoutput "pg_lineitem.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` ## Parallel Export - Random Method[​](#parallel-export---random-method "Direct link to Parallel Export - Random Method") Export using Random distribution with modulo operation. * Standard Protocol * COPY Protocol ``` .\FastBCP.exe ` --connectiontype "pgsql" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --query "SELECT * FROM lineitem" ` --directory "C:\temp" ` --fileoutput "pg_lineitem_random.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "l_linenumber" ` --paralleldegree 8 ` --merge "False" ` --runid "pgsql_to_csv_parallel8_random" ``` ``` .\FastBCP.exe ` --connectiontype "pgcopy" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --query "SELECT * FROM lineitem" ` --directory "C:\temp" ` --fileoutput "pg_lineitem_random.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "l_linenumber" ` --paralleldegree 8 ` --merge "False" ` --runid "pgcopy_to_csv_parallel8_random" ``` ## Parallel Export - DataDriven Method[​](#parallel-export---datadriven-method "Direct link to Parallel Export - DataDriven Method") Export using DataDriven distribution based on distinct column values. * Standard Protocol * COPY Protocol ``` .\FastBCP.exe ` --connectiontype "pgsql" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "lineitem" ` --directory "C:\temp" ` --fileoutput "pg_lineitem_dd.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "DataDriven" ` --distributekeycolumn "l_shipmode" ` --paralleldegree 10 ` --merge "False" ` --runid "pgsql_to_csv_parallel10_datadriven" ``` ``` .\FastBCP.exe ` --connectiontype "pgcopy" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "lineitem" ` --directory "C:\temp" ` --fileoutput "pg_lineitem_dd.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "DataDriven" ` --distributekeycolumn "l_shipmode" ` --paralleldegree 10 ` --merge "False" ` --runid "pgcopy_to_csv_parallel10_datadriven" ``` ## Parallel Export - Ntile Method[​](#parallel-export---ntile-method "Direct link to Parallel Export - Ntile Method") Export using Ntile for evenly distributed chunks. * Standard Protocol * COPY Protocol **Full table:** ``` .\FastBCP.exe ` --connectiontype "pgsql" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "lineitem" ` --directory "C:\temp" ` --fileoutput "pg_lineitem_ntile.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Ntile" ` --distributekeycolumn "l_orderkey" ` --paralleldegree 12 ` --merge "False" ` --runid "pgsql_to_csv_parallel12_ntile" ``` **With query filter:** ``` .\FastBCP.exe ` --connectiontype "pgsql" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --query "SELECT * FROM lineitem WHERE l_shipdate BETWEEN '1995-01-01' AND '1995-12-31'" ` --directory "C:\temp" ` --fileoutput "pg_lineitem_ntile.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Ntile" ` --distributekeycolumn "l_orderkey" ` --paralleldegree 12 ` --merge "False" ` --runid "pgsql_to_csv_parallel12_ntile_filtered" ``` **Full table:** ``` .\FastBCP.exe ` --connectiontype "pgcopy" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "lineitem" ` --directory "C:\temp" ` --fileoutput "pg_lineitem_ntile.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Ntile" ` --distributekeycolumn "l_orderkey" ` --paralleldegree 12 ` --merge "False" ` --runid "pgcopy_to_csv_parallel12_ntile" ``` **With query filter:** ``` .\FastBCP.exe ` --connectiontype "pgcopy" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --query "SELECT * FROM lineitem WHERE l_shipdate BETWEEN '1995-01-01' AND '1995-12-31'" ` --directory "C:\temp" ` --fileoutput "pg_lineitem_ntile.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Ntile" ` --distributekeycolumn "l_orderkey" ` --paralleldegree 12 ` --merge "False" ` --runid "pgcopy_to_csv_parallel12_ntile_filtered" ``` ## Parallel Export - Physical Method[​](#parallel-export---physical-method "Direct link to Parallel Export - Physical Method") Parallel export using the physical row identifier (ctid). Physical on PostgreSQL With a PostgreSQL connection type (`pgsql`, `pgcopy`, `adbc_pgsql`), the `Physical` method resolves to the ctid strategy (formerly `--parallelmethod Ctid`, now deprecated). It is very efficient for full table exports and does not require a distribute key column. `--sourceschema` and `--sourcetable` are required. * Standard Protocol * COPY Protocol ``` .\FastBCP.exe ` --connectiontype "pgsql" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "lineitem" ` --directory "C:\temp" ` --fileoutput "pg_lineitem_physical.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Physical" ` --paralleldegree 8 ` --merge "False" ` --runid "pgsql_to_csv_parallel8_physical" ``` ``` .\FastBCP.exe ` --connectiontype "pgcopy" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "lineitem" ` --directory "C:\temp" ` --fileoutput "pg_lineitem_physical.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Physical" ` --paralleldegree 8 ` --merge "False" ` --runid "pgcopy_to_csv_parallel8_physical" ``` ## Export to Parquet[​](#export-to-parquet "Direct link to Export to Parquet") Export PostgreSQL data to Parquet format. * Standard Protocol * COPY Protocol **Single-threaded:** ``` .\FastBCP.exe ` --connectiontype "pgsql" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "lineitem" ` --directory "C:\temp" ` --fileoutput "pg_lineitem.parquet" ` --parallelmethod "None" ``` **Parallel with Physical (Ctid):** ``` .\FastBCP.exe ` --connectiontype "pgsql" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "lineitem" ` --directory "C:\temp" ` --fileoutput "pg_lineitem.parquet" ` --parallelmethod "Physical" ` --paralleldegree 10 ` --merge "False" ``` **Single-threaded:** ``` .\FastBCP.exe ` --connectiontype "pgcopy" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "lineitem" ` --directory "C:\temp" ` --fileoutput "pg_lineitem.parquet" ` --parallelmethod "None" ``` **Parallel with Physical (Ctid):** ``` .\FastBCP.exe ` --connectiontype "pgcopy" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "lineitem" ` --directory "C:\temp" ` --fileoutput "pg_lineitem.parquet" ` --parallelmethod "Physical" ` --paralleldegree 10 ` --merge "False" ``` ## ODBC Connection[​](#odbc-connection "Direct link to ODBC Connection") Using ODBC DSN for PostgreSQL connection. **Single-threaded:** ``` .\FastBCP.exe ` --connectiontype "odbc" ` --dsn "PostgreSQL_DSN" ` --directory "C:\temp" ` --fileoutput "pg_test.csv" ` --query "SELECT * FROM public.test_table" ` --parallelmethod "None" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ``` **Parallel Random:** ``` .\FastBCP.exe ` --connectiontype "odbc" ` --dsn "PostgreSQL_DSN" ` --directory "C:\temp" ` --fileoutput "pg_test.csv" ` --query "SELECT * FROM public.test_table" ` --parallelmethod "Random" ` --distributekeycolumn "id" ` --paralleldegree 6 ` --merge "False" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ``` **Parallel DataDriven:** ``` .\FastBCP.exe ` --connectiontype "odbc" ` --dsn "PostgreSQL_DSN" ` --directory "C:\temp" ` --fileoutput "pg_test.csv" ` --query "SELECT * FROM public.test_table" ` --parallelmethod "DataDriven" ` --distributekeycolumn "category" ` --paralleldegree 6 ` --merge "False" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ``` ## ADBC Examples[​](#adbc-examples "Direct link to ADBC Examples") The `adbc_pgsql` connection type uses the Arpe.io ADBC FastDriver for ultra-fast, Arrow-native exports. **Output is Parquet-only** — see [Connection Parameters](/1.4/documentation/cli/connection_parameters.md#connection-type) for details. ``` ./FastBCP \ --connectiontype "adbc_pgsql" \ --server "localhost:5432" \ --user "pytabextract_pguser" \ --password "FastPassword" \ --database "tpch" \ --sourceschema "tpch10" \ --sourcetable "lineitem" \ --directory "./" \ --fileoutput "{sourcetable}.parquet" \ --method "None" ``` tip Build your command with the [Wizard](/latest/wizard.md) --- # SQL Server Examples Comprehensive examples for exporting data from SQL Server (MSSQL, OLEDB, ODBC). ADBC Support SQL Server also supports the `adbc_mssql` connection type, powered by the Arpe.io ADBC FastDriver for ultra-fast, Arrow-native Parquet exports. Output is Parquet-only — see the [ADBC Examples](#adbc-examples) section below. ## Single-threaded Export[​](#single-threaded-export "Direct link to Single-threaded Export") Simple export without parallelization for smaller datasets. ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "FASTExportData" ` --trusted ` --query "SELECT top 1000 * FROM dbo.TEST_71_1M_12m" ` --directory "C:\temp" ` --fileoutput "TEST1000.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` ## Parallel Export - Random Method[​](#parallel-export---random-method "Direct link to Parallel Export - Random Method") Export using Random distribution based on modulo operation. * Windows Authentication * SQL Authentication ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "FASTExportData" ` --trusted ` --query "SELECT * FROM dbo.TEST_71_1M_12m" ` --directory "C:\temp" ` --fileoutput "TEST_71c_1Mr.csv" ` --decimalseparator "," ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "ID_ARTICLE" ` --paralleldegree 8 ` --merge "False" ` --runid "mssql_to_csv_parallel8_random" ``` ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "FASTExportData" ` --user "FastUser" ` --password "FastPassword" ` --query "SELECT * FROM dbo.TEST_71_1M_12m" ` --directory "C:\temp" ` --fileoutput "TEST_71c_1Mr.csv" ` --decimalseparator "," ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "ID_ARTICLE" ` --paralleldegree 8 ` --merge "False" ` --runid "mssql_to_csv_parallel8_random" ``` ## Parallel Export - Physical Method[​](#parallel-export---physical-method "Direct link to Parallel Export - Physical Method") Parallel export using the physical row location (`%%physloc%%`), without a distribute key column. Physical on SQL Server With a SQL Server connection type (`mssql`, `msoledbsql`, `adbc_mssql`), the `Physical` method resolves to the Physloc strategy (formerly `--parallelmethod Physloc`, now deprecated). `--sourceschema` and `--sourcetable` are required. On a clustered columnstore table, FastBCP detects it and splits on the columnstore row id. ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "tpch10_collation_bin2" ` --trusted ` --sourceschema "dbo" ` --sourcetable "orders" ` --directory "D:\temp" ` --fileoutput "mssql_orders.parquet" ` --parallelmethod "Physical" ` --paralleldegree -2 ` --merge "False" ` --runid "mssql_to_parquet_parallel-2_physical" ``` ## Parallel Export - RangeId Method[​](#parallel-export---rangeid-method "Direct link to Parallel Export - RangeId Method") Export using RangeId distribution for evenly distributed integer keys. **Using table name:** ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "tpch10_collation_bin2" ` --trusted ` --sourceschema "dbo" ` --sourcetable "orders" ` --directory "D:\temp" ` --fileoutput "mssql_orders.csv" ` --decimalseparator "," ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "RangeId" ` --distributekeycolumn "o_orderkey" ` --paralleldegree -2 ` --merge "False" ` --runid "mssql_to_csv_parallel-2_rangeid" ``` **Using query with filter:** ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "tpch10_collation_bin2" ` --trusted ` --query "select * from orders WHERE o_orderdate between '19950101' and '19951231'" ` --directory "D:\temp" ` --fileoutput "mssql_orders.csv" ` --decimalseparator "," ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "RangeId" ` --distributekeycolumn "o_orderkey" ` --paralleldegree -2 ` --merge "False" ` --runid "mssql_to_csv_parallel-2_rangeid_using_query" ``` ## Parallel Export - Ntile Method[​](#parallel-export---ntile-method "Direct link to Parallel Export - Ntile Method") Export using Ntile distribution for evenly distributed chunks. **Full table export:** ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "tpch10_collation_bin2" ` --trusted ` --sourceschema "dbo" ` --sourcetable "orders" ` --directory "D:\temp" ` --fileoutput "mssql_orders.csv" ` --decimalseparator "," ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Ntile" ` --distributekeycolumn "o_orderkey" ` --paralleldegree 12 ` --merge "False" ` --runid "mssql_to_csv_parallel12_Ntile" ``` **Filtered export with date column:** ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "tpch10_collation_bin2" ` --trusted ` --query "select * from orders WHERE o_orderdate between '19950101' and '19951231'" ` --directory "D:\temp" ` --fileoutput "mssql_orders.csv" ` --decimalseparator "," ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Ntile" ` --distributekeycolumn "o_orderdate" ` --paralleldegree 12 ` --merge "False" ` --runid "mssql_to_csv_parallel12_Ntile_using_query" ``` ## Parallel Export - DataDriven Method[​](#parallel-export---datadriven-method "Direct link to Parallel Export - DataDriven Method") Export using DataDriven distribution based on distinct values of a column. **Using partition function:** ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "tpch10_collation_bin2" ` --directory "D:\temp" ` --fileoutput "mssql_orders.csv" ` --trusted ` --sourceschema "dbo" ` --sourcetable "orders_part" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "DataDriven" ` --distributekeycolumn "`$partition.PF_DATE(o_orderdate)" ` --merge "False" ` --paralleldegree 10 ``` ## Export to Parquet[​](#export-to-parquet "Direct link to Export to Parquet") Export SQL Server data to Parquet format. **Single-threaded:** ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "faker" ` --trusted ` --sourceschema "dbo" ` --sourcetable "faker_s1000" ` --directory "D:\temp" ` --fileoutput "mssql_faker_s1000.parquet" ` --parallelmethod "None" ` --runid "mssql_to_parquet_NoParallel" ``` **Parallel with RangeId:** ``` .\FastBCP.exe ` --connectiontype "mssql" ` --trusted ` --server "localhost" ` --database "tpch10_collation_bin2" ` --directory "D:\temp" ` --fileoutput "mssql_orders.parquet" ` --parallelmethod "RangeId" ` --distributekeycolumn "o_orderkey" ` --paralleldegree 7 ` --sourceschema "dbo" ` --sourcetable "orders" ` --merge "False" ``` **Parallel with Ntile and query:** ``` .\FastBCP.exe ` --connectiontype "mssql" ` --trusted ` --server "localhost" ` --database "tpch10_collation_bin2" ` --directory "D:\temp" ` --fileoutput "mssql_orders_1995.parquet" ` --parallelmethod "Ntile" ` --distributekeycolumn "o_orderkey" ` --paralleldegree 7 ` --query "select * from dbo.orders where o_orderdate between '1995-01-01' and '1995-12-31'" ` --merge "False" ``` ## OLEDB Connection[​](#oledb-connection "Direct link to OLEDB Connection") Alternative connection method using OLEDB provider. **Single-threaded:** ``` $query="SELECT top 10000 * FROM FASTExportData.dbo.TEST_71_1M_12m" $target="localhost" .\FastBCP.exe ` --connectiontype "oledb" ` --provider "MSOLEDBSQL" ` --server $target ` --directory "C:\temp" ` --fileoutput "TEST.CSV" ` --paralleldegree 1 ` --trusted ` --query $query ` --parallelmethod "None" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ``` **Parallel Random with Windows Auth:** ``` .\FastBCP.exe ` --connectiontype "oledb" ` --provider "MSOLEDBSQL" ` --server $target ` --directory "C:\temp" ` --fileoutput "TEST.CSV" ` --paralleldegree 6 ` --trusted ` --query $query ` --parallelmethod "Random" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --distributekeycolumn "ID_ARTICLE" ` --merge "False" ``` **Parallel Random with SQL Auth:** ``` .\FastBCP.exe ` --connectiontype "oledb" ` --provider "MSOLEDBSQL" ` --server $target ` --directory "C:\temp" ` --fileoutput "TEST.CSV" ` --paralleldegree 6 ` --user "FastUser" ` --password "FastPassword" ` --query $query ` --parallelmethod "Random" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --distributekeycolumn "ID_ARTICLE" ` --merge "False" ``` **Parallel DataDriven:** ``` .\FastBCP.exe ` --connectiontype "oledb" ` --provider "MSOLEDBSQL" ` --server $target ` --directory "C:\temp" ` --fileoutput "TEST.CSV" ` --paralleldegree 6 ` --trusted ` --query $query ` --parallelmethod "DataDriven" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --distributekeycolumn "ID_DECOUPE_GEO" ` --merge "False" ``` ## ODBC Connection[​](#odbc-connection "Direct link to ODBC Connection") Using ODBC DSN for connection. **Single-threaded:** ``` .\FastBCP.exe ` --connectiontype "odbc" ` --dsn "DSN4FastBCP" ` --directory "C:\temp" ` --fileoutput "TEST.CSV" ` --paralleldegree 1 ` --trusted ` --query "SELECT * FROM [TEST_71_1M_12m]" ` --parallelmethod "None" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ``` **Parallel Random with Windows Auth:** ``` .\FastBCP.exe ` --connectiontype "odbc" ` --dsn "DSN4FastBCP" ` --directory "C:\temp" ` --fileoutput "TEST.CSV" ` --paralleldegree 6 ` --trusted ` --query "SELECT * FROM [TEST_71_1M_12m]" ` --parallelmethod "Random" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --distributekeycolumn "ID_ARTICLE" ` --merge "False" ``` **Parallel Random with SQL Auth:** ``` .\FastBCP.exe ` --connectiontype "odbc" ` --dsn "DSN4FastBCP" ` --directory "C:\temp" ` --fileoutput "TEST.CSV" ` --paralleldegree 6 ` --user "FastUser" ` --password "FastPassword" ` --query "SELECT * FROM [TEST_71_1M_12m]" ` --parallelmethod "Random" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --distributekeycolumn "ID_ARTICLE" ` --merge "False" ``` **Parallel DataDriven:** ``` .\FastBCP.exe ` --connectiontype "odbc" ` --dsn "DSN4FastBCP" ` --directory "C:\temp" ` --fileoutput "TEST.CSV" ` --paralleldegree 6 ` --trusted ` --query "SELECT * FROM [TEST_71_1M_12m]" ` --parallelmethod "DataDriven" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --distributekeycolumn "ID_GEO" ` --merge "False" ``` ## ADBC Examples[​](#adbc-examples "Direct link to ADBC Examples") The `adbc_mssql` connection type uses the Arpe.io ADBC FastDriver for ultra-fast, Arrow-native exports. **Output is Parquet-only** — see [Connection Parameters](/1.4/documentation/cli/connection_parameters.md#connection-type) for details. **Single-threaded export:** ``` ./FastBCP \ --connectiontype "adbc_mssql" \ --server "localhost,1433" \ --database "tpch" \ --user "migadmin" \ --password "FastPassword" \ --sourceschema "tpch10" \ --sourcetable "lineitem" \ --directory "./" \ --fileoutput "{sourcetable}.parquet" \ --method "None" ``` **Parallel export with RangeId and license file:** ``` .\FastBCP.exe ` --connectiontype "adbc_mssql" ` --server "localhost" ` --trusted ` --database "TPCH_SF100_NOBACKUP" ` --sourceschema "dbo" ` --sourcetable "lineitem_ci" ` --fileoutput "{sourcetable}.parquet" ` --directory "B:\export\{sourcetable}\" ` --parquetcompression "None" ` --parallelmethod "RangeId" ` --distributekeycolumn "l_orderkey" ` --degree 32 ` --runid "1.2.0" ` --licence "C:\Sources\FastBCP\FastBCP_AetP.lic" ``` tip Build your command with the [Wizard](/latest/wizard.md) --- # Configuration Examples Here are sample configuration files for different logging scenarios: ## FastBCP\_Settings.json : Sinks on Console + Files (Windows path style) + MSSQL[​](#fastbcp_settingsjson---sinks-on-console--files-windows-path-style--mssql "Direct link to FastBCP_Settings.json : Sinks on Console + Files (Windows path style) + MSSQL") For logs with Console + Files stored on Windows machine + MSSQL sinks: ``` { "ConnectionStrings": { "MS_FastBCPLogs": "Server=localhost;Database=FastBCPLogs;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\\FastBCP_.json", "retainedFileCountLimit": 10, "rollingInterval": "Day", "rollOnFileSizeLimit": true } }, { "Name": "MSSqlServer", "Args": { "connectionString": "MS_FastBCPLogs", "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": "FastBCP" } } } ``` ## FastBCP\_Settings\_Linux\_Console\_Files.json[​](#fastbcp_settings_linux_console_filesjson "Direct link to FastBCP_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/FastBCP_.json", "retainedFileCountLimit": 10, "rollingInterval": "Day", "rollOnFileSizeLimit": true } } ], "Enrich": [ "FromLogContext", "WithMachineName", "WithProcessId", "WithThreadId" ], "Properties": { "Application": "FastBCP" } } } ``` ## FastBCP\_Settings\_Map\_for\_Windows.json[​](#fastbcp_settings_map_for_windowsjson "Direct link to FastBCP_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}\\FastBCP-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": "FastBCP" } } } ``` ## FastBCP\_Settings\_Map\_for\_Linux\_and\_Container.json[​](#fastbcp_settings_map_for_linux_and_containerjson "Direct link to FastBCP_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}/FastBCP-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": "FastBCP" } } } ``` ## FastBCP\_Settings\_Log\_to\_PGSQL.json : Console + PostgreSQL log database[​](#fastbcp_settings_log_to_pgsqljson--console--postgresql-log-database "Direct link to FastBCP_Settings_Log_to_PGSQL.json : Console + PostgreSQL log database") ``` { "ConnectionStrings": { "PG_FastBCPLogs": "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_FastBCPLogs", "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": "FastBCP" } } } ``` ## FastBCP\_Settings\_OpenTelemetry.json[​](#fastbcp_settings_opentelemetryjson "Direct link to FastBCP_Settings_OpenTelemetry.json") For Console with trace correlation and OpenTelemetry log export (e.g., to [Jaeger](https://www.jaegertracing.io/)): ``` { "Serilog": { "MinimumLevel": { "Default": "Debug", "Override": { "Microsoft": "Warning", "System": "Warning" } }, "Properties": { "LogDirectory": "logs" }, "Enrich": [ "FromLogContext", "WithEnvironmentUserName", "WithProcessId", "WithThreadId", "WithMachineName", "fulltargetname" ], "WriteTo": [ { "Name": "Console", "Args": { "restrictedToMinimumLevel": "Information", "outputTemplate": "{Timestamp:yyyy-MM-ddTHH:mm:ss.fff zzz} -|- {Application} -|- {Level:u12} -|- {fulltargetname} -|- TraceId={TraceId} SpanId={SpanId} -|- {Message}{NewLine}{Exception}", "theme": "Serilog.Sinks.SystemConsole.Themes.SystemConsoleTheme::Literate, Serilog.Sinks.Console" } }, { "Name": "OpenTelemetry", "Args": { "Endpoint": "http://localhost:4317", "Protocol": "Grpc", "ResourceAttributes": { "service.name": "FastBCP", "deployment.environment": "local-test" } } } ] } } ``` Usage with the `--traceparent` parameter to correlate with an upstream caller: ``` ./FastBCP \ --connectiontype mssql \ --server localhost \ --database "tpch10" \ --trusted \ --query "SELECT * FROM dbo.orders" \ --directory "/data/temp" \ --fileoutput "orders.csv" \ --traceparent "00-abcdef1234567890abcdef1234567890-1234567890abcdef-01" \ --settingsfile "/config/FastBCP_Settings_OpenTelemetry.json" ``` **Result in Jaeger UI:** ![FastBCP OpenTelemetry result in Jaeger UI](/assets/images/FastBCP_OpenTelemetry_result_sample-729a1de4f4ccde92a0856f3f4e8b9468.jpg) --- # Log Database FastBCP 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 `FastBCP_settings.json` * You can specify a custom settings file using the `--settingsfile` parameter Information **Log table is created automatically if not exists but it is not indexed.** Up to you to choose you indexed column(s) you prefer to index. We Advice you to index event\_timestamp column and run\_id Information No internal purge of the log table, it is up to you to decide when and how filter the log table Complete configuration examples for both MSSQL and PostgreSQL are available in the [Configuration Examples](/1.4/documentation/logging/examples.md#fastbcp_settingsjson-for-windows) page. Information **In case the database is not reachable, FastBCP will fail and will refuse to continue.** If you want to continue without logging in the database, you can rename the `FastBCP_settings.json` file to something else (like `FastBCP_settings.json.save`) and FastBCP 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 ***FastBCP\_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}/FastBCP-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**: [FastBCP\_Settings\_Map\_for\_Windows.json](/1.4/documentation/logging/examples.md#fastbcp_settings_map_for_windowsjson) * **Linux/Container**: [FastBCP\_Settings\_Map\_for\_Linux\_and\_Container.json](/1.4/documentation/logging/examples.md#fastbcp_settings_map_for_linux_and_containerjson) --- # Log Levels FastBCP 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 | | **Critical** | Severe errors causing termination | Fatal application errors | ## Configuration[​](#configuration "Direct link to Configuration") You can also configure the log level in the `FastBCP_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\\FastBCP_.json", "rollingInterval": "Day" } } ] } } ``` --- # OpenTelemetry FastBCP supports [OpenTelemetry](https://opentelemetry.io/) for distributed tracing and log correlation. This allows you to correlate FastBCP operations with upstream callers (orchestrators, APIs, pipelines) and export structured logs to any OpenTelemetry-compatible backend such as [Jaeger](https://www.jaegertracing.io/), [Zipkin](https://zipkin.io/), or [Grafana Tempo](https://grafana.com/oss/tempo/). ## The `--traceparent` Parameter[​](#the---traceparent-parameter "Direct link to the---traceparent-parameter") The `--traceparent` parameter accepts a [W3C Trace Context](https://www.w3.org/TR/trace-context/) traceparent identifier. When provided, FastBCP uses this trace context to link its internal spans and logs to the calling system's trace, enabling end-to-end distributed tracing. **Syntax:** * Long form only: `--traceparent ""` **Format:** The traceparent value follows the W3C Trace Context specification: ``` {version}-{trace-id}-{parent-id}-{trace-flags} ``` | Field | Format | Description | | --------------- | ------------- | --------------------------------------------- | | **version** | 2 hex digits | Version of the trace context (currently `00`) | | **trace-id** | 32 hex digits | Globally unique trace identifier | | **parent-id** | 16 hex digits | Identifier of the calling span | | **trace-flags** | 2 hex digits | Trace flags (e.g., `01` for sampled) | **Example:** * Windows * Linux ``` .\FastBCP.exe ` ... --traceparent "00-abcdef1234567890abcdef1234567890-1234567890abcdef-01" ` ... ``` ``` ./FastBCP \ ... --traceparent "00-abcdef1234567890abcdef1234567890-1234567890abcdef-01" \ ... ``` Tips Pass the traceparent from your orchestrator (Airflow, Kestra, CI/CD pipeline, or any OpenTelemetry-instrumented caller) so that FastBCP operations appear as child spans in your distributed traces. ## Configuring the OpenTelemetry Endpoint[​](#configuring-the-opentelemetry-endpoint "Direct link to Configuring the OpenTelemetry Endpoint") FastBCP uses the Serilog OpenTelemetry sink to export logs. You can configure the endpoint using either **environment variables** or a **`FastBCP_Settings.json`** file. ### Using Environment Variables[​](#using-environment-variables "Direct link to Using Environment Variables") Set the `OTEL_EXPORTER_OTLP_ENDPOINT` environment variable to point to your OpenTelemetry collector: * Windows * Linux ``` $env:OTEL_EXPORTER_OTLP_ENDPOINT = "http://localhost:4317" ``` ``` export OTEL_EXPORTER_OTLP_ENDPOINT="http://localhost:4317" ``` ### Using `FastBCP_Settings.json`[​](#using-fastbcp_settingsjson "Direct link to using-fastbcp_settingsjson") Add the OpenTelemetry sink to the `WriteTo` section of your `FastBCP_Settings.json` file. This gives you full control over the protocol, endpoint, and resource attributes. ``` { "Serilog": { "MinimumLevel": { "Default": "Debug", "Override": { "Microsoft": "Warning", "System": "Warning" } }, "Properties": { "LogDirectory": "logs" }, "Enrich": [ "FromLogContext", "WithEnvironmentUserName", "WithProcessId", "WithThreadId", "WithMachineName", "fulltargetname" ], "WriteTo": [ { "Name": "Console", "Args": { "restrictedToMinimumLevel": "Information", "outputTemplate": "{Timestamp:yyyy-MM-ddTHH:mm:ss.fff zzz} -|- {Application} -|- {Level:u12} -|- {fulltargetname} -|- TraceId={TraceId} SpanId={SpanId} -|- {Message}{NewLine}{Exception}", "theme": "Serilog.Sinks.SystemConsole.Themes.SystemConsoleTheme::Literate, Serilog.Sinks.Console" } }, { "Name": "OpenTelemetry", "Args": { "Endpoint": "http://localhost:4317", "Protocol": "Grpc", "ResourceAttributes": { "service.name": "FastBCP", "deployment.environment": "local-test" } } } ] } } ``` **Key settings in the OpenTelemetry sink:** | Setting | Description | | ---------------------- | ----------------------------------------------------------------------------- | | **Endpoint** | URL of your OpenTelemetry collector (default: `http://localhost:4317`) | | **Protocol** | Transport protocol: `Grpc` (default) or `HttpProtobuf` | | **ResourceAttributes** | Key-value pairs attached to every log entry (e.g., service name, environment) | Information The `TraceId` and `SpanId` fields in the console output template allow you to see trace correlation directly in the console logs, even without an OpenTelemetry backend. note When both an environment variable and a `FastBCP_Settings.json` configuration are present, the settings file takes precedence for the OpenTelemetry sink configuration. --- # Logging Overview ## Parameter Logs targets using FastBCP\_settings.json[​](#parameter-logs-targets-using-fastbcp_settingsjson "Direct link to Parameter Logs targets using FastBCP_settings.json") In FastBCP can log informations in 3 modes : * **[Console](/1.4/documentation/logging/logs-level.md)** * **[Database (MSSQL and PostgreSQL Only)](/1.4/documentation/logging/log-database.md)** * **[File (or Map)](/1.4/documentation/logging/log-files-names-mapping-using-variables.md)** FastBCP also supports **[OpenTelemetry](/1.4/documentation/logging/OpenTelemetry.md)** for distributed tracing and log export to any OpenTelemetry-compatible backend. Tips You can use several targets (sinks) at the same time. You can adapt what and where you want to log using the `FastBCP_settings.json` file. By default if no custom path is provided, FastBCP looks for the settings file in : * the current directory (the working directory) * the same directory where the FastBCP executable is located (the executable directory). If this file is not present, FastBCP will use the console log only. You can specify a custom path to the settings file using the `-f` or `--settingsfile` parameter. * Windows * Linux ``` .\FastBCP.exe ` --connectiontype mssql ` --server localhost ` --database "tpch10_collation_bin2" ` --trusted ` --query "SELECT * FROM dbo.orders" ` --directory "D:\temp" ` --fileoutput "mssql_orders.csv" ` --parallelmethod Ntile ` --distributekeycolumn "o_orderkey" ` --paralleldegree 7 ` --settingsfile "D:\logs\config\FastBCP_settings.json" ``` ``` ./FastBCP \ --connectiontype mssql \ --server localhost \ --database "tpch10_collation_bin2" \ --trusted \ --query "SELECT * FROM dbo.orders" \ --directory "/data/temp" \ --fileoutput "mssql_orders.csv" \ --parallelmethod Ntile \ --distributekeycolumn "o_orderkey" \ --paralleldegree 7 \ --settingsfile "/etc/fastbcp/FastBCP_settings.json" ``` Some settings files samples can be found in the [Configuration Examples](/1.4/documentation/logging/examples.md) page. --- # Installation ## Instructions[​](#instructions "Direct link to Instructions") * Windows * Linux * Docker/MacOS To start using FastBCP, first **[request a trial](https://arpe.io/get-trial?product=FastBCP)** to download the latest version. Once downloaded, unzip FastBCP to a directory of your choice. ``` Expand-Archive -Path .\FastBCP.zip -DestinationPath .\FastBCP ``` You can verify the installation by checking the version: ``` .\FastBCP.exe --version ``` To start using FastBCP, first **[request a trial](https://arpe.io/get-trial?product=FastBCP)** to download the latest version. Once downloaded, unzip FastBCP to a directory of your choice. ``` unzip FastBCP.zip -d FastBCP ``` On **Linux**, you need to give execution rights to the FastBCP binary: ``` chmod +x FastBCP ```
You can verify the installation by checking the version: ``` ./FastBCP --version ``` FastBCP is available as a Docker image on **[Docker Hub](https://hub.docker.com/repository/docker/arpeio/fastbcp/general)**. Pull the latest version: ``` docker pull arpeio/fastbcp ``` Or pull a specific version: ``` docker pull arpeio/fastbcp:v0.0.0 ``` You can verify the installation by checking the version: ``` docker run --rm arpeio/fastbcp:latest --version ```
**You are now ready to run FastBCP.** License Information After the trial period you will need a valid license. By default, FastBCP will try to find a `FastBCP.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 FastBCP : | 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 in order to use it with ODBC or OLEDB connection type. --- # Apache Airflow [Apache Airflow](https://airflow.apache.org/) is a powerful open-source platform for developing, scheduling, and monitoring batch-oriented workflows. FastBCP 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") FastBCP provides an official Docker image available on Docker Hub: **Image:** `arpeio/fastbcp:latest`
**Repository:** ## Prerequisites[​](#prerequisites "Direct link to Prerequisites") ### Install Docker Provider[​](#install-docker-provider "Direct link to Install Docker Provider") To use FastBCP 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. FastBCP integration requires connections for your source database and cloud storage. ### 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:** `host.docker.internal` (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) AWS Connection (for S3 Export)[​](#b-aws-connection-for-s3-export "Direct link to B) AWS Connection (for S3 Export)") Create an AWS connection to pass cloud credentials to the container: 1. Navigate to **Admin** → **Connections** in the Airflow UI 2. Click **+** to create a new connection 3. In the **Connection Type** dropdown, select **Amazon Web Services** 4. Configure the connection: **Connection Settings:** * **Connection Id:** `aws_fastbcp` (or your preferred name) * **Connection Type:** `Amazon Web Services` (select this from the dropdown) * **AWS Access Key ID:** Your AWS access key (in the Login field) * **AWS Secret Access Key:** Your AWS secret key (in the Password field) * **Extra:** `{"region_name":"eu-west-1"}` (or your preferred region) tip Airflow AWS providers commonly use `region_name` in Extra JSON. Alternatively, you can use `{"region":"eu-west-1"}` or `{"aws_default_region":"eu-west-1"}`. ## 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 FastBCP 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., `fastbcp_orders_mssql_to_s3.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 _mssql_parts(conn_id: str): """ Extract MSSQL connection details from Airflow connection. Expected Airflow connection (using ODBC): - Conn Id: mssql_tpch10 (conn_type: odbc) - Host: host.docker.internal - Port: 11433 - Login/Password: FastLogin / FastPassword - Extra JSON: {"database":"tpch10"} """ c = BaseHook.get_connection(conn_id) host = c.host port = c.port user = c.login pwd = c.password # For ODBC MSSQL, the database is typically stored in Extra JSON # (because the UI may not expose a dedicated "Database" field). db = c.extra_dejson.get("database") or c.schema if not db: raise ValueError( f"Connection '{conn_id}': missing database. Put it in Extra JSON " f'{{"database":"tpch10"}} (recommended for ODBC).' ) return host, port, user, pwd, db def _aws_env(conn_id: str): """ Extract AWS credentials from Airflow connection and map to container env vars. Expected Airflow AWS connection: - Conn Id: aws_fastbcp - Conn Type: Amazon Web Services - Login -> AWS_ACCESS_KEY_ID - Password -> AWS_SECRET_ACCESS_KEY - Extra -> {"region_name":"eu-west-1"} (or your region) Returns a dictionary with: - AWS_ACCESS_KEY_ID - AWS_SECRET_ACCESS_KEY - AWS_DEFAULT_REGION """ c = BaseHook.get_connection(conn_id) # Keys can be in login/password or in Extra JSON access_key = c.login or c.extra_dejson.get("aws_access_key_id") secret_key = c.password or c.extra_dejson.get("aws_secret_access_key") # Airflow AWS providers commonly use "region_name" in Extra JSON region = ( c.extra_dejson.get("region_name") or c.extra_dejson.get("region") or c.extra_dejson.get("aws_default_region") ) missing = [ k for k, v in { "AWS_ACCESS_KEY_ID": access_key, "AWS_SECRET_ACCESS_KEY": secret_key, "AWS_DEFAULT_REGION": region, }.items() if not v ] if missing: raise ValueError( f"Connection '{conn_id}': missing AWS fields: {missing}. " f"Set login/password and add Extra.region_name (or region)." ) return { "AWS_ACCESS_KEY_ID": access_key, "AWS_SECRET_ACCESS_KEY": secret_key, "AWS_DEFAULT_REGION": region, } with DAG( dag_id="fastbcp_export_orders_parquet_to_s3", start_date=datetime(2025, 1, 1), schedule=None, catchup=False, tags=["fastbcp", "mssql", "s3", "docker"], ) as dag: mssql_host, mssql_port, mssql_user, mssql_pwd, mssql_db = _mssql_parts("mssql_tpch10") aws_env = _aws_env("aws_fastbcp") DockerOperator( task_id="export_orders_parquet_to_s3", image="arpeio/fastbcp: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, environment=aws_env, command=[ "--connectiontype", "mssql", "--server", f"{mssql_host},{mssql_port}", "--user", mssql_user, "--password", mssql_pwd, "--database", mssql_db, "--sourceschema", "dbo", "--sourcetable", "orders", "--fileoutput", "orders.parquet", "--directory", "s3://fastbcp-export/orders/parquet", "--parallelmethod", "Ntile", "--paralleldegree", "12", "--distributekeycolumn", "o_orderkey", "--merge", "false", "--nobanner", ], network_mode="bridge", ) ``` **Key Parameters:** * `image`: Specifies the FastBCP Docker image * `docker_url`: Docker daemon endpoint * `environment`: Dictionary of environment variables (AWS credentials in this case) * `command`: List of FastBCP CLI arguments * `auto_remove`: Automatically remove the container after successful execution ### Helper Functions Explained[​](#helper-functions-explained "Direct link to Helper Functions Explained") The DAG includes two utility functions: #### `_mssql_parts(conn_id)`[​](#_mssql_partsconn_id "Direct link to _mssql_partsconn_id") Extracts connection details from an Airflow ODBC connection. This function: * Retrieves host, port, username, and password * Extracts the database name from the Extra JSON field * Returns all components needed to build the FastBCP connection string #### `_aws_env(conn_id)`[​](#_aws_envconn_id "Direct link to _aws_envconn_id") Extracts AWS credentials from an Airflow AWS connection and maps them to the environment variables expected by FastBCP: * `AWS_ACCESS_KEY_ID` * `AWS_SECRET_ACCESS_KEY` * `AWS_DEFAULT_REGION` This function supports multiple Extra JSON formats for flexibility. ## Logging[​](#logging "Direct link to Logging") All FastBCP 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., `fastbcp_export_orders_parquet_to_s3`) 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: * FastBCP 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 16:15:37] INFO - Settings file not found in the working directory nor in the executable directory [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.882 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- The "FastBCP_Settings.json" file does not exist. Using default settings. Console Only with loglevel=Information [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.892 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- FastBCP Trial – will expires on "2026‑03‑27" (24 day(s) left). [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.892 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Starting [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- FastBCP Version : "0.29.2.0" Architecture : "X64" - Framework : ".NET 8.0.24" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Internal Trace ID : "5ccea857-1538-4a28-8b1c-cfe5c51fbd43" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Internal Run ID : "5ccea857-1538-4a28-8b1c-cfe5c51fbd43" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- OS : "Debian GNU/Linux 13 (trixie)" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Connection Type : "mssql" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Source SqlInstance : "sql22,1433" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Source Database : "tpch" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Source Schema : "tpch10" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Source Table : "orders" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Trusted Connection : False [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- User : "migadmin" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Output File : "orders.parquet" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Output Directory : /data/parquet [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Degree : 12 [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Distribute Method : "Ntile" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Distribute Column : "o_orderkey" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Decimal Separator : "," [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Delimiter : "|" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Use quotes : False [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Date format: "yyyy-MM-dd" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Encoding : "UTF-8" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- No Header : False [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Timestamped : False [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Boolean Format : "automatic" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Cloud Profile : "" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Application Intent : "ReadOnly" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.906 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- file extension is ".parquet" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.909 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Encoding used : Unicode (UTF-8) - 65001 - utf-8 [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.965 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- 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=FastBCP;Application Intent=ReadOnly" [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.086 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- 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 16:15:38] INFO - 2026-03-02T15:15:38.110 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Get DataTypes with header end : Elapsed=6 ms [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Data Segments Computation Completed in 260 ms [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Distribute Column Type : "Int32" [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 0 : 1 : 1 - 5000001 or "o_orderkey" is null [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 1 : 2 : 5000002 - 10000002 [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 2 : 3 : 10000003 - 15000003 [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 3 : 4 : 15000004 - 20000004 [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 4 : 5 : 20000005 - 25000005 [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 5 : 6 : 25000006 - 30000006 [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 6 : 7 : 30000007 - 35000007 [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 7 : 8 : 35000032 - 40000032 [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 8 : 9 : 40000033 - 45000033 [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 9 : 10 : 45000034 - 50000034 [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 10 : 11 : 50000035 - 55000035 [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 11 : 12 : 55000036 - 60000000 [2026-03-02 16:15:46] INFO - 2026-03-02T15:15:46.611 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 002 for o_orderkey between 10000003 and 15000003 into /data/parquet/orders_chunk_002.parquet : 1250001 rows x 9 columns in 8234ms [2026-03-02 16:15:46] INFO - 2026-03-02T15:15:46.611 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 011 for o_orderkey between 55000036 and 60000000 into /data/parquet/orders_chunk_011.parquet : 1249989 rows x 9 columns in 8234ms [2026-03-02 16:15:46] INFO - 2026-03-02T15:15:46.790 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 003 for o_orderkey between 15000004 and 20000004 into /data/parquet/orders_chunk_003.parquet : 1250001 rows x 9 columns in 8413ms [2026-03-02 16:15:46] INFO - 2026-03-02T15:15:46.797 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 005 for o_orderkey between 25000006 and 30000006 into /data/parquet/orders_chunk_005.parquet : 1250001 rows x 9 columns in 8420ms [2026-03-02 16:15:46] INFO - 2026-03-02T15:15:46.936 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 008 for o_orderkey between 40000033 and 45000033 into /data/parquet/orders_chunk_008.parquet : 1250001 rows x 9 columns in 8559ms [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.139 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 010 for o_orderkey between 50000035 and 55000035 into /data/parquet/orders_chunk_010.parquet : 1250001 rows x 9 columns in 8763ms [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.154 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 000 for o_orderkey between 1 and 5000001 into /data/parquet/orders_chunk_000.parquet : 1250001 rows x 9 columns in 8777ms [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.247 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 009 for o_orderkey between 45000034 and 50000034 into /data/parquet/orders_chunk_009.parquet : 1250001 rows x 9 columns in 8870ms [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.308 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 006 for o_orderkey between 30000007 and 35000007 into /data/parquet/orders_chunk_006.parquet : 1250001 rows x 9 columns in 8931ms [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.309 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 001 for o_orderkey between 5000002 and 10000002 into /data/parquet/orders_chunk_001.parquet : 1250001 rows x 9 columns in 8932ms [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.363 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 007 for o_orderkey between 35000032 and 40000032 into /data/parquet/orders_chunk_007.parquet : 1250001 rows x 9 columns in 8986ms [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.366 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 004 for o_orderkey between 20000005 and 25000005 into /data/parquet/orders_chunk_004.parquet : 1250001 rows x 9 columns in 8989ms [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- files generation end : Elapsed=9257 ms - maxdop=12 [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total data rows : 15000000 [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total data columns : 9 [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total cells : 135000000 [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Throughput rows : 1568531 rows/s [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Throughput cells : 14116787 cells/s [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total time : Elapsed=9563 ms [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total data rows : 15000000 [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total data columns : 9 [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total cells : 135000000 [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Final Throughput rows : 1568482 rows/s [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Final Throughput cells : 14116346 cells/s [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Completed Load [2026-03-02 16:15:47] INFO - Task instance in success state [2026-03-02 16:15:47] INFO - Previous state of the Task instance: TaskInstanceState.RUNNING [2026-03-02 16:15:47] INFO - Task operator: ``` --- # Docker Minimal, production-ready container image to run FastBCP, a high-performance bulk copy 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/FastBCP` * **Repository**: [FastBCP-Image on GitHub](https://github.com/arpe-io/FastBCP-Image) * **DockerHub**: [arpeio/fastbcp](https://hub.docker.com/repository/docker/arpeio/fastbcp/general) * Published automatically via GitHub Actions for each new release and weekly security updates ## Prerequisites[​](#prerequisites "Direct link to Prerequisites") * Docker 24+ (or Podman) * FastBCP Linux x64 ≥ 0.28.0 binary (for build only) * Optional: `FastBCP_Settings.json` to mount/copy into `/config` for custom logging settings ## Using the Prebuilt Image from DockerHub[​](#using-the-prebuilt-image-from-dockerhub "Direct link to Using the Prebuilt Image from DockerHub") You can use a prebuilt image from DockerHub that already includes the FastBCP binary. You must provide your own license at runtime. ### Available Tags[​](#available-tags "Direct link to Available Tags") * **Version-specific tags** are aligned with FastBCP releases (e.g., `v0.28.3`) * **`latest` tag** always points to the most recent FastBCP version ### Automatic Updates[​](#automatic-updates "Direct link to Automatic Updates") * **New releases**: Images are automatically built when new FastBCP versions are released * **Security updates**: The latest version of each minor branch (e.g., latest v0.27.x, v0.28.x, v0.29.x) is automatically rebuilt weekly (every Monday) with the latest base image and security patches * This ensures that all actively used versions remain secure without breaking compatibility * Example: If you use `v0.28.8` (latest of 0.28.x branch), it gets security updates even after `v0.29.0` is released ### Pull the Image[​](#pull-the-image "Direct link to Pull the Image") ``` # Latest version docker pull arpeio/fastbcp:latest # Specific version docker pull arpeio/fastbcp:v0.28.3 ``` ### Basic Commands[​](#basic-commands "Direct link to Basic Commands") ``` # Get command line help docker run --rm arpeio/fastbcp:latest # Check version docker run --rm arpeio/fastbcp:latest --version ``` ### License Requirement[​](#license-requirement "Direct link to License Requirement") Since version 0.28.0, pass the license content directly via `--license "…"`. ``` export licenseContent=$(cat ./FastBCP.lic) # Use $licenseContent in your docker run commands docker run --rm arpeio/fastbcp: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. ## Usage Examples[​](#usage-examples "Direct link to Usage Examples") The Docker image uses the FastBCP binary as its entrypoint, so you can run it directly with parameters as defined in the [FastBCP documentation](/latest/.md). ### Example 1: SQL Server → Parquet on S3[​](#example-1-sql-server--parquet-on-s3 "Direct link to Example 1: SQL Server → Parquet on S3") ``` export licenseContent=$(cat ./FastBCP.lic) docker run --rm \ -e AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID} \ -e AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY} \ -e AWS_REGION=${AWS_REGION} \ arpeio/fastbcp:latest \ --connectiontype "mssql" \ --server "host.docker.internal,1433" \ --user "FastUser" \ --password "FastPassword" \ --database "tpch_test" \ --query "SELECT * FROM dbo.orders WHERE year(o_orderdate)=1998" \ --fileoutput "orders.parquet" \ --directory "s3://arpeioftoutput/dockertest/" \ --paralleldegree 12 \ --parallelmethod "Ntile" \ --distributekeycolumn "o_orderkey" \ --merge false \ --license "$licenseContent" ``` ### Example 2: SQL Server → CSV with Custom Logging[​](#example-2-sql-server--csv-with-custom-logging "Direct link to Example 2: SQL Server → CSV with Custom Logging") ``` export licenseContent=$(cat ./FastBCP.lic) docker run --rm \ -v fastbcp-config:/config \ -v fastbcp-data:/data \ -v fastbcp-logs:/logs \ arpeio/fastbcp:latest \ --settingsfile "/config/FastBCP_Settings_Logs_To_Files.json" \ --connectiontype "mssql" \ --server "host.docker.internal,1433" \ --user "FastUser" \ --password "FastPassword" \ --database "tpch_test" \ --query "SELECT * FROM dbo.orders WHERE year(o_orderdate)=1998" \ --fileoutput "orders.csv" \ --directory "/data/orders/csv" \ --delimiter "|" \ --decimalseparator "." \ --dateformat "yyyy-MM-dd HH:mm:ss" \ --paralleldegree 12 \ --parallelmethod "Ntile" \ --distributekeycolumn "o_orderkey" \ --merge false \ --license "$licenseContent" ``` ### Example 3: PostgreSQL → Parquet on Azure Data Lake Storage (ADLS)[​](#example-3-postgresql--parquet-on-azure-data-lake-storage-adls "Direct link to Example 3: PostgreSQL → Parquet on Azure Data Lake Storage (ADLS)") ``` export licenseContent=$(cat ./FastBCP.lic) export adlscontainer="arpeioadlseu" docker run --rm \ -e AZURE_CLIENT_ID=${AZURE_CLIENT_ID} \ -e AZURE_TENANT_ID=${AZURE_TENANT_ID} \ -e AZURE_CLIENT_SECRET=${AZURE_CLIENT_SECRET} \ arpeio/fastbcp:latest \ --connectiontype "pgcopy" \ --server "host.docker.internal:15432" \ --user "FastUser" \ --password "FastPassword" \ --database "tpch" \ --sourceschema "tpch_10" \ --sourcetable "orders" \ --query "SELECT * FROM tpch_10.orders WHERE o_orderdate >= '1998-01-01' AND o_orderdate < '1999-01-01'" \ --fileoutput "orders.parquet" \ --directory "abfss://${adlscontainer}.dfs.core.windows.net/fastbcpoutput/testdfs/orders" \ --paralleldegree -2 \ --parallelmethod "Physical" \ --license "$licenseContent" ``` ### Example 4: Oracle → Parquet on Google Cloud Storage (GCS)[​](#example-4-oracle--parquet-on-google-cloud-storage-gcs "Direct link to Example 4: Oracle → Parquet on Google Cloud Storage (GCS)") ``` export licenseContent=$(cat ./FastBCP.lic) export gcsbucket="arpeio-gcs-bucket" export GOOGLE_APPLICATION_CREDENTIALS_JSON=$(cat ./gcp-credentials.json) docker run --rm \ -e GOOGLE_APPLICATION_CREDENTIALS="${GOOGLE_APPLICATION_CREDENTIALS_JSON}" \ arpeio/fastbcp:latest \ --connectiontype "oraodp" \ --server "host.docker.internal:1521/FREEPDB1" \ --user "TPCH_IN" \ --password "TPCH_IN" \ --database "FREEPDB1" \ --sourceschema "TPCH_IN" \ --sourcetable "ORDERS" \ --fileoutput "orders.parquet" \ --directory "gs://${gcsbucket}/fastbcpoutput/testgs/orders" \ --parallelmethod "Physical" \ --paralleldegree -2 \ --license "$licenseContent" ``` ## Volumes[​](#volumes "Direct link to Volumes") The Docker image declares several volumes to organize data and configuration: ``` VOLUME ["/config", "/data", "/work", "/logs"] ``` ### Volume Configuration and Access Modes[​](#volume-configuration-and-access-modes "Direct link to Volume Configuration and Access Modes") | **Volume** | **Purpose** | **Access Mode** | **Notes** | | ---------- | ------------------------------------------------------------------- | --------------------- | ----------------------------------------------- | | `/config` | Contains user-provided configuration files (e.g., Serilog settings) | Read-only / Read-many | Shared across multiple containers; not modified | | `/data` | Input/output data directory | 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 FastBCP Logging[​](#configuring-fastbcp-logging "Direct link to Configuring FastBCP Logging") info Available starting from version v0.28.3 FastBCP supports custom logging configuration through an external Serilog settings file in JSON format. This allows you to control how and where logs are written — to the console, to files, or dynamically per run. You can download an example logging settings file directly from GitHub: [FastBCP\_Settings\_Logs\_To\_Files.json](https://raw.githubusercontent.com/aetperf/FastBCP-Image/main/FastBCP_Settings_Logs_To_Files.json) Custom settings files must be mounted into the container under the `/config` directory. ### 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") The following configuration is recommended for most production or Airflow environments. It writes: * Logs to the console for real-time visibility * Run summary logs to `/airflow/xcom/return.json` for Airflow integration * Per-run logs under `/logs`, automatically named with `{LogTimestamp}` and `{TraceId}` ``` { "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": "FastBCP" } } } ``` Important Notes * If a target directory (such as `/logs` or `/airflow/xcom`) does not exist, FastBCP 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") You can use the following placeholders to dynamically generate log file names or directories: | **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") Your Serilog configuration file (for example, `FastBCP_Settings_Logs_To_Files.json`) must be placed in `/config`, either by mounting a local directory or by using a Docker named volume. Example with named volumes: ``` # First, copy your config file to a volume location cp ~/FastBCP_Settings_Logs_To_Files.json /volumes/fastbcp-config/ # Then run FastBCP with mounted volumes docker run --rm \ -v fastbcp-config:/config \ -v fastbcp-data:/data \ -v fastbcp-logs:/logs \ arpeio/fastbcp:latest \ --settingsfile "/config/FastBCP_Settings_Logs_To_Files.json" \ --connectiontype "mssql" \ --server "host.docker.internal,1433" \ --user "FastUser" \ --password "FastPassword" \ --database "tpch_test" \ --query "SELECT * FROM dbo.orders" \ --fileoutput "orders.csv" \ --directory "/data" \ --paralleldegree 12 \ --parallelmethod "Ntile" \ --distributekeycolumn "o_orderkey" \ --merge false \ --license "$licenseContent" ``` If the `--settingsfile` argument is not provided, FastBCP will use its built-in default logging configuration. --- # Kestra [Kestra](https://kestra.io/) is a powerful open-source orchestration platform that can be used to automate and schedule FastBCP data export workflows. FastBCP can be seamlessly integrated into Kestra flows using its Docker image. ## Docker Image[​](#docker-image "Direct link to Docker Image") FastBCP provides an official Docker image available on Docker Hub: **Image:** `arpeio/fastbcp:latest`
**Repository:** ## Integration with Docker Run Plugin[​](#integration-with-docker-run-plugin "Direct link to Integration with Docker Run Plugin") The [`io.kestra.plugin.docker.Run`](https://kestra.io/plugins/plugin-docker/io.kestra.plugin.docker.run) plugin provides a direct way to execute FastBCP commands in a Docker container. This is the recommended method for integrating FastBCP with Kestra. ### Basic Example[​](#basic-example "Direct link to Basic Example") ``` id: fastbcp_export_orders namespace: arpe.io tasks: - id: export_orders_parquet type: io.kestra.plugin.docker.Run containerImage: arpeio/fastbcp:latest host: "tcp://host.docker.internal:2375" commands: - --connectiontype - mssql - --server - "host.docker.internal,11433" - --user - FastLogin - --password - FastPassword - --database - tpch10 - --sourceschema - dbo - --sourcetable - orders - --fileoutput - orders.parquet - --directory - /data/export - --parallelmethod - Ntile - --paralleldegree - "12" - --distributekeycolumn - o_orderkey - --nobanner ``` **Key Parameters:** * `containerImage`: Specifies the FastBCP Docker image * `host`: Docker daemon endpoint (required for Docker Run plugin) * `commands`: Array of FastBCP CLI arguments ## Environment Variables for Cloud Storage[​](#environment-variables-for-cloud-storage "Direct link to Environment Variables for Cloud Storage") When exporting data to cloud storage (AWS S3, Azure Blob, Google Cloud Storage), you can pass cloud credentials using environment variables (see [Cloud Connectivity](/1.4/documentation/cloud-connectivity/overview.md) for more details). ### Example with AWS S3[​](#example-with-aws-s3 "Direct link to Example with AWS S3") ``` id: fastbcp_export_to_s3 namespace: arpe.io tasks: - id: export_orders_to_s3 type: io.kestra.plugin.docker.Run containerImage: arpeio/fastbcp:latest host: "tcp://host.docker.internal:2375" env: AWS_ACCESS_KEY_ID: "AKIAIOSFODNN7EXAMPLE" AWS_SECRET_ACCESS_KEY: "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY" AWS_DEFAULT_REGION: "us-east-1" commands: - --connectiontype - mssql - --server - "host.docker.internal,11433" - --user - FastLogin - --password - FastPassword - --database - tpch10 - --sourceschema - dbo - --sourcetable - orders - --fileoutput - orders.parquet - --directory - s3://my-bucket/exports/orders - --parallelmethod - Ntile - --paralleldegree - "12" - --distributekeycolumn - o_orderkey - --merge - "false" - --nobanner ``` ## 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, connection strings, and cloud credentials, 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: * `FASTBCP_MSSQL_USER` * `FASTBCP_MSSQL_PASSWORD` * `FASTBCP_AWS_ACCESS_KEY_ID` * `FASTBCP_AWS_SECRET_ACCESS_KEY` * `FASTBCP_AWS_DEFAULT_REGION` ### Example with Secrets[​](#example-with-secrets "Direct link to Example with Secrets") ``` id: fastbcp_export_orders_s3_secret namespace: arpe.io tasks: - id: export_orders_parquet_to_s3 type: io.kestra.plugin.docker.Run containerImage: arpeio/fastbcp:latest host: "tcp://host.docker.internal:2375" env: AWS_ACCESS_KEY_ID: "{{ secret('FASTBCP_AWS_ACCESS_KEY_ID') }}" AWS_SECRET_ACCESS_KEY: "{{ secret('FASTBCP_AWS_SECRET_ACCESS_KEY') }}" AWS_DEFAULT_REGION: "{{ secret('FASTBCP_AWS_DEFAULT_REGION') }}" commands: - --connectiontype - mssql - --server - "host.docker.internal,11433" - --user - "{{ secret('FASTBCP_MSSQL_USER') }}" - --password - "{{ secret('FASTBCP_MSSQL_PASSWORD') }}" - --database - tpch10 - --sourceschema - dbo - --sourcetable - orders - --fileoutput - orders.parquet - --directory - s3://fastbcp-export/orders/parquet - --parallelmethod - Ntile - --paralleldegree - "12" - --distributekeycolumn - o_orderkey - --merge - "false" - --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 FastBCP 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 export process, including configuration parameters, connection details, data export progress, and performance metrics. ### Example Log Output[​](#example-log-output "Direct link to Example Log Output") ``` 2026-03-02T15:15:37.882 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- The "FastBCP_Settings.json" file does not exist. Using default settings. Console Only with loglevel=Information 2026-03-02 16:15:37.8922026-03-02T15:15:37.892 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- FastBCP Trial – will expires on "2026‑03‑27" (24 day(s) left). 2026-03-02 16:15:37.8922026-03-02T15:15:37.892 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Starting 2026-03-02 16:15:37.8932026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- FastBCP Version : "0.29.2.0" Architecture : "X64" - Framework : ".NET 8.0.24" 2026-03-02 16:15:37.8932026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Internal Trace ID : "5ccea857-1538-4a28-8b1c-cfe5c51fbd43" 2026-03-02 16:15:37.8932026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Internal Run ID : "5ccea857-1538-4a28-8b1c-cfe5c51fbd43" 2026-03-02 16:15:37.8932026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- OS : "Debian GNU/Linux 13 (trixie)" 2026-03-02 16:15:37.8932026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Connection Type : "mssql" 2026-03-02 16:15:37.8932026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Source SqlInstance : "sql22,1433" 2026-03-02 16:15:37.8932026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Source Database : "tpch" 2026-03-02 16:15:37.8932026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Source Schema : "tpch10" 2026-03-02 16:15:37.8932026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Source Table : "orders" 2026-03-02 16:15:37.8932026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Trusted Connection : False 2026-03-02 16:15:37.8932026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- User : "migadmin" 2026-03-02 16:15:37.8932026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Output File : "orders.parquet" 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Output Directory : /data/parquet 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Degree : 12 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Distribute Method : "Ntile" 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Distribute Column : "o_orderkey" 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Decimal Separator : "," 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Delimiter : "|" 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Use quotes : False 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Date format: "yyyy-MM-dd" 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Encoding : "UTF-8" 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- No Header : False 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Timestamped : False 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Boolean Format : "automatic" 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Cloud Profile : "" 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Application Intent : "ReadOnly" 2026-03-02 16:15:37.9062026-03-02T15:15:37.906 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- file extension is ".parquet" 2026-03-02 16:15:37.9092026-03-02T15:15:37.909 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Encoding used : Unicode (UTF-8) - 65001 - utf-8 2026-03-02 16:15:37.9652026-03-02T15:15:37.965 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- 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=FastBCP;Application Intent=ReadOnly" 2026-03-02 16:15:38.0862026-03-02T15:15:38.086 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- 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 16:15:38.1102026-03-02T15:15:38.110 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Get DataTypes with header end : Elapsed=6 ms 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Data Segments Computation Completed in 260 ms 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Distribute Column Type : "Int32" 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 0 : 1 : 1 - 5000001 or "o_orderkey" is null 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 1 : 2 : 5000002 - 10000002 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 2 : 3 : 10000003 - 15000003 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 3 : 4 : 15000004 - 20000004 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 4 : 5 : 20000005 - 25000005 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 5 : 6 : 25000006 - 30000006 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 6 : 7 : 30000007 - 35000007 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 7 : 8 : 35000032 - 40000032 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 8 : 9 : 40000033 - 45000033 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 9 : 10 : 45000034 - 50000034 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 10 : 11 : 50000035 - 55000035 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 11 : 12 : 55000036 - 60000000 2026-03-02 16:15:46.6112026-03-02T15:15:46.611 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 002 for o_orderkey between 10000003 and 15000003 into /data/parquet/orders_chunk_002.parquet : 1250001 rows x 9 columns in 8234ms 2026-03-02 16:15:46.6112026-03-02T15:15:46.611 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 011 for o_orderkey between 55000036 and 60000000 into /data/parquet/orders_chunk_011.parquet : 1249989 rows x 9 columns in 8234ms 2026-03-02 16:15:46.7902026-03-02T15:15:46.790 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 003 for o_orderkey between 15000004 and 20000004 into /data/parquet/orders_chunk_003.parquet : 1250001 rows x 9 columns in 8413ms 2026-03-02 16:15:46.7972026-03-02T15:15:46.797 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 005 for o_orderkey between 25000006 and 30000006 into /data/parquet/orders_chunk_005.parquet : 1250001 rows x 9 columns in 8420ms 2026-03-02 16:15:46.9362026-03-02T15:15:46.936 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 008 for o_orderkey between 40000033 and 45000033 into /data/parquet/orders_chunk_008.parquet : 1250001 rows x 9 columns in 8559ms 2026-03-02 16:15:47.1392026-03-02T15:15:47.139 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 010 for o_orderkey between 50000035 and 55000035 into /data/parquet/orders_chunk_010.parquet : 1250001 rows x 9 columns in 8763ms 2026-03-02 16:15:47.1542026-03-02T15:15:47.154 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 000 for o_orderkey between 1 and 5000001 into /data/parquet/orders_chunk_000.parquet : 1250001 rows x 9 columns in 8777ms 2026-03-02 16:15:47.2472026-03-02T15:15:47.247 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 009 for o_orderkey between 45000034 and 50000034 into /data/parquet/orders_chunk_009.parquet : 1250001 rows x 9 columns in 8870ms 2026-03-02 16:15:47.3082026-03-02T15:15:47.308 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 006 for o_orderkey between 30000007 and 35000007 into /data/parquet/orders_chunk_006.parquet : 1250001 rows x 9 columns in 8931ms 2026-03-02 16:15:47.3092026-03-02T15:15:47.309 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 001 for o_orderkey between 5000002 and 10000002 into /data/parquet/orders_chunk_001.parquet : 1250001 rows x 9 columns in 8932ms 2026-03-02 16:15:47.3632026-03-02T15:15:47.363 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 007 for o_orderkey between 35000032 and 40000032 into /data/parquet/orders_chunk_007.parquet : 1250001 rows x 9 columns in 8986ms 2026-03-02 16:15:47.3662026-03-02T15:15:47.366 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 004 for o_orderkey between 20000005 and 25000005 into /data/parquet/orders_chunk_004.parquet : 1250001 rows x 9 columns in 8989ms 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- files generation end : Elapsed=9257 ms - maxdop=12 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total data rows : 15000000 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total data columns : 9 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total cells : 135000000 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Throughput rows : 1568531 rows/s 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Throughput cells : 14116787 cells/s 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total time : Elapsed=9563 ms 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total data rows : 15000000 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total data columns : 9 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total cells : 135000000 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Final Throughput rows : 1568482 rows/s 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Final Throughput cells : 14116346 cells/s 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Completed Load ``` --- # PostgreSQL The **pg\_fastbcp** extension allows you to run the FastBCP tool directly from an SQL function, enabling fast data export from databases to various formats (CSV, Parquet) and cloud storage directly from PostgreSQL. ## Extension Overview[​](#extension-overview "Direct link to Extension Overview") * **Repository**: [arpe-io/pg\_fastbcp](https://github.com/arpe-io/pg_fastbcp) * **License**: MIT * **Latest version**: v0.30.0 * **Platforms**: Linux (Debian/Ubuntu) and Windows ![pg\_fastbcp Demo](/assets/images/pg_fastbcp-e5e0b5519f8de77a14a8f8cba33d251c.gif) ## Features[​](#features "Direct link to Features") * **Native PostgreSQL Integration**: Execute FastBCP commands directly from SQL * **Secure Password Management**: Built-in encryption for sensitive credentials * **Detailed Result Return**: Get export statistics and performance metrics as SQL results * **Cross-Platform**: Available for both Linux and Windows environments * **Flexible Configuration**: Support for all FastBCP parameters * **Multiple Output Formats**: Export to CSV, Parquet, or directly to cloud storage (AWS S3, Azure Blob, Google Cloud Storage, OneLake) ## Prerequisites[​](#prerequisites "Direct link to Prerequisites") * PostgreSQL 15, 16, 17, or 18 * Sudo/Administrator privileges to install the extension * Valid FastBCP license (request a [trial license](https://arpe.io/get-trial?product=FastBCP)) * FastBCP 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 `FastBCP` 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\_fastbcp releases page](https://github.com/arpe-io/pg_fastbcp/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_fastbcp.so` * `pg_fastbcp.control` * `pg_fastbcp--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_fastbcp.so /usr/lib/postgresql//lib/ sudo cp pg_fastbcp.control pg_fastbcp--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 FastBCP binary sudo chmod +x /path/to/FastBCP sudo chown postgres:postgres /path/to/FastBCP sudo chmod 750 /path/to/FastBCP # 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_fastbcp.dll` * `pg_fastbcp.control` * `pg_fastbcp--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_fastbcp.dll` file into the `lib` folder 4. Copy the `pg_fastbcp.control` and `pg_fastbcp--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 `FastBCP.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_fastbcp CASCADE; ``` ### Create the extension[​](#create-the-extension "Direct link to Create the extension") ``` CREATE EXTENSION pg_fastbcp CASCADE; ``` ## Functions[​](#functions "Direct link to Functions") ### pg\_fastbcp\_encrypt[​](#pg_fastbcp_encrypt "Direct link to pg_fastbcp_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_RunFastBcp_secure` function will automatically decrypt any values passed to its `password` argument. **Syntax:** ``` pg_fastbcp_encrypt(text_to_encrypt text) RETURNS text ``` **Example:** ``` SELECT pg_fastbcp_encrypt('MySecurePassword'); -- Returns: A base64-encoded encrypted string, e.g., "PgP...base64encodedstring==" ``` ### xp\_RunFastBcp\_secure[​](#xp_runfastbcp_secure "Direct link to xp_RunFastBcp_secure") This is the main function to execute the FastBCP tool. It takes various parameters to configure the data export operation. Password arguments (`password`) will be automatically decrypted. **Syntax:** ``` xp_RunFastBcp_secure( connectiontype text DEFAULT NULL, sourceconnectstring text DEFAULT NULL, dsn text DEFAULT NULL, provider text DEFAULT NULL, server text DEFAULT NULL, user_ text DEFAULT NULL, password text DEFAULT NULL, trusted boolean DEFAULT NULL, database_name text DEFAULT NULL, applicationintent text DEFAULT NULL, fileinput text DEFAULT NULL, query text DEFAULT NULL, sourceschema text DEFAULT NULL, sourcetable text DEFAULT NULL, fileoutput text DEFAULT NULL, directory text DEFAULT NULL, timestamped boolean DEFAULT NULL, encoding text DEFAULT NULL, delimiter text DEFAULT NULL, usequotes boolean DEFAULT NULL, dateformat text DEFAULT NULL, decimalseparator text DEFAULT NULL, boolformat text DEFAULT NULL, noheader boolean DEFAULT NULL, parquetcompression text DEFAULT NULL, cloudprofile text DEFAULT NULL, parallelmethod text DEFAULT NULL, paralleldegree integer DEFAULT NULL, distributekeycolumn text DEFAULT NULL, datadrivenquery text DEFAULT NULL, merge boolean DEFAULT NULL, loglevel text DEFAULT NULL, runid text DEFAULT NULL, settingsfile text DEFAULT NULL, config text DEFAULT NULL, nobanner boolean DEFAULT NULL, license text DEFAULT NULL, fastbcp_path text DEFAULT NULL ) RETURNS TABLE ( exit_code integer, output text, total_rows bigint, total_columns integer, total_time bigint ) ``` ## Usage Examples[​](#usage-examples "Direct link to Usage Examples") ### Linux Example - PostgreSQL to CSV[​](#linux-example---postgresql-to-csv "Direct link to Linux Example - PostgreSQL to CSV") Export data from PostgreSQL to CSV files: ``` SELECT * FROM xp_RunFastBcp_secure( connectiontype := 'pgsql', server := 'localhost:5432', user_ := 'postgres', password := pg_fastbcp_encrypt('MyActualPassword'), database_name := 'tpch', sourceschema := 'tpch_1', sourcetable := 'orders', fileoutput := 'orders.csv', directory := '/tmp/export', paralleldegree := 4, parallelmethod := 'Ntile', distributekeycolumn := 'o_orderkey', noheader := false, delimiter := ',', license := '/tmp/FastBCP_linux-x64_v0.30.0/FastBCP.lic', loglevel := 'information', nobanner := false, fastbcp_path := '/tmp/FastBCP_linux-x64_v0.30.0' ); ``` ## 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 FastBCP process. | | `output` | text | The full log output from the FastBCP tool. | | `total_rows` | bigint | The total number of rows transferred. | | `total_columns` | integer | The total number of columns transferred. | | `total_time` | bigint | The total execution time in milliseconds. | ## Output[​](#output "Direct link to Output") You can view the full FastBCP output using the `output` column returned by the function. ## Resources[​](#resources "Direct link to Resources") * [pg\_fastbcp GitHub Repository](https://github.com/arpe-io/pg_fastbcp) * [FastBCP Documentation](https://fastbcp-docs.arpe.io/1.2/integration/postgresql-integration) * [Get a Trial License](https://arpe.io/get-trial?product=FastBCP) * [Report Issues](https://github.com/arpe-io/pg_fastbcp/issues) --- # Release Notes 0.32 ## New Features[​](#new-features "Direct link to New Features") ### OpenTelemetry Support[​](#opentelemetry-support "Direct link to OpenTelemetry Support") FastBCP now supports [OpenTelemetry](https://opentelemetry.io/) for distributed tracing and log correlation. **New parameter:** * `--traceparent`: Accept a [W3C Trace Context](https://www.w3.org/TR/trace-context/) traceparent identifier from an external caller, enabling end-to-end trace correlation across distributed systems. **OpenTelemetry log export:** * Logs can be exported to any OpenTelemetry-compatible collector (e.g., Jaeger, Zipkin, Grafana Tempo) via the Serilog OpenTelemetry sink. * Configuration through environment variables or the `FastBCP_Settings.json` file. See the [OpenTelemetry logging documentation](/1.4/documentation/logging/OpenTelemetry.md) for setup details and examples. ### Gzip Compression[​](#gzip-compression "Direct link to Gzip Compression") **Streamed gzip compression** is now possible by adding `.gz` to file extension. For csv, tsv and json only. * use `--fileoutput file.csv.gz` ### BREAKING CHANGE[​](#breaking-change "Direct link to BREAKING CHANGE") * `--merge` default is Switched from `true` to `false` ### Others[​](#others "Direct link to Others") * Better datatypes coverage for csv and json --- # Release Notes 1.0 ## What's Changed[​](#whats-changed "Direct link to What's Changed") ### ADBC Parquet Export - 2x Faster Performance[​](#adbc-parquet-export---2x-faster-performance "Direct link to ADBC Parquet Export - 2x Faster Performance") FastBCP now supports ADBC (Arrow Database Connectivity) for Parquet exports via the `--connectiontype adbc_mssql` connector, powered by ArrowTDS. **Performance improvements:** * 2x faster Parquet generation compared to traditional methods * Native columnar data format (Arrow) eliminates conversion overhead * Optimized for SQL Server data types **Usage:** ``` fastbcp --server myserver.database.windows.net \ --database MyDatabase \ --query "SELECT * FROM Sales.Orders" \ --connectiontype adbc_mssql \ --fileoutput "orders.parquet" ``` See [Connection Parameters documentation](/1.4/documentation/cli/connection_parameters.md#connection-type) for more details. ### Buffered Cloud Uploads[​](#buffered-cloud-uploads "Direct link to Buffered Cloud Uploads") New environment variables enable buffered cloud uploads for significantly improved Azure Data Lake Storage and OneLake performance. **New environment variables:** * `FASTBCP_CLOUD_ISBUFFERED`: When `True`, ADLS/OneLake writes are buffered to a local temp file, then uploaded in parallel. When `False`, data is streamed directly to the cloud. * `FASTBCP_TMPPATH`: Base directory for temporary files created during buffered cloud uploads. Default: System temp (`%TEMP%` / `$TMPDIR`). * `FASTBCP_CLOUD_MAXUPLOADTHREAD_PER_STREAM`: Maximum number of parallel upload threads per cloud stream. Default: `8` if `parallelmethod=None`, `2` otherwise. * `FASTBCP_UID_STRING_CASING`: Controls UID-to-string casing. Values: `lower` or `upper`. Default: `lower` (RFC 4122). **Example — Buffered cloud uploads:** ``` # Enable buffered uploads for Azure $env:FASTBCP_CLOUD_ISBUFFERED = "True" $env:FASTBCP_TMPPATH = "D:\temp\fastbcp" fastbcp --server myserver --database MyDB --sourceschema Sales --sourcetable Orders ` --fileoutput "abfss://container@storage.dfs.core.windows.net/orders.parquet" ``` **Example — UID string casing (PowerShell):** ``` # Output UIDs in uppercase $env:FASTBCP_UID_STRING_CASING = "upper" fastbcp --server myserver --database MyDB --sourcetable MyTable --fileoutput "output.parquet" ``` **Example — UID string casing (Linux):** ``` # Output UIDs in uppercase export FASTBCP_UID_STRING_CASING=upper fastbcp --server myserver --database MyDB --sourcetable MyTable --fileoutput "output.parquet" ``` See the [Environment Variables](/1.4/documentation/environment-variables/overview.md) documentation for detailed configuration. ### Move to .NET 10[​](#move-to-net-10 "Direct link to Move to .NET 10") FastBCP now runs on .NET 10: * Performance improvements in runtime and GC * Enhanced security and stability * Continued long-term support * Compatibility: Windows, Linux, macOS (x64, ARM64) ### Improved SBOM Generation[​](#improved-sbom-generation "Direct link to Improved SBOM Generation") Enhanced Software Bill of Materials (SBOM) generation for better supply chain security and compliance. ### SLSA Build Provenance[​](#slsa-build-provenance "Direct link to SLSA Build Provenance") Added SLSA (Supply-chain Levels for Software Artifacts) build provenance in CI for enhanced supply chain security and compliance. ### Early Cleanup of Temp Files[​](#early-cleanup-of-temp-files "Direct link to Early Cleanup of Temp Files") When uploading to cloud storage, temporary files are now cleaned up earlier in the process to reduce disk space requirements. ## ArrowTDS ARPE.IO Driver[​](#arrowtds-arpeio-driver "Direct link to ArrowTDS ARPE.IO Driver") FastBCP 1.0 includes the ArrowTDS ARPE.IO driver for high-performance ADBC connectivity. **Key features:** * TDS 7.4 protocol compatibility * Native Arrow columnar format support * Optimized for SQL Server 2012 and later --- # Release Notes 1.1 ## What's Changed[​](#whats-changed "Direct link to What's Changed") ### ADBC PostgreSQL — Arpe.io ADBC FastDriver[​](#adbc-postgresql--arpeio-adbc-fastdriver "Direct link to ADBC PostgreSQL — Arpe.io ADBC FastDriver") FastBCP now supports ADBC for PostgreSQL via the `--connectiontype adbc_pgsql` connector, powered by the new ADBC Arrow\_FEBE drivers (Arpe.io ADBC FastDriver). **Key highlights:** * Ultra-fast Parquet exports from PostgreSQL * Native Arrow columnar format eliminates conversion overhead * Same high-performance ADBC approach as the existing `adbc_mssql` connector **Usage:** ``` fastbcp --server pg-server:5432 \ --database MyDatabase \ --query "SELECT * FROM public.orders" \ --connectiontype adbc_pgsql \ --fileoutput "orders.parquet" ``` See [Connection Parameters documentation](/1.4/documentation/cli/connection_parameters.md#connection-type) for more details. ### \[Breaking] New Default Date Format[​](#breaking-new-default-date-format "Direct link to \[Breaking] New Default Date Format") The default `--dateformat` value for CSV, JSON, and XLSX outputs has changed from `yyyy-MM-dd` to `yyyy-MM-dd HH:mm:sszzz`. **Auto-adaptive behavior:** The format automatically adapts based on the column type: * **Date-only** columns remain formatted as `yyyy-MM-dd` * **Timestamp/DateTime** columns are formatted as `yyyy-MM-dd HH:mm:ss` even if a timezone token (`zzz`) is in the format string * **DateTimeOffset** columns include the full timezone offset This change also fixes date-only format handling and adds timezone support for CSV date formatting. **Migration:** If your pipeline depends on the previous default (`yyyy-MM-dd`), explicitly set `--dateformat "yyyy-MM-dd"` in your command. ### New Boolean Format Values[​](#new-boolean-format-values "Direct link to New Boolean Format Values") The `--boolformat` parameter now supports additional formats: | Format | Example output | | ------------ | --------------- | | `True/False` | `True`, `False` | | `yes/no` | `yes`, `no` | | `y/n` | `y`, `n` | These are in addition to the existing `true/false`, `t/f`, and `1/0` formats. **Example:** ``` fastbcp --server myserver \ --database MyDatabase \ --query "SELECT * FROM products" \ --fileoutput "products.csv" \ --boolformat "True/False" ``` ### Environment Variables Guardrails[​](#environment-variables-guardrails "Direct link to Environment Variables Guardrails") Security hardening of environment variable handling (internal improvement), with no user-facing impact. --- # Release Notes 1.2 ## What's Changed[​](#whats-changed "Direct link to What's Changed") ### ADBC Oracle — Arpe.io ADBC FastDriver[​](#adbc-oracle--arpeio-adbc-fastdriver "Direct link to ADBC Oracle — Arpe.io ADBC FastDriver") FastBCP now supports ADBC for Oracle via the `--connectiontype adbc_oracle` connector, powered by the new ADBC Arrow\_TTC driver (Arpe.io ADBC FastDriver). It speaks Oracle's TNS/TTC wire protocol natively — no Oracle Client / Instant Client required. **Key highlights:** * Ultra-fast Parquet exports from Oracle * Native Arrow columnar format eliminates conversion overhead * Same high-performance ADBC approach as the existing `adbc_mssql` and `adbc_pgsql` connectors * EZConnect source syntax (`host[:port]/service`) * Supports the `Rowid` parallel method for parallel extraction, in addition to `oraodp` * Parquet is the only supported output format for this connector See [Connection Parameters documentation](/1.4/documentation/cli/connection_parameters.md#connection-type) for more details. ### New Environment Variables[​](#new-environment-variables "Direct link to New Environment Variables") Added three new environment variables: * `FASTBCP_ADBC_BATCHCELLS`: controls the size (in cells, i.e. rows × columns) of the Arrow record batches fetched by the ADBC connectors (`adbc_mssql`, `adbc_pgsql`). **Default:** `500000` (500,000 cells). Sizing by cell count keeps batch memory usage predictable across tables of different widths. See the [FASTBCP\_ADBC\_BATCHCELLS documentation](/1.4/documentation/environment-variables/fastbcp-adbc-batchcells.md) for details. * `FASTBCP_SYSTEMINFO_COLLECT`: collects system information (CPU, memory, OS, etc.) while a run is in progress. **Disabled by default.** See the [FASTBCP\_SYSTEMINFO\_COLLECT documentation](/1.4/documentation/environment-variables/fastbcp-systeminfo-collect.md) for details. * `FASTBCP_PERFORMANCE_COLLECT`: collects performance information (CPU usage, memory usage, etc.) while a run is in progress. **Disabled by default.** See the [FASTBCP\_PERFORMANCE\_COLLECT documentation](/1.4/documentation/environment-variables/fastbcp-performance-collect.md) for details. To enable system and performance diagnostics collection: * Windows * Linux ``` $env:FASTBCP_SYSTEMINFO_COLLECT = $True $env:FASTBCP_PERFORMANCE_COLLECT = $True ``` ``` export FASTBCP_SYSTEMINFO_COLLECT=True export FASTBCP_PERFORMANCE_COLLECT=True ``` ## Bug Fixes[​](#bug-fixes "Direct link to Bug Fixes") ### ODBC with DSN — Login/Password Authentication[​](#odbc-with-dsn--loginpassword-authentication "Direct link to ODBC with DSN — Login/Password Authentication") Fixed an issue where the `odbc` connection type with a DSN (`--dsn`) only worked with integrated (Windows/trusted) authentication. Providing explicit `--user` / `--password` credentials had no effect and the connection silently fell back to integrated authentication. DSN connections now correctly authenticate with the supplied login/password. ### ADBC MSSQL — Column Limit Raised[​](#adbc-mssql--column-limit-raised "Direct link to ADBC MSSQL — Column Limit Raised") Fixed a limitation in the `adbc_mssql` connector that restricted exports to tables with fewer than 256 columns. The limit has been raised to support standard tables with up to 1024 columns. --- # Release Notes 1.3 ## New Features[​](#new-features "Direct link to New Features") ### ADBC Netezza — `--connectiontype adbc_netezza`[​](#adbc-netezza----connectiontype-adbc_netezza "Direct link to adbc-netezza----connectiontype-adbc_netezza") FastBCP now supports Netezza / IBM NPS through the embedded **ArpeNetezza** ADBC driver, via the new `--connectiontype adbc_netezza` connection type. The driver is used for both the metadata step and the data step. **Key highlights:** * No NZdotNET installation needed * Works with **IBM Cloud NPS** * Parquet output only, like the other `adbc_*` connection types * Supported parallel methods: `None`, `NZDataSlice`, `Ntile`, `Random`, `RangeId` and `DataDriven` * `Application Name` defaults to `FastBCP` * NPS 7.x: TLS 1.0/1.1 supported (`tls_min_version=1.0`, ArpeNetezza 0.3.2) **Connection string keys:** `--sourceconnectstring` keys no longer need the `adbc.arpenz.` prefix. The following are all accepted: * Friendly / ADO.NET keys: `Server`, `Host`, `host:port`, `Port`, `Database`, `User ID`, `Password`, `SSL Mode`, `Application Name`, … * Plain driver keys: `sslmode`, `tls_min_version`, `char_encoding`, `login_timeout`, … * `uri` and `connection_string` Keys the driver does not support (e.g. `propagate`, `Pooling`) are ignored, with a single warning. * Windows * Linux ``` .\FastBCP.exe ` --connectiontype adbc_netezza ` --sourceconnectstring "Server=nps-host;Port=5480;Database=SALES;User ID=admin;Password=FastPassword" ` --sourceschema "ADMIN" ` --sourcetable "ORDERS" ` --directory "D:\export\orders" ` --fileoutput "orders.parquet" ` --parallelmethod NZDataSlice ` --paralleldegree 8 ``` ``` ./FastBCP \ --connectiontype adbc_netezza \ --sourceconnectstring "Server=nps-host;Port=5480;Database=SALES;User ID=admin;Password=FastPassword" \ --sourceschema "ADMIN" \ --sourcetable "ORDERS" \ --directory "/data/export/orders" \ --fileoutput "orders.parquet" \ --parallelmethod NZDataSlice \ --paralleldegree 8 ``` NPS 7 pre-releases Files exported from NPS 7 with the pre-releases `v1.3.0-netezza.1` / `v1.3.0-netezza.2` may contain wrong values in `NUMERIC` columns. This is fixed in ArpeNetezza 0.3.3, shipped with FastBCP 1.3. Re-export the affected tables. See [Connection Parameters](/1.4/documentation/cli/connection_parameters.md#connection-type) for more details. ### New Parallel Method — `DBPartition`[​](#new-parallel-method--dbpartition "Direct link to new-parallel-method--dbpartition") The new `--parallelmethod DBPartition` parallel method runs one extraction per native partition / subpartition of the source table. **Supported sources:** | Source | Partitioning used | | ---------- | --------------------------------------------- | | SQL Server | `$PARTITION` | | PostgreSQL | Leaf tables | | Oracle | `PARTITION (...)` | | MySQL | `PARTITION (...)` | | Teradata | Row partitioning, single- and multi-level PPI | The `adbc_*` counterparts are supported too. * Requires `--sourceschema` and `--sourcetable`. * Falls back to `None`, with a warning, when the table is not partitioned, has a single partition, or the source is not supported. * Optimised partition scheduling (internal improvement). * `FASTBCP_DOP_EQUERY` also applies to `DBPartition`. The output layout is controlled by the new [`FASTBCP_DBPARTITION_TARGET_MODE`](/1.4/documentation/environment-variables/fastbcp-dbpartition-target-mode.md) environment variable: | Value | Output layout | | ----------------- | --------------------------------------------------------------------------------------------------------------------- | | `CHUNK` (default) | `_chunk_NNN.` | | `HIVE` | `partition=

/[subpartition=/].` (SQL Server uses `bounds=_`, Teradata `L1=/L2=`) | `--merge` works in both modes. See [Parallel Parameters](/1.4/documentation/cli/parallel_parameters.md#available-methods) for more details. ### Azure Blob Storage — Authentication and Container Access[​](#azure-blob-storage--authentication-and-container-access "Direct link to Azure Blob Storage — Authentication and Container Access") For direct commit to Azure Blob Storage: * **Authentication:** besides `DefaultAzureCredential` (still the fallback), FastBCP now accepts `AZURE_STORAGE_CONNECTION_STRING` or `AZURE_STORAGE_SAS_URL`. The selected authentication method is logged. * **Container access:** a missing *create* permission on the container (HTTP 403/409) is tolerated when the container already exists. 403 errors now give a clearer message (firewall, RBAC or SAS permissions). See [Azure Configuration](/1.4/documentation/cloud-connectivity/azure.md#authentication-methods) for more details. ### ADBC Connectors Improvements[​](#adbc-connectors-improvements "Direct link to ADBC Connectors Improvements") * **`--applicationintent` with `--connectiontype adbc_mssql`:** `--applicationintent` (default `ReadOnly`) and an `ApplicationIntent` key in `--sourceconnectstring` now reach the ArpeMSSQL driver. An Availability Group listener with read-only routing sends the export to a readable secondary, as with `--connectiontype mssql`. * **`--connectiontype adbc_pgsql` honours the libpq environment:** `PGUSER`, `PGPASSWORD`, `PGPASSFILE` / `~/.pgpass` and `PGSSLROOTCERT` are used when `--user` / `--password` / `--sourceconnectstring` do not provide them, like `--connectiontype pgsql` (ArpePGSQL 0.4.5). * **`--connectiontype adbc_oracle` resolves TNS aliases** through `tnsnames.ora` (`TNS_ADMIN`, `$ORACLE_HOME/network/admin`), like `--connectiontype oraodp` (ArpeOracle 0.3.11). ## Behaviour Changes[​](#behaviour-changes "Direct link to Behaviour Changes") ### `adbc_mssql` / `adbc_pgsql` / `adbc_oracle` Run Fully on ADBC[​](#adbc_mssql--adbc_pgsql--adbc_oracle-run-fully-on-adbc "Direct link to adbc_mssql--adbc_pgsql--adbc_oracle-run-fully-on-adbc") The metadata and planning step (row counts, column types, `Ntile`, `Random`, `Timepartition`, `DBPartition`, …) now runs on the ADBC driver instead of SqlClient, Npgsql or ODP.NET. A single connection string is used for both steps. * `--sourceconnectstring` accepts the native syntax, explicit `adbc.*` / `arpeio.*` keys (they win over translated keys), or a whole-connection `uri` / `adbc..connection_string`. * Native keys with no driver equivalent (e.g. `Pooling=false`) are dropped with a warning. With a whole-connection `uri` / `connection_string`, native keys are dropped with a warning saying to put them inside the URI / connection string. * A `Driver=` path in `--sourceconnectstring` is used by both steps. ### Oracle Network Encryption with `--connectiontype adbc_oracle`[​](#oracle-network-encryption-with---connectiontype-adbc_oracle "Direct link to oracle-network-encryption-with---connectiontype-adbc_oracle") FastBCP now sends `encryption=accepted` and `data_integrity=accepted`, so the server decides, as with `--connectiontype oraodp`. `FASTBCP_ADBC_ENCRYPTION` / `FASTBCP_ADBC_DATA_INTEGRITY` or explicit keys still override this. ### `--connectiontype adbc_pgsql` NUMERIC NaN[​](#--connectiontype-adbc_pgsql-numeric-nan "Direct link to --connectiontype-adbc_pgsql-numeric-nan") A `NaN` in a decimal column now fails the read instead of becoming `NULL`. Set `adbc.arpepgsql.numeric_special=null` in `--sourceconnectstring` to keep the previous behaviour (ArpePGSQL 0.4.2+). ### `adbc_oracle` DataDriven Keys[​](#adbc_oracle-datadriven-keys "Direct link to adbc_oracle-datadriven-keys") A scale-0 `NUMBER(<=18)` key is now treated as an integer, as with `--connectiontype oraodp`, so predicates and Hive paths are identical between both connection types. ### `NZDataSlice` Scheduling[​](#nzdataslice-scheduling "Direct link to nzdataslice-scheduling") Faster on uneven slices (internal improvement). After the first failure, no new slice starts. Output files are unchanged. ## Bug Fixes[​](#bug-fixes "Direct link to Bug Fixes") * **Ntile lost rows** (pre-existing): rows could be missing from the export in some cases; on Oracle, string keys failed. Fixed (internal improvement). * **Passwords in logs:** quoted passwords containing `;` (e.g. `Password="p;w=1"`) are now fully masked in logs and telemetry, for every connection type. * **`--connectiontype adbc_mssql` with a named instance:** `host\INSTANCE` connected to the instance on port 1433 instead of resolving the named instance through the SQL Server Browser. * **Oracle TNS alias with `--user` / `--password`:** `--connectiontype oraodp --server ALIAS --user u --password p` failed with `ORA-50008: 'USERNAME' is an invalid connection string attribute` (same for `adbc_oracle`). * **`--connectiontype nzoledb`** connection type fixed (internal improvement). * **`--connectiontype nzcopy --parallelmethod Timepartition`** generated invalid SQL for Netezza. Fixed (internal improvement). * **`NZDataSlice` with `--timestamped`:** all chunks of one export now share the same timestamp prefix (long exports were split across several prefixes). * **`NZDataSlice`** log message fix. ## Documentation[​](#documentation "Direct link to Documentation") * [AWS S3](/1.4/documentation/cloud-connectivity/aws-s3.md#required-permissions): IAM roles / policies needed by FastBCP and SSE-KMS support. * [FASTBCP\_DBPARTITION\_TARGET\_MODE](/1.4/documentation/environment-variables/fastbcp-dbpartition-target-mode.md): new environment variable. * [Connection Parameters](/1.4/documentation/cli/connection_parameters.md#connection-type): `adbc_netezza` connection type. --- # Release Notes 1.4 **One parallel method to rule them all.** FastBCP 1.4 picks the fastest physical split for your engine on its own, brings Teradata to the high-performance ADBC family, and makes SQL Server parallel exports up to 2.6× faster. 1 parallel method, 4 engines `Physical` resolves to Ctid, Rowid, Physloc or NZDataSlice from the connection type. 2.6× faster Physloc exports At degree 8 on a 60M-row SQL Server heap, the export went from 126 s to 48 s. 0 Teradata client software The ADBC Teradata driver logs on over TLS by default, with no TTU to install. ## What's New: At a Glance[​](#whats-new-at-a-glance "Direct link to What's New: At a Glance") | | | | | - | ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ | | | **New parallel method** | [`--parallelmethod Physical`](#physical-one-parallel-method-for-every-engine): FastBCP picks the physical split of the source engine | | | **New source** | [`--connectiontype adbc_teradata`](#adbc-teradata----connectiontype-adbc_teradata): Teradata to Parquet through the embedded ArpeTeradata driver | | | **Faster exports** | `Physloc` 1.6× to 2.6× faster, better load balancing for `Timepartition` | | | **Data correctness** | Fixes for rows skipped or duplicated by `Ntile`, `Timepartition` and filters with `OR` — [see the fixes](#bug-fixes) | | | **Deprecations** | `Ctid`, `Rowid`, `Physloc` and `NZDataSlice` will be removed in 2.0 — [use `Physical`](#deprecations) | ## Physical: One Parallel Method for Every Engine[​](#physical-one-parallel-method-for-every-engine "Direct link to Physical: One Parallel Method for Every Engine") No more remembering which engine-specific method applies to which database. With `--parallelmethod Physical`, FastBCP splits the table on the physical row location of the source and picks the right strategy from the connection type. | Source | Connection types | Resolved strategy | | ---------- | -------------------------------------------- | ----------------- | | PostgreSQL | `pgsql`, `pgcopy`, `adbc_pgsql` | `Ctid` | | Oracle | `oraodp`, `adbc_oracle` | `Rowid` | | SQL Server | `mssql`, `msoledbsql`, `adbc_mssql` | `Physloc` | | Netezza | `nzsql`, `nzcopy`, `nzoledb`, `adbc_netezza` | `NZDataSlice` | * Windows * Linux ``` .\FastBCP.exe ` --connectiontype pgsql ` --server "localhost:5432" ` --database "tpch" ` --user "FastUser" ` --password "FastPassword" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --directory "D:\export\orders" ` --fileoutput "orders.parquet" ` --parallelmethod Physical ` --paralleldegree 8 ``` ``` ./FastBCP \ --connectiontype pgsql \ --server "localhost:5432" \ --database "tpch" \ --user "FastUser" \ --password "FastPassword" \ --sourceschema "tpch_10" \ --sourcetable "orders" \ --directory "/data/export/orders" \ --fileoutput "orders.parquet" \ --parallelmethod Physical \ --paralleldegree 8 ``` The resolved strategy is logged, and OpenTelemetry spans carry it in `fastbcp.method` (with `Physical` in the new `fastbcp.method.requested` tag): ``` Distribute Method : Physical (Ctid) ``` Good to know * `--sourceschema` and `--sourcetable` are required. `--query` can be added to filter the table (simple query with a `WHERE` clause). `--distributekeycolumn` is not used. * Any other source (`odbc`, `oledb`, `mysql`, `clickhouse`, `hana`, `teradata`, `adbc_teradata`) stops with an explicit error. With `odbc` and `oledb`, the error asks for a native connection type, because FastBCP cannot know which engine is behind the driver. **See also:** [Parallel Parameters](/1.4/documentation/cli/parallel_parameters.md#physical-method) ## ADBC Teradata — `--connectiontype adbc_teradata`[​](#adbc-teradata----connectiontype-adbc_teradata "Direct link to adbc-teradata----connectiontype-adbc_teradata") Teradata joins the high-performance ADBC family. The embedded **ArpeTeradata** driver handles both the metadata and the data steps with the Teradata SQL dialect — and by default it needs **no Teradata client software at all**. | | | Supported | | - | ----------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | **Platforms** | Windows x64 and Linux x64, **Parquet output only** (like every `adbc_*` connection type) | | | **Parallel methods** | Every method of `--connectiontype teradata`: `Random`, `Ntile`, `DataDriven`, `RangeId`, `Timepartition`, and `DBPartition` on PPI tables | | | **Connection** | `--server host[:port]` (legacy port, default `1025`), `--user`, `--password`, optional `--database` — or a `--sourceconnectstring` in the Teradata provider spelling (`Server`, `Port`, `Database`, `User Id`, `Password`, `SSL Mode`, `HTTPS Port`, `TMODE`, `TTU Path`, …). Explicit `adbc.arpeteradata.*` keys win | | | **TLS logon (default)** | `sslmode=prefer` uses TLS on the HTTPS port (443): **no Teradata client software needed** | | | **Legacy port** | When the server has no TLS, or with `SSL Mode=disable`, the driver uses the legacy port through your Teradata Tools and Utilities (TTU), on Linux and Windows | | | **Logon mechanisms** | `LDAP`, `JWT`, `KRB5` and `TDNEGO` (ArpeTeradata 0.3.4). `JWT` and Kerberos work over TLS, without TTU | Good to know * Trusted authentication (`--trusted`) is not supported. * **Finding TTU for the legacy port on Linux:** FastBCP looks in the new [`FASTBCP_TTU_PATH`](/1.4/documentation/environment-variables/fastbcp-ttu-path.md) environment variable, then in a `ttu` or `TeradataToolsAndUtilitiesBase` directory next to the FastBCP binary; otherwise the driver searches `ARPETERADATA_TTU_PATH`, `/opt/teradata/client` and the system library path. Teradata's TTU download can be [unpacked next to the binary without installing it](/1.4/documentation/environment-variables/fastbcp-ttu-path.md#using-teradatas-ttu-download-without-installing-it). FastBCP warns at startup when the TTU folder lacks `tdclientdir` or the ICU links, or when the client directory is not named after its version. * **On Windows**, the driver finds `wincli32.dll` itself (`ARPETERADATA_TTU_PATH`, its own directory, the registered TTU installation). - Windows - Linux ``` .\FastBCP.exe ` --connectiontype adbc_teradata ` --server "td-host" ` --database "TPCH" ` --user "FastUser" ` --password "FastPassword" ` --sourceschema "TPCH" ` --sourcetable "ORDERS" ` --directory "D:\export\orders" ` --fileoutput "orders.parquet" ` --parallelmethod Ntile ` --distributekeycolumn "o_orderkey" ` --paralleldegree 8 ``` ``` export FASTBCP_TTU_PATH=/opt/teradata/client/20.00 ./FastBCP \ --connectiontype adbc_teradata \ --server "td-host" \ --database "TPCH" \ --user "FastUser" \ --password "FastPassword" \ --sourceschema "TPCH" \ --sourcetable "ORDERS" \ --directory "/data/export/orders" \ --fileoutput "orders.parquet" \ --parallelmethod Ntile \ --distributekeycolumn "o_orderkey" \ --paralleldegree 8 ``` **See also:** [Connection Parameters](/1.4/documentation/cli/connection_parameters.md#adbc_teradata) ## Performance[​](#performance "Direct link to Performance") | | Before | 1.4 | | -------------------------------------------- | ------ | -------- | | `Physloc`, degree 8, 60M-row SQL Server heap | 126 s | **48 s** | * **`Physloc` is 1.6× to 2.6× faster at even degrees of parallelism**, thanks to the new [`Physloc` distribution](#physloc-distribution). * **`Timepartition` load balancing:** internal improvement. * **`Timepartition` with quoted or case-sensitive date columns:** columns such as `"OrderDate"` or `[OrderDate]` now work. ## Deprecations[​](#deprecations "Direct link to Deprecations") `Ctid`, `Rowid`, `Physloc` and `NZDataSlice` will be removed in FastBCP 2.0 Use `--parallelmethod Physical` instead: it resolves to the same strategy from the connection type. The old values are still accepted — FastBCP runs the export as before and logs a warning: ``` Parallel method Ctid is deprecated and will be removed in 2.0 ==> use --parallelmethod Physical ``` ## Behaviour Changes[​](#behaviour-changes "Direct link to Behaviour Changes") ### `Physloc` and `Rowid` Require `--sourceschema` and `--sourcetable`[​](#physloc-and-rowid-require---sourceschema-and---sourcetable "Direct link to physloc-and-rowid-require---sourceschema-and---sourcetable") Like `Ctid`, the `Physloc` and `Rowid` methods, used directly or through `Physical`, now require `--sourceschema` and `--sourcetable`. Without them, FastBCP stops at the parameter check: ``` ERROR in command line parameters : With Physical (Physloc) Method you must define source schema (--sourceschema) and source table (--sourcetable) ==> With Physical (Physloc) Method --sourceschema and --sourcetable are both mandatory ``` Before 1.4, `Rowid` crashed when they were missing. A `Physloc` export based on `--query` alone must now also give the schema and table. ### `Physloc` Distribution[​](#physloc-distribution "Direct link to physloc-distribution") `Physloc` now splits both rowstore and clustered columnstore tables into even chunks, whatever the degree of parallelism (internal improvement). A clustered columnstore is logged as `Physloc : .

is a clustered columnstore, splitting on the columnstore row id`. ### ArpeOracle 0.4.1 Security Defaults (`--connectiontype adbc_oracle`)[​](#arpeoracle-041-security-defaults---connectiontype-adbc_oracle "Direct link to arpeoracle-041-security-defaults---connectiontype-adbc_oracle") * TCPS now verifies the server certificate by default. * Kerberos no longer forwards the TGT unless `krb5_forward=true` is set, and requires mutual authentication. * Token and OAuth2 logons require TCPS. ### `--help`[​](#--help "Direct link to --help") * `-?, --help` is now listed in the usage. * `--help`, `/?` and `/help` now behave like `-?`: they print the usage only, without the banner, and exit with code `0`. Before, they printed the usage, then the banner and four `ERROR in command line parameters` lines, and exited with code `1`. ## Bug Fixes[​](#bug-fixes "Direct link to Bug Fixes") * **`Physloc` only parallelised with an odd `--paralleldegree`:** with a degree of 2, 4, 8 or 16, one chunk held every row and the other workers exported nothing; with 6 or 12, only three chunks got rows. Fixed by the new [`Physloc` distribution](#physloc-distribution): on rowstore tables, the chunks stay within 3% of even up to degree 192. * **`Random` and `Physloc` row counts:** the per-chunk log lines and the final `Total data rows` were wrong. Fixed (internal improvement). * **`Ntile` dropped rows with sub-millisecond timestamp keys:** this affected SQL Server `datetime2(4..7)`, PostgreSQL `timestamp` and Oracle `TIMESTAMP(4..9)`. Rows could be silently skipped; every row is now exported exactly once whatever its precision (internal improvement). A bucket whose minimum is `NULL` no longer throws, and numeric bounds no longer depend on the regional settings (no more `1,5` with `fr-FR`). * **Source filter with `OR`:** rows outside the source filter could be exported when the filter contained an `OR`, with every parallel method that rewrites the `WHERE` clause. Fixed (internal improvement). * **`Timepartition` skipped rows with a `NULL` date:** they are now exported to a `=NULL` directory. * **`Timepartition` with week granularity duplicated rows:** fixed on every engine (SQL Server, PostgreSQL, Netezza, MySQL, Oracle, SAP HANA, Teradata, ClickHouse) (internal improvement). * **`Performance Output Files Size` and `Disk Write Throughput` showed `unknown`** with `DataDriven`, `Timepartition` and `DBPartition`. The size now covers every file written by the run, and still ignores unrelated files already in the directory. ## Driver Improvements[​](#driver-improvements "Direct link to Driver Improvements") * **ArpeMSSQL 0.7.6** — reads `sql_variant` and the SQL Server 2025 `JSON` type; an unreadable column no longer drops the connection. * **ArpeTeradata 0.3.4** — new driver behind `--connectiontype adbc_teradata`. * **ArpeOracle 0.4.1** — stricter security defaults, see [above](#arpeoracle-041-security-defaults---connectiontype-adbc_oracle). ## Dependencies[​](#dependencies "Direct link to Dependencies") | Component | Version | | ---------------------------- | ----------------------------------------------------------------------------------------- | | .NET packages | 10.0.13 | | Microsoft.Data.SqlClient | 7.1.1 | | SAP HANA .NET driver | 2.30.27 (`Sap.Data.Hana.Net.v10.0`, native client libraries from SAP HANA Client 2.30.27) | | ArpeMSSQL ADBC driver | 0.7.6 | | ArpePGSQL ADBC driver | 0.4.7 | | ArpeOracle ADBC driver | 0.4.1 | | ArpeNetezza ADBC driver | 0.3.7 | | ArpeTeradata ADBC driver | 0.3.4 **(new)** | | AdbcFileExport | 0.5.4 | | AWSSDK.S3 | 4.0.104.4 | | Azure.Storage.Files.DataLake | 12.28.0 | ## Documentation[​](#documentation "Direct link to Documentation") * [Parallel Parameters](/1.4/documentation/cli/parallel_parameters.md#physical-method): `Physical` method, deprecation of `Ctid`, `Rowid`, `Physloc` and `NZDataSlice`. * [Connection Parameters](/1.4/documentation/cli/connection_parameters.md#adbc_teradata): `adbc_teradata` connection type. * [FASTBCP\_TTU\_PATH](/1.4/documentation/environment-variables/fastbcp-ttu-path.md): new environment variable. * [Examples](/1.4/documentation/examples/sql-server.md): the parallel examples use `Physical` for PostgreSQL, Oracle, SQL Server and Netezza; new Teradata examples in [Other Databases](/1.4/documentation/examples/other-databases.md#teradata). --- # Sitemap ## [Installation](/1.4/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](/1.4/.md) * CLI Reference * [Authentication](/1.4/documentation/cli/authentication.md) * [Connection Parameters](/1.4/documentation/cli/connection_parameters.md) * [Source Info](/1.4/documentation/cli/source_info.md) * [Output Info](/1.4/documentation/cli/output_info.md) * [CSV Formatting](/1.4/documentation/cli/csv_formatting.md) * [Parquet Formatting](/1.4/documentation/cli/parquet_formatting.md) * [Cloud Options](/1.4/documentation/cli/cloud_options.md) * [Parallel Parameters](/1.4/documentation/cli/parallel_parameters.md) * [Advanced Parameters](/1.4/documentation/cli/advanced_parameters.md) * [License](/1.4/documentation/cli/license.md) * Environment Variables * [Overview](/1.4/documentation/environment-variables/overview.md) * [FASTBCP\_CLOUD\_ISBUFFERED](/1.4/documentation/environment-variables/fastbcp-cloud-isbuffered.md) * [FASTBCP\_TMPPATH](/1.4/documentation/environment-variables/fastbcp-tmppath.md) * [FASTBCP\_CLOUD\_MAXUPLOADTHREAD\_PER\_STREAM](/1.4/documentation/environment-variables/fastbcp-cloud-maxuploadthread-per-stream.md) * [FASTBCP\_RGSIZE](/1.4/documentation/environment-variables/fastbcp-rgsize.md) * [FASTBCP\_UID\_STRING\_CASING](/1.4/documentation/environment-variables/fastbcp-uid-string-casing.md) * [FASTBCP\_DATEFORMAT](/1.4/documentation/environment-variables/fastbcp-dateformat.md) * [FASTBCP\_ADBC\_BATCHCELLS](/1.4/documentation/environment-variables/fastbcp-adbc-batchcells.md) * [FASTBCP\_SYSTEMINFO\_COLLECT](/1.4/documentation/environment-variables/fastbcp-systeminfo-collect.md) * [FASTBCP\_PERFORMANCE\_COLLECT](/1.4/documentation/environment-variables/fastbcp-performance-collect.md) * [FASTBCP\_DBPARTITION\_TARGET\_MODE](/1.4/documentation/environment-variables/fastbcp-dbpartition-target-mode.md) * [FASTBCP\_TTU\_PATH](/1.4/documentation/environment-variables/fastbcp-ttu-path.md) * Cloud Connectivity * [Overview](/1.4/documentation/cloud-connectivity/overview.md) * [AWS S3](/1.4/documentation/cloud-connectivity/aws-s3.md) * [Azure](/1.4/documentation/cloud-connectivity/azure.md) * [Google Cloud Storage](/1.4/documentation/cloud-connectivity/google-cloud.md) * [OneLake](/1.4/documentation/cloud-connectivity/onelake.md) * Logging * [Overview](/1.4/documentation/logging/Overview.md) * [Logs Level](/1.4/documentation/logging/logs-level.md) * [Log Database](/1.4/documentation/logging/log-database.md) * [Log Files Names Mapping using variables](/1.4/documentation/logging/log-files-names-mapping-using-variables.md) * [OpenTelemetry](/1.4/documentation/logging/OpenTelemetry.md) * [Examples](/1.4/documentation/logging/examples.md) * Examples * [SQL Server Examples](/1.4/documentation/examples/sql-server.md) * [PostgreSQL Examples](/1.4/documentation/examples/postgresql.md) * [MySQL Examples](/1.4/documentation/examples/mysql.md) * [Oracle Examples](/1.4/documentation/examples/oracle.md) * [DB2 Examples](/1.4/documentation/examples/db2.md) * [Other Databases](/1.4/documentation/examples/other-databases.md) * [Output Formats](/1.4/documentation/examples/output-formats.md) * [Cloud Storage](/1.4/documentation/examples/cloud-storage.md) * [Advanced Scenarios](/1.4/documentation/examples/advanced-scenarios.md) * Compatibility * [Sources & Platforms](/1.4/documentation/compatibility/sources_platforms.md) * [Operating Systems](/1.4/documentation/compatibility/operating_systems.md) ## Datatypes Conversion[​](#datatypes-conversion "Direct link to Datatypes Conversion") * [Overview](/1.4/datatypes-conversion/overview.md) * SQL Server * [mssql](/1.4/datatypes-conversion/mssql/parquet.md) * [adbc\_mssql](/1.4/datatypes-conversion/mssql/adbc-parquet.md) * MySQL * [mysql](/1.4/datatypes-conversion/mysql/parquet.md) * Oracle * [oraodp](/1.4/datatypes-conversion/oracle/parquet.md) * [adbc\_oraodp](/1.4/datatypes-conversion/oracle/adbc-parquet.md) * PostgreSQL * [pgsql](/1.4/datatypes-conversion/postgresql/parquet.md) * [pgcopy](/1.4/datatypes-conversion/postgresql-copy/parquet.md) * [adbc\_pgsql](/1.4/datatypes-conversion/postgresql/adbc-parquet.md) * SAP HANA * [hana](/1.4/datatypes-conversion/saphana/parquet.md) * Teradata * [teradata](/1.4/datatypes-conversion/teradata/parquet.md) ## Integration[​](#integration "Direct link to Integration") * [Docker](/1.4/integration/docker-integration.md) * [Kestra](/1.4/integration/kestra-integration.md) * [Airflow](/1.4/integration/airflow-integration.md) * [PostgreSQL](/1.4/integration/postgresql-integration.md) ## Release Notes[​](#release-notes "Direct link to Release Notes") * [Release Notes 1.4](/1.4/release-notes/release-notes-1.4.md) * [Release Notes 1.3](/1.4/release-notes/release-notes-1.3.md) * [Release Notes 1.2](/1.4/release-notes/release-notes-1.2.md) * [Release Notes 1.1](/1.4/release-notes/release-notes-1.1.md) * [Release Notes 1.0](/1.4/release-notes/release-notes-1.0.md) * [Release Notes 0.32](/1.4/release-notes/release-notes-0.32.md) ## AI Integrations[​](#ai-integrations "Direct link to AI Integrations") * [FastBCP Agent Skill](/1.4/ai/agent-skills.md) * [FastBCP MCP Server](/1.4/ai/mcp-server.md) ## [Sitemap](/1.4/sitemap.md)[​](#sitemap-1 "Direct link to sitemap-1") --- # FastBCP Command Wizard Expand All\[ ] ### PlatformWindows Windows ![Linux](/img/tux.svg)Linux ### Connection ParametersMS SQL Server Connection Type? : ADBC (High Performance) MS SQL Server (Arpe.io ADBC FastDriver) PostgreSQL (Arpe.io ADBC FastDriver) Oracle (Arpe.io ADBC FastDriver) Netezza (Arpe.io ADBC FastDriver) Teradata (Arpe.io ADBC FastDriver) Standard Drivers ClickHouse MS SQL Server MySQL Netezza ODBC OLEDB Oracle (ODP) PostgreSQL (pgcopy) PostgreSQL (pgsql) SAP HANA Teradata | Provider? : | SQLOLEDB | | ------------------------ | ----------------------------- | | Server? : | mss-server,1433 | | Source Connect String? : | Server=myserver;Database=mydb | | DSN? : | MyDSN | | Trusted? : | \[ ] | | User? : | username | | Password? : | password | | Database? : | mydb | | Application Intent? : | ReadOnlyReadWrite | ### Source Query / Table ### Output Options ### Format Options ### Parquet Options ### Cloud Options ### Parallel Parameters ### Advanced Parameters ### License ### Generated Command Multi-line\[x] generate config sharecopy ``` ``` --- # Getting Started with FastBCP If you haven't installed FastBCP yet, please check the [Installation](/1.5/installation.md) section first. You can also build your first FastBCP command using our interactive [Command Builder Wizard](/latest/wizard.md). [FastBCP Tutorial](https://www.youtube.com/embed/Tpmc6NrTtuM) --- # FastBCP Agent Skill arpe.io publishes official agent skills in the [arpe-io/arpeio-skills](https://github.com/arpe-io/arpeio-skills) GitHub repository. The [`fastbcp`](https://github.com/arpe-io/arpeio-skills/tree/main/plugins/fastbcp/skills/fastbcp) skill teaches your AI agent how to build, explain and troubleshoot FastBCP commands: which parameters exist, which options fit together, which parallel method to choose, and which mistakes to avoid. The same repository also has skills for FastTransfer, MigratorXpress, LakeXpress and the arpe.io ADBC drivers. Skill or MCP server? The skill is a set of instructions: it teaches the agent how FastBCP works, and the agent writes the command. The [arpe.io MCP server](/1.5/ai/mcp-server.md) gives the agent tools that build, validate and, if you allow it, run FastBCP 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 fastbcp --marketplace arpe-io/arpeio-skills ``` Or in two steps: ``` /plugin marketplace add arpe-io/arpeio-skills /plugin install fastbcp@arpe-io ``` Then just ask, for example: *"Export dbo.Orders from SQL Server to Parquet on S3 with FastBCP, in parallel"*. To get the latest version of the skill later: ``` /plugin marketplace update arpe-io /plugin update fastbcp@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/fastbcp/skills/fastbcp / ``` For agents without skill support, paste the content of [`SKILL.md`](https://github.com/arpe-io/arpeio-skills/blob/main/plugins/fastbcp/skills/fastbcp/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 FastBCP version its facts were checked against. Before building a command, it asks the agent to check the installed version (`FastBCP --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 FastBCP version, the prompt you gave, and the command the agent produced (with passwords and licence text removed). --- # FastBCP 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 FastBCP, the assistant can ask the server to validate a set of parameters and render the exact FastBCP command, look up what FastBCP supports, read the release notes and search this documentation. If FastBCP 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 FastBCP 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 FastBCP 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.5/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 FastBCP from the assistant[​](#run-fastbcp-from-the-assistant "Direct link to Run FastBCP from the assistant") To let the assistant run FastBCP, install the server on the machine where FastBCP 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 FASTBCP_PATH=/path/to/FastBCP arpeio -- arpeio-mcp ``` In Claude Desktop, and in other clients that use the `mcpServers` format: ``` { "mcpServers": { "arpeio": { "command": "arpeio-mcp", "env": { "FASTBCP_PATH": "/path/to/FastBCP" } } } } ``` | Variable | Description | | ----------------- | ------------------------------------------------------------------------ | | `FASTBCP_PATH` | Path to the FastBCP binary. Without it, the server only builds commands. | | `FASTBCP_TIMEOUT` | Execution timeout, in seconds. Optional. | | `FASTBCP_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 | | ------------------------ | ------------------------------------------------------------------------------------------------------------------- | | `fastbcp_info` | Reference information, picked with `action`: supported formats, parallel methods, workflow tips, version detection. | | `fastbcp_preview_export` | Validates the parameters and renders the FastBCP command. When no parallel method is given, it suggests one. | | `fastbcp_execute_export` | Runs the previewed command. Needs a local FastBCP 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: *"Export the Sales.Orders table from PostgreSQL to Parquet files in an S3 bucket, split in 8 parallel parts"*. 2. The assistant calls `fastbcp_preview_export`. The tool checks the parameters and returns the FastBCP command, an explanation, and warnings when an option does not exist in the FastBCP version you run. 3. You review the command. Passwords are masked in the displayed version. 4. If execution is enabled, the assistant calls `fastbcp_execute_export`. 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: `export-table` for FastBCP, and `troubleshoot` to explain a failed run from its error message. The server also exposes the FastBCP capability matrix as the MCP resource `arpeio://capabilities/fastbcp-formats`. ## 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). --- # SQL Server (ADBC) → Parquet Datatypes conversion mapping when exporting from **SQL Server** using the ADBC connector (`--connectiontype adbc_mssql`) to **Parquet** format. Platform availability The ADBC FastDriver connectors (`adbc_mssql`, `adbc_pgsql`) are available on **Windows x64** and **Linux x64** only. They are **not** supported on **Linux ARM64**. info The ADBC connector does not map every type the way the standard [`mssql`](/1.5/datatypes-conversion/mssql/parquet.md) driver does. Compare both pages before switching. | | | | --------------- | ------------------------- | | **Source** | SQL Server (adbc\_mssql) | | **Format** | Parquet | | **FastBCP** | 1.5.0.0 (ArpeMSSQL 0.7.8) | | **Test Status** | OK (31/31 Nullable) | Since FastBCP 1.5 * `sql_variant` is exported (as text); it failed in 1.4. * `time(7)`, `datetime2(7)` and `datetimeoffset(7)` are written with a **microsecond** unit by default (the 7th digit is dropped), so that older readers (Spark before 3.x) can read the files. Add `adbc.arpemssql.timestamp_precision=nanosecond` to `--sourceconnectstring` to keep the 100 ns resolution (nanosecond unit). * `geography` and `geometry` are converted to **WKB** with GeoParquet metadata (`geo` key: WKB encoding, spherical edges for `geography`), so Parquet readers see them as geometries. `adbc.arpemssql.geospatial=wkb` gives plain WKB without the metadata, `varbinary` the SQL Server serialization. ## Parquet Schema: testdatatypes\_nullable[​](#parquet-schema-testdatatypes_nullable "Direct link to Parquet Schema: testdatatypes_nullable") | name | physical\_type | converted\_type | logical\_type | | --------------------- | ----------------------- | ----------------- | --------------------------------------------------- | | col\_bigint | INT64 | — | — | | col\_int | INT32 | — | — | | col\_smallint | INT32 | INT\_16 | IntType(bitWidth=16, isSigned=1) | | col\_tinyint | INT32 | UINT\_8 | IntType(bitWidth=8, isSigned=0) | | col\_bit | BOOLEAN | — | — | | col\_decimal | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=2, precision=18) | | col\_numeric | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=2, precision=18) | | col\_money | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=4, precision=19) | | col\_smallmoney | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=4, precision=10) | | col\_float | DOUBLE | — | — | | col\_real | FLOAT | — | — | | col\_date | INT32 | DATE | DateType() | | col\_time | INT64 | — | TimeType(isAdjustedToUTC=0, unit=MICROS) | | col\_datetime | INT64 | TIMESTAMP\_MILLIS | TimestampType(isAdjustedToUTC=0, unit=MILLIS) | | col\_datetime2 | INT64 | TIMESTAMP\_MICROS | TimestampType(isAdjustedToUTC=0, unit=MICROS) | | col\_datetimeoffset | INT64 | TIMESTAMP\_MICROS | TimestampType(isAdjustedToUTC=1, unit=MICROS) | | col\_smalldatetime | INT64 | TIMESTAMP\_MILLIS | TimestampType(isAdjustedToUTC=0, unit=MILLIS) | | col\_char | BYTE\_ARRAY | UTF8 | StringType() | | col\_varchar | BYTE\_ARRAY | UTF8 | StringType() | | col\_nchar | BYTE\_ARRAY | UTF8 | StringType() | | col\_nvarchar | BYTE\_ARRAY | UTF8 | StringType() | | col\_text | BYTE\_ARRAY | UTF8 | StringType() | | col\_ntext | BYTE\_ARRAY | UTF8 | StringType() | | col\_binary | BYTE\_ARRAY | — | — | | col\_varbinary | BYTE\_ARRAY | — | — | | col\_image | BYTE\_ARRAY | — | — | | col\_uniqueidentifier | BYTE\_ARRAY | UTF8 | StringType() | | col\_xml | BYTE\_ARRAY | UTF8 | StringType() | | col\_geography | BYTE\_ARRAY | — | — (WKB, GeoParquet `geo` metadata, spherical edges) | | col\_geometry | BYTE\_ARRAY | — | — (WKB, GeoParquet `geo` metadata) | | col\_sql\_variant | BYTE\_ARRAY | UTF8 | StringType() | --- # SQL Server backup files → Parquet Datatypes conversion mapping when exporting a table from a **SQL Server full backup** (`.bak`) using the ArpeMSBackup ADBC driver (`--connectiontype backup_mssql`) to **Parquet** format. Platform availability `backup_mssql` is available on **Windows x64** and **Linux x64** only. It is **not** supported on **Linux ARM64**. Compared with `adbc_mssql` The mapping is the one of [`adbc_mssql`](/1.5/datatypes-conversion/mssql/adbc-parquet.md), with the same values, except for two of its defaults: * `time(7)`, `datetime2(7)`, `datetimeoffset(7)`: `backup_mssql` keeps the 100 ns resolution (**nanosecond** unit); `adbc_mssql` writes **microseconds** by default. * `geography`, `geometry`: `backup_mssql` writes the SQL Server binary serialization (as `adbc_mssql` with `adbc.arpemssql.geospatial=varbinary`); `adbc_mssql` converts them to WKB with GeoParquet metadata by default. | | | | --------------- | -------------------------------------- | | **Source** | SQL Server backup file (backup\_mssql) | | **Format** | Parquet | | **FastBCP** | 1.5.0.0 | | **Test Status** | OK (31/31 Nullable) | ## Parquet Schema: testdatatypes\_nullable[​](#parquet-schema-testdatatypes_nullable "Direct link to Parquet Schema: testdatatypes_nullable") | name | physical\_type | converted\_type | logical\_type | | --------------------- | ----------------------- | ----------------- | --------------------------------------------- | | col\_bigint | INT64 | — | — | | col\_int | INT32 | — | — | | col\_smallint | INT32 | INT\_16 | IntType(bitWidth=16, isSigned=1) | | col\_tinyint | INT32 | UINT\_8 | IntType(bitWidth=8, isSigned=0) | | col\_bit | BOOLEAN | — | — | | col\_decimal | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=2, precision=18) | | col\_numeric | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=2, precision=18) | | col\_money | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=4, precision=19) | | col\_smallmoney | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=4, precision=10) | | col\_float | DOUBLE | — | — | | col\_real | FLOAT | — | — | | col\_date | INT32 | DATE | DateType() | | col\_time | INT64 | — | TimeType(isAdjustedToUTC=0, unit=NANOS) | | col\_datetime | INT64 | TIMESTAMP\_MILLIS | TimestampType(isAdjustedToUTC=0, unit=MILLIS) | | col\_datetime2 | INT64 | — | TimestampType(isAdjustedToUTC=0, unit=NANOS) | | col\_datetimeoffset | INT64 | — | TimestampType(isAdjustedToUTC=1, unit=NANOS) | | col\_smalldatetime | INT64 | TIMESTAMP\_MILLIS | TimestampType(isAdjustedToUTC=0, unit=MILLIS) | | col\_char | BYTE\_ARRAY | UTF8 | StringType() | | col\_varchar | BYTE\_ARRAY | UTF8 | StringType() | | col\_nchar | BYTE\_ARRAY | UTF8 | StringType() | | col\_nvarchar | BYTE\_ARRAY | UTF8 | StringType() | | col\_text | BYTE\_ARRAY | UTF8 | StringType() | | col\_ntext | BYTE\_ARRAY | UTF8 | StringType() | | col\_binary | BYTE\_ARRAY | — | — | | col\_varbinary | BYTE\_ARRAY | — | — | | col\_image | BYTE\_ARRAY | — | — | | col\_uniqueidentifier | BYTE\_ARRAY | UTF8 | StringType() | | col\_xml | BYTE\_ARRAY | UTF8 | StringType() | | col\_geography | BYTE\_ARRAY | — | — | | col\_geometry | BYTE\_ARRAY | — | — | | col\_sql\_variant | BYTE\_ARRAY | UTF8 | StringType() | ## Notes[​](#notes "Direct link to Notes") * `datetimeoffset` is exported as a UTC instant (`isAdjustedToUTC=1`); the original offset is not kept. * `time` and `datetime2` keep their 7 decimal digits (nanosecond unit, the last two digits always zero). * `uniqueidentifier` is written in lowercase (`b85ed2b1-24f5-4b71-8d1a-6d1e4e3f0c11`), like `adbc_mssql`. * Strings are converted to UTF-8 from the column's collation code page (`char`, `varchar`, `text`) or from UTF-16 (`nchar`, `nvarchar`, `ntext`); UTF-8 collations (SQL Server 2019+) are read as they are. * `xml` is decoded from the binary XML stored in the backup to text. * `geography`, `geometry` and `hierarchyid` (CLR types) are exported as their binary serialization. * `sql_variant` is exported as text (`CAST(value AS nvarchar)`; ISO 8601 for dates, `0x…` for binary values). --- # SQL Server → Parquet Datatypes conversion mapping when exporting from **SQL Server** (`--connectiontype mssql`) to **Parquet** format. | | | | --------------- | ------------------ | | **Source** | SQL Server (mssql) | | **Format** | Parquet | | **FastBCP** | 1.4.0.0 | | **Test Status** | PASS (Nullable) | ## Parquet Schema: testdatatypes\_nullable[​](#parquet-schema-testdatatypes_nullable "Direct link to Parquet Schema: testdatatypes_nullable") | name | physical\_type | converted\_type | logical\_type | | --------------------- | ----------------------- | ----------------- | ---------------------------------------- | | col\_bigint | INT64 | INT\_64 | IntType(bitWidth=64, isSigned=1) | | col\_int | INT32 | INT\_32 | IntType(bitWidth=32, isSigned=1) | | col\_smallint | INT32 | INT\_16 | IntType(bitWidth=16, isSigned=1) | | col\_tinyint | INT32 | UINT\_8 | IntType(bitWidth=8, isSigned=0) | | col\_bit | BOOLEAN | — | — | | col\_decimal | INT64 | DECIMAL | DecimalType(scale=2, precision=18) | | col\_numeric | INT64 | DECIMAL | DecimalType(scale=2, precision=18) | | col\_money | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=4, precision=19) | | col\_smallmoney | INT64 | DECIMAL | DecimalType(scale=4, precision=10) | | col\_float | DOUBLE | — | — | | col\_real | FLOAT | — | — | | col\_date | INT32 | DATE | — | | col\_time | INT64 | — | TimeType(isAdjustedToUTC=0, unit=MICROS) | | col\_datetime | INT64 | TIMESTAMP\_MILLIS | — | | col\_datetime2 | INT64 | TIMESTAMP\_MILLIS | — | | col\_datetimeoffset | BYTE\_ARRAY | UTF8 | StringType() | | col\_smalldatetime | INT64 | TIMESTAMP\_MILLIS | — | | col\_char | BYTE\_ARRAY | UTF8 | StringType() | | col\_varchar | BYTE\_ARRAY | UTF8 | StringType() | | col\_nchar | BYTE\_ARRAY | UTF8 | StringType() | | col\_nvarchar | BYTE\_ARRAY | UTF8 | StringType() | | col\_text | BYTE\_ARRAY | UTF8 | StringType() | | col\_ntext | BYTE\_ARRAY | UTF8 | StringType() | | col\_binary | BYTE\_ARRAY | — | — | | col\_varbinary | BYTE\_ARRAY | — | — | | col\_image | BYTE\_ARRAY | — | — | | col\_uniqueidentifier | BYTE\_ARRAY | UTF8 | StringType() | | col\_xml | BYTE\_ARRAY | UTF8 | StringType() | | col\_sql\_variant | BYTE\_ARRAY | UTF8 | StringType() | | col\_geography | BYTE\_ARRAY | UTF8 | StringType() | | col\_geometry | BYTE\_ARRAY | UTF8 | StringType() | --- # MySQL → Parquet Datatypes conversion mapping when exporting from **MySQL** (`--connectiontype mysql`) to **Parquet** format. | | | | --------------- | --------------- | | **Source** | MySQL (mysql) | | **Format** | Parquet | | **FastBCP** | 1.4.0.0 | | **Test Status** | PASS (Nullable) | ## Parquet Schema: testdatatypes\_nullable[​](#parquet-schema-testdatatypes_nullable "Direct link to Parquet Schema: testdatatypes_nullable") | name | physical\_type | converted\_type | logical\_type | | --------------- | -------------- | ----------------- | ---------------------------------- | | col\_bigint | INT64 | INT\_64 | IntType(bitWidth=64, isSigned=1) | | col\_int | INT32 | INT\_32 | IntType(bitWidth=32, isSigned=1) | | col\_mediumint | INT32 | INT\_32 | IntType(bitWidth=32, isSigned=1) | | col\_smallint | INT32 | INT\_16 | IntType(bitWidth=16, isSigned=1) | | col\_tinyint | BYTE\_ARRAY | UTF8 | StringType() | | col\_bit | BYTE\_ARRAY | UTF8 | StringType() | | col\_decimal | INT64 | DECIMAL | DecimalType(scale=2, precision=18) | | col\_float | FLOAT | — | — | | col\_double | DOUBLE | — | — | | col\_date | INT64 | TIMESTAMP\_MILLIS | — | | col\_time | BYTE\_ARRAY | UTF8 | StringType() | | col\_datetime | INT64 | TIMESTAMP\_MILLIS | — | | col\_timestamp | INT64 | TIMESTAMP\_MILLIS | — | | col\_year | INT32 | INT\_32 | IntType(bitWidth=32, isSigned=1) | | col\_char | BYTE\_ARRAY | UTF8 | StringType() | | col\_varchar | BYTE\_ARRAY | UTF8 | StringType() | | col\_tinytext | BYTE\_ARRAY | UTF8 | StringType() | | col\_text | BYTE\_ARRAY | UTF8 | StringType() | | col\_mediumtext | BYTE\_ARRAY | UTF8 | StringType() | | col\_longtext | BYTE\_ARRAY | UTF8 | StringType() | | col\_binary | BYTE\_ARRAY | — | — | | col\_varbinary | BYTE\_ARRAY | — | — | | col\_tinyblob | BYTE\_ARRAY | — | — | | col\_blob | BYTE\_ARRAY | — | — | | col\_mediumblob | BYTE\_ARRAY | — | — | | col\_longblob | BYTE\_ARRAY | — | — | | col\_enum | BYTE\_ARRAY | UTF8 | StringType() | | col\_set | BYTE\_ARRAY | UTF8 | StringType() | | col\_json | BYTE\_ARRAY | UTF8 | StringType() | | col\_geometry | BYTE\_ARRAY | — | — | | col\_point | BYTE\_ARRAY | — | — | | col\_linestring | BYTE\_ARRAY | — | — | | col\_polygon | BYTE\_ARRAY | — | — | --- # Oracle (ADBC) → Parquet Datatypes conversion mapping when exporting from **Oracle** using the ADBC connector (`--connectiontype adbc_oracle`) to **Parquet** format. Platform availability The ADBC FastDriver connectors are available on **Windows x64** and **Linux x64** only. They are **not** supported on **Linux ARM64**. info The ADBC connector does not map every type the way the standard [`oraodp`](/1.5/datatypes-conversion/oracle/parquet.md) driver does. Compare both pages before switching. | | | | --------------- | ------------------------ | | **Source** | Oracle (adbc\_oracle) | | **Format** | Parquet | | **FastBCP** | 1.4.0.0 | | **Test Status** | PARTIAL (21/25 Nullable) | Failed Types The following datatypes are **not supported** with this connector: * `ROWID` — export fails * `UROWID` — export fails * `XMLTYPE` — export fails * `BFILE` — export fails ## Parquet Schema: testdatatypes\_nullable[​](#parquet-schema-testdatatypes_nullable "Direct link to Parquet Schema: testdatatypes_nullable") | name | physical\_type | converted\_type | logical\_type | | ------------------- | ----------------------- | ----------------- | --------------------------------------------- | | COL\_NUMBER | BYTE\_ARRAY | UTF8 | StringType() | | COL\_NUMBER10 | INT64 | — | — | | COL\_NUMBER18\_2 | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=2, precision=18) | | COL\_FLOAT | BYTE\_ARRAY | UTF8 | StringType() | | COL\_BINARY\_FLOAT | FLOAT | — | — | | COL\_BINARY\_DOUBLE | DOUBLE | — | — | | COL\_CHAR | BYTE\_ARRAY | UTF8 | StringType() | | COL\_VARCHAR2 | BYTE\_ARRAY | UTF8 | StringType() | | COL\_NCHAR | BYTE\_ARRAY | UTF8 | StringType() | | COL\_NVARCHAR2 | BYTE\_ARRAY | UTF8 | StringType() | | COL\_CLOB | BYTE\_ARRAY | UTF8 | StringType() | | COL\_NCLOB | BYTE\_ARRAY | UTF8 | StringType() | | COL\_BLOB | BYTE\_ARRAY | — | — | | COL\_RAW | BYTE\_ARRAY | — | — | | COL\_LONG\_RAW | BYTE\_ARRAY | — | — | | COL\_DATE | INT64 | TIMESTAMP\_MILLIS | TimestampType(isAdjustedToUTC=0, unit=MILLIS) | | COL\_TIMESTAMP | INT64 | TIMESTAMP\_MICROS | TimestampType(isAdjustedToUTC=0, unit=MICROS) | | COL\_TIMESTAMP\_TZ | INT64 | TIMESTAMP\_MICROS | TimestampType(isAdjustedToUTC=1, unit=MICROS) | | COL\_TIMESTAMP\_LTZ | INT64 | TIMESTAMP\_MICROS | TimestampType(isAdjustedToUTC=1, unit=MICROS) | | COL\_INTERVAL\_YM | INT64 | — | — | | COL\_INTERVAL\_DS | BYTE\_ARRAY | UTF8 | StringType() | --- # Oracle → Parquet Datatypes conversion mapping when exporting from **Oracle** (`--connectiontype oraodp`) to **Parquet** format. | | | | --------------- | --------------- | | **Source** | Oracle (oraodp) | | **Format** | Parquet | | **FastBCP** | 1.4.0.0 | | **Test Status** | PASS (Nullable) | ## Parquet Schema: testdatatypes\_nullable[​](#parquet-schema-testdatatypes_nullable "Direct link to Parquet Schema: testdatatypes_nullable") | name | physical\_type | converted\_type | logical\_type | | ------------------- | ----------------------- | ----------------- | ----------------------------------- | | COL\_NUMBER | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=18, precision=38) | | COL\_NUMBER10 | INT64 | INT\_64 | IntType(bitWidth=64, isSigned=1) | | COL\_NUMBER18\_2 | INT64 | DECIMAL | DecimalType(scale=2, precision=18) | | COL\_FLOAT | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=18, precision=38) | | COL\_BINARY\_FLOAT | FLOAT | — | — | | COL\_BINARY\_DOUBLE | DOUBLE | — | — | | COL\_CHAR | BYTE\_ARRAY | UTF8 | StringType() | | COL\_VARCHAR2 | BYTE\_ARRAY | UTF8 | StringType() | | COL\_NCHAR | BYTE\_ARRAY | UTF8 | StringType() | | COL\_NVARCHAR2 | BYTE\_ARRAY | UTF8 | StringType() | | COL\_CLOB | BYTE\_ARRAY | UTF8 | StringType() | | COL\_NCLOB | BYTE\_ARRAY | UTF8 | StringType() | | COL\_BLOB | BYTE\_ARRAY | — | — | | COL\_RAW | BYTE\_ARRAY | — | — | | COL\_LONG\_RAW | BYTE\_ARRAY | — | — | | COL\_DATE | INT64 | TIMESTAMP\_MILLIS | — | | COL\_TIMESTAMP | INT64 | TIMESTAMP\_MILLIS | — | | COL\_TIMESTAMP\_TZ | BYTE\_ARRAY | UTF8 | StringType() | | COL\_TIMESTAMP\_LTZ | INT64 | TIMESTAMP\_MILLIS | — | | COL\_INTERVAL\_YM | INT64 | INT\_64 | IntType(bitWidth=64, isSigned=1) | | COL\_INTERVAL\_DS | BYTE\_ARRAY | UTF8 | StringType() | | COL\_ROWID | BYTE\_ARRAY | UTF8 | StringType() | | COL\_UROWID | BYTE\_ARRAY | UTF8 | StringType() | | COL\_XMLTYPE | BYTE\_ARRAY | UTF8 | StringType() | | COL\_BFILE | BYTE\_ARRAY | — | — | --- # Datatypes Conversion When FastBCP exports a table, every native source column type is mapped to a type in the target output format. This section documents the **exact mappings** FastBCP produces. These pages are not a specification: each one is the Parquet schema read back from a real export of a test table covering all of the source's native datatypes. ## Supported Sources[​](#supported-sources "Direct link to Supported Sources") Sources are grouped by database system. A system can be read through several connection types (`--connectiontype`), and each one has its own page because the mappings it produces can differ — `pgcopy` produces exactly the same mappings as `pgsql`, while the ADBC connectors differ from their standard counterparts on several types. | Database | Connection Types | | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | SQL Server | [`mssql`](/1.5/datatypes-conversion/mssql/parquet.md) · [`adbc_mssql`](/1.5/datatypes-conversion/mssql/adbc-parquet.md) · [`backup_mssql`](/1.5/datatypes-conversion/mssql/backup-parquet.md) (backup files) | | MySQL | [`mysql`](/1.5/datatypes-conversion/mysql/parquet.md) | | Oracle | [`oraodp`](/1.5/datatypes-conversion/oracle/parquet.md) · [`adbc_oracle`](/1.5/datatypes-conversion/oracle/adbc-parquet.md) | | PostgreSQL | [`pgsql`](/1.5/datatypes-conversion/postgresql/parquet.md) · [`pgcopy`](/1.5/datatypes-conversion/postgresql-copy/parquet.md) · [`adbc_pgsql`](/1.5/datatypes-conversion/postgresql/adbc-parquet.md) | | SAP HANA | [`hana`](/1.5/datatypes-conversion/saphana/parquet.md) | | Teradata | [`teradata`](/1.5/datatypes-conversion/teradata/parquet.md) | Parquet is the only output format documented here. ## How to Read a Page[​](#how-to-read-a-page "Direct link to How to Read a Page") Each page opens with a summary of the export it documents — source, output format, the FastBCP build used and the test status — followed by the Parquet schema produced from the **`testdatatypes_nullable`** table, in which every column accepts `NULL`. | Column | Description | | ------------------- | ------------------------------------------------------------------------------------------------------------------------- | | **name** | The column name in the source table | | **physical\_type** | The Parquet physical storage type: `BOOLEAN`, `INT32`, `INT64`, `FLOAT`, `DOUBLE`, `BYTE_ARRAY` or `FIXED_LEN_BYTE_ARRAY` | | **converted\_type** | The legacy Parquet annotation on top of it (`UTF8`, `DECIMAL`, `DATE`, `TIMESTAMP_MILLIS`, …) | | **logical\_type** | The modern Parquet annotation (`StringType()`, `DecimalType(scale=2, precision=18)`, `IntType(…)`, …) | A `—` means the column carries no annotation of that kind, so the physical type alone describes it. NOT NULL columns Declaring the source columns `NOT NULL` does not change the mapping. The only difference is the Parquet repetition level (REQUIRED instead of OPTIONAL), which these tables do not show. --- # PostgreSQL COPY → Parquet Datatypes conversion mapping when exporting from **PostgreSQL** using the COPY protocol (`--connectiontype pgcopy`) to **Parquet** format. info The COPY protocol variant produces the same type mappings as the standard PostgreSQL driver. See also [PostgreSQL (pgsql)](/1.5/datatypes-conversion/postgresql/parquet.md). | | | | --------------- | ------------------------ | | **Source** | PostgreSQL COPY (pgcopy) | | **Format** | Parquet | | **FastBCP** | 1.4.0.0 | | **Test Status** | PASS (Nullable) | ## Parquet Schema: testdatatypes\_nullable[​](#parquet-schema-testdatatypes_nullable "Direct link to Parquet Schema: testdatatypes_nullable") | name | physical\_type | converted\_type | logical\_type | | ---------------------- | ----------------------- | ----------------- | ---------------------------------------- | | col\_bigint | INT64 | INT\_64 | IntType(bitWidth=64, isSigned=1) | | col\_integer | INT32 | INT\_32 | IntType(bitWidth=32, isSigned=1) | | col\_smallint | INT32 | INT\_16 | IntType(bitWidth=16, isSigned=1) | | col\_boolean | BOOLEAN | — | — | | col\_numeric | INT64 | DECIMAL | DecimalType(scale=2, precision=18) | | col\_real | FLOAT | — | — | | col\_double\_precision | DOUBLE | — | — | | col\_money | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=4, precision=19) | | col\_date | INT32 | DATE | — | | col\_time | INT32 | TIME\_MILLIS | TimeType(isAdjustedToUTC=0, unit=MILLIS) | | col\_timestamp | INT64 | TIMESTAMP\_MILLIS | — | | col\_timestamptz | BYTE\_ARRAY | UTF8 | StringType() | | col\_interval | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | col\_char | BYTE\_ARRAY | UTF8 | StringType() | | col\_varchar | BYTE\_ARRAY | UTF8 | StringType() | | col\_text | BYTE\_ARRAY | UTF8 | StringType() | | col\_bytea | BYTE\_ARRAY | — | — | | col\_uuid | BYTE\_ARRAY | UTF8 | StringType() | | col\_json | BYTE\_ARRAY | UTF8 | StringType() | | col\_jsonb | BYTE\_ARRAY | — | — | | col\_xml | BYTE\_ARRAY | UTF8 | StringType() | | col\_inet | BYTE\_ARRAY | UTF8 | StringType() | | col\_cidr | BYTE\_ARRAY | UTF8 | StringType() | | col\_macaddr | BYTE\_ARRAY | UTF8 | StringType() | | col\_point | BYTE\_ARRAY | UTF8 | StringType() | | col\_line | BYTE\_ARRAY | UTF8 | StringType() | | col\_lseg | BYTE\_ARRAY | UTF8 | StringType() | | col\_box | BYTE\_ARRAY | UTF8 | StringType() | | col\_path | BYTE\_ARRAY | UTF8 | StringType() | | col\_polygon | BYTE\_ARRAY | UTF8 | StringType() | | col\_circle | BYTE\_ARRAY | UTF8 | StringType() | | col\_int4range | BYTE\_ARRAY | UTF8 | StringType() | | col\_int8range | BYTE\_ARRAY | UTF8 | StringType() | | col\_numrange | BYTE\_ARRAY | UTF8 | StringType() | | col\_tsrange | BYTE\_ARRAY | UTF8 | StringType() | | col\_tstzrange | BYTE\_ARRAY | UTF8 | StringType() | | col\_daterange | BYTE\_ARRAY | UTF8 | StringType() | | col\_bit | BYTE\_ARRAY | UTF8 | StringType() | | col\_bit\_varying | BYTE\_ARRAY | UTF8 | StringType() | | col\_oid | BYTE\_ARRAY | UTF8 | StringType() | | col\_int\_array | BYTE\_ARRAY | UTF8 | StringType() | --- # PostgreSQL (ADBC) → Parquet Datatypes conversion mapping when exporting from **PostgreSQL** using the ADBC connector (`--connectiontype adbc_pgsql`) to **Parquet** format. Platform availability The ADBC FastDriver connectors (`adbc_mssql`, `adbc_pgsql`) are available on **Windows x64** and **Linux x64** only. They are **not** supported on **Linux ARM64**. info The ADBC connector does not map every type the way the standard [`pgsql`](/1.5/datatypes-conversion/postgresql/parquet.md) driver does. Compare both pages before switching. | | | | --------------- | ------------------------ | | **Source** | PostgreSQL (adbc\_pgsql) | | **Format** | Parquet | | **FastBCP** | 1.4.0.0 | | **Test Status** | PARTIAL (40/41 Nullable) | Failed Types The following datatype is **not supported** with this connector: * `INTERVAL` — export fails ## Parquet Schema: testdatatypes\_nullable[​](#parquet-schema-testdatatypes_nullable "Direct link to Parquet Schema: testdatatypes_nullable") | name | physical\_type | converted\_type | logical\_type | | ---------------------- | ----------------------- | ----------------- | --------------------------------------------- | | col\_bigint | INT64 | — | — | | col\_integer | INT32 | — | — | | col\_smallint | INT32 | INT\_16 | IntType(bitWidth=16, isSigned=1) | | col\_boolean | BOOLEAN | — | — | | col\_numeric | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=2, precision=18) | | col\_real | FLOAT | — | — | | col\_double\_precision | DOUBLE | — | — | | col\_money | BYTE\_ARRAY | — | — | | col\_date | INT32 | DATE | DateType() | | col\_time | INT64 | — | TimeType(isAdjustedToUTC=0, unit=MICROS) | | col\_timestamp | INT64 | TIMESTAMP\_MICROS | TimestampType(isAdjustedToUTC=0, unit=MICROS) | | col\_timestamptz | INT64 | TIMESTAMP\_MICROS | TimestampType(isAdjustedToUTC=1, unit=MICROS) | | col\_char | BYTE\_ARRAY | UTF8 | StringType() | | col\_varchar | BYTE\_ARRAY | UTF8 | StringType() | | col\_text | BYTE\_ARRAY | UTF8 | StringType() | | col\_bytea | BYTE\_ARRAY | — | — | | col\_uuid | BYTE\_ARRAY | UTF8 | StringType() | | col\_json | BYTE\_ARRAY | UTF8 | StringType() | | col\_jsonb | BYTE\_ARRAY | UTF8 | StringType() | | col\_xml | BYTE\_ARRAY | UTF8 | StringType() | | col\_inet | BYTE\_ARRAY | UTF8 | StringType() | | col\_cidr | BYTE\_ARRAY | UTF8 | StringType() | | col\_macaddr | BYTE\_ARRAY | UTF8 | StringType() | | col\_point | BYTE\_ARRAY | — | — | | col\_line | BYTE\_ARRAY | — | — | | col\_lseg | BYTE\_ARRAY | — | — | | col\_box | BYTE\_ARRAY | — | — | | col\_path | BYTE\_ARRAY | — | — | | col\_polygon | BYTE\_ARRAY | — | — | | col\_circle | BYTE\_ARRAY | — | — | | col\_int4range | BYTE\_ARRAY | — | — | | col\_int8range | BYTE\_ARRAY | — | — | | col\_numrange | BYTE\_ARRAY | — | — | | col\_tsrange | BYTE\_ARRAY | — | — | | col\_tstzrange | BYTE\_ARRAY | — | — | | col\_daterange | BYTE\_ARRAY | — | — | | col\_bit | BYTE\_ARRAY | UTF8 | StringType() | | col\_bit\_varying | BYTE\_ARRAY | UTF8 | StringType() | | col\_oid | INT32 | — | — | | col\_int\_array | BYTE\_ARRAY | — | — | --- # PostgreSQL → Parquet Datatypes conversion mapping when exporting from **PostgreSQL** (`--connectiontype pgsql`) to **Parquet** format. info [PostgreSQL COPY](/1.5/datatypes-conversion/postgresql-copy/parquet.md) (`--connectiontype pgcopy`) produces identical type mappings. The [ADBC connector](/1.5/datatypes-conversion/postgresql/adbc-parquet.md) (`--connectiontype adbc_pgsql`) does not. | | | | --------------- | ------------------ | | **Source** | PostgreSQL (pgsql) | | **Format** | Parquet | | **FastBCP** | 1.4.0.0 | | **Test Status** | PASS (Nullable) | ## Parquet Schema: testdatatypes\_nullable[​](#parquet-schema-testdatatypes_nullable "Direct link to Parquet Schema: testdatatypes_nullable") | name | physical\_type | converted\_type | logical\_type | | ---------------------- | ----------------------- | ----------------- | ---------------------------------------- | | col\_bigint | INT64 | INT\_64 | IntType(bitWidth=64, isSigned=1) | | col\_integer | INT32 | INT\_32 | IntType(bitWidth=32, isSigned=1) | | col\_smallint | INT32 | INT\_16 | IntType(bitWidth=16, isSigned=1) | | col\_boolean | BOOLEAN | — | — | | col\_numeric | INT64 | DECIMAL | DecimalType(scale=2, precision=18) | | col\_real | FLOAT | — | — | | col\_double\_precision | DOUBLE | — | — | | col\_money | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=4, precision=19) | | col\_date | INT32 | DATE | — | | col\_time | INT32 | TIME\_MILLIS | TimeType(isAdjustedToUTC=0, unit=MILLIS) | | col\_timestamp | INT64 | TIMESTAMP\_MILLIS | — | | col\_timestamptz | BYTE\_ARRAY | UTF8 | StringType() | | col\_interval | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | col\_char | BYTE\_ARRAY | UTF8 | StringType() | | col\_varchar | BYTE\_ARRAY | UTF8 | StringType() | | col\_text | BYTE\_ARRAY | UTF8 | StringType() | | col\_bytea | BYTE\_ARRAY | — | — | | col\_uuid | BYTE\_ARRAY | UTF8 | StringType() | | col\_json | BYTE\_ARRAY | UTF8 | StringType() | | col\_jsonb | BYTE\_ARRAY | — | — | | col\_xml | BYTE\_ARRAY | UTF8 | StringType() | | col\_inet | BYTE\_ARRAY | UTF8 | StringType() | | col\_cidr | BYTE\_ARRAY | UTF8 | StringType() | | col\_macaddr | BYTE\_ARRAY | UTF8 | StringType() | | col\_point | BYTE\_ARRAY | UTF8 | StringType() | | col\_line | BYTE\_ARRAY | UTF8 | StringType() | | col\_lseg | BYTE\_ARRAY | UTF8 | StringType() | | col\_box | BYTE\_ARRAY | UTF8 | StringType() | | col\_path | BYTE\_ARRAY | UTF8 | StringType() | | col\_polygon | BYTE\_ARRAY | UTF8 | StringType() | | col\_circle | BYTE\_ARRAY | UTF8 | StringType() | | col\_int4range | BYTE\_ARRAY | UTF8 | StringType() | | col\_int8range | BYTE\_ARRAY | UTF8 | StringType() | | col\_numrange | BYTE\_ARRAY | UTF8 | StringType() | | col\_tsrange | BYTE\_ARRAY | UTF8 | StringType() | | col\_tstzrange | BYTE\_ARRAY | UTF8 | StringType() | | col\_daterange | BYTE\_ARRAY | UTF8 | StringType() | | col\_bit | BYTE\_ARRAY | UTF8 | StringType() | | col\_bit\_varying | BYTE\_ARRAY | UTF8 | StringType() | | col\_oid | BYTE\_ARRAY | UTF8 | StringType() | | col\_int\_array | BYTE\_ARRAY | UTF8 | StringType() | --- # SAP HANA → Parquet Datatypes conversion mapping when exporting from **SAP HANA** (`--connectiontype hana`) to **Parquet** format. | | | | --------------- | --------------- | | **Source** | SAP HANA (hana) | | **Format** | Parquet | | **FastBCP** | 1.4.0.0 | | **Test Status** | PASS (Nullable) | ## Parquet Schema: testdatatypes\_nullable[​](#parquet-schema-testdatatypes_nullable "Direct link to Parquet Schema: testdatatypes_nullable") | name | physical\_type | converted\_type | logical\_type | | ----------------- | -------------- | ----------------- | ---------------------------------- | | COL\_TINYINT | INT32 | UINT\_8 | IntType(bitWidth=8, isSigned=0) | | COL\_SMALLINT | INT32 | INT\_16 | IntType(bitWidth=16, isSigned=1) | | COL\_INTEGER | INT32 | INT\_32 | IntType(bitWidth=32, isSigned=1) | | COL\_BIGINT | INT64 | INT\_64 | IntType(bitWidth=64, isSigned=1) | | COL\_DECIMAL | INT64 | DECIMAL | DecimalType(scale=2, precision=18) | | COL\_SMALLDECIMAL | INT64 | DECIMAL | DecimalType(scale=0, precision=16) | | COL\_REAL | FLOAT | — | — | | COL\_DOUBLE | DOUBLE | — | — | | COL\_FLOAT | DOUBLE | — | — | | COL\_BOOLEAN | BOOLEAN | — | — | | COL\_DATE | INT64 | TIMESTAMP\_MILLIS | — | | COL\_TIME | BYTE\_ARRAY | UTF8 | StringType() | | COL\_TIMESTAMP | INT64 | TIMESTAMP\_MILLIS | — | | COL\_SECONDDATE | INT64 | TIMESTAMP\_MILLIS | — | | COL\_CHAR | BYTE\_ARRAY | UTF8 | StringType() | | COL\_VARCHAR | BYTE\_ARRAY | UTF8 | StringType() | | COL\_NCHAR | BYTE\_ARRAY | UTF8 | StringType() | | COL\_NVARCHAR | BYTE\_ARRAY | UTF8 | StringType() | | COL\_ALPHANUM | BYTE\_ARRAY | UTF8 | StringType() | | COL\_CLOB | BYTE\_ARRAY | UTF8 | StringType() | | COL\_NCLOB | BYTE\_ARRAY | UTF8 | StringType() | | COL\_BLOB | BYTE\_ARRAY | — | — | | COL\_BINARY | BYTE\_ARRAY | — | — | | COL\_VARBINARY | BYTE\_ARRAY | — | — | | COL\_ST\_GEOMETRY | BYTE\_ARRAY | — | — | | COL\_ST\_POINT | BYTE\_ARRAY | — | — | | COL\_SHORTTEXT | BYTE\_ARRAY | UTF8 | StringType() | --- # Teradata → Parquet Datatypes conversion mapping when exporting from **Teradata** (`--connectiontype teradata`) to **Parquet** format. | | | | --------------- | ------------------- | | **Source** | Teradata (teradata) | | **Format** | Parquet | | **FastBCP** | 1.4.0.0 | | **Test Status** | PASS (Nullable) | ## Parquet Schema: testdatatypes\_nullable[​](#parquet-schema-testdatatypes_nullable "Direct link to Parquet Schema: testdatatypes_nullable") | name | physical\_type | converted\_type | logical\_type | | ------------------------ | ----------------------- | ----------------- | ---------------------------------------- | | col\_byteint | INT32 | INT\_16 | IntType(bitWidth=16, isSigned=1) | | col\_smallint | INT32 | INT\_16 | IntType(bitWidth=16, isSigned=1) | | col\_integer | INT32 | INT\_32 | IntType(bitWidth=32, isSigned=1) | | col\_bigint | INT64 | INT\_64 | IntType(bitWidth=64, isSigned=1) | | col\_decimal18\_2 | INT64 | DECIMAL | DecimalType(scale=2, precision=18) | | col\_float | DOUBLE | — | — | | col\_number | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=18, precision=38) | | col\_number18\_2 | INT64 | DECIMAL | DecimalType(scale=2, precision=18) | | col\_date | INT32 | DATE | — | | col\_time | INT64 | — | TimeType(isAdjustedToUTC=0, unit=MICROS) | | col\_timestamp | INT64 | TIMESTAMP\_MILLIS | — | | col\_timestamp\_tz | BYTE\_ARRAY | UTF8 | StringType() | | tdintervalyear | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | tdintervalyeartomonth | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | tdintervalmonth | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | tdintervalday | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | tdintervaldaytohour | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | tdintervaldaytominute | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | tdintervaldaytosecond | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | tdintervalhour | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | tdintervalhourtominute | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | tdintervalhourtosecond | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | tdintervalminute | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | tdintervalminutetosecond | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | tdintervalsecond | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | col\_real | DOUBLE | — | — | | col\_double\_precision | DOUBLE | — | — | | col\_char | BYTE\_ARRAY | UTF8 | StringType() | | col\_varchar | BYTE\_ARRAY | UTF8 | StringType() | | col\_clob | BYTE\_ARRAY | UTF8 | StringType() | | col\_byte | BYTE\_ARRAY | — | — | | col\_varbyte | BYTE\_ARRAY | — | — | | col\_blob | BYTE\_ARRAY | — | — | | col\_period\_date | BYTE\_ARRAY | UTF8 | StringType() | | col\_period\_timestamp | BYTE\_ARRAY | UTF8 | StringType() | | col\_json | BYTE\_ARRAY | UTF8 | StringType() | | col\_xml | BYTE\_ARRAY | UTF8 | StringType() | | col\_st\_geometry | BYTE\_ARRAY | UTF8 | StringType() | --- # Advanced Parameters This section covers advanced configuration options for FastBCP. ## Run ID[​](#run-id "Direct link to Run ID") The Run ID parameter `--runid` is a unique identifier for the current export operation. It can be used for tracking, logging, and monitoring purposes. Information If not specified, FastBCP will generate a unique Run ID automatically. Tips If possible, inject the RunId provided by the caller (e.g., SSIS, Airflow, or any scheduler that supports a run identifier). This will greatly facilitate log correlation and troubleshooting. ``` ./FastBCP \ ... --runid "export-2024-01-09-001" \ ... ``` **Syntax:** * Long form only: `--runid ""` ## Log Level[​](#log-level "Direct link to Log Level") The Log Level parameter `--loglevel` controls the verbosity of logging output during export operations. **Available values:** * `Information` (default): Standard logging with key operation details * `Debug`: Verbose logging with detailed diagnostic information ``` ./FastBCP \ ... --loglevel "Debug" \ ... ``` **Syntax:** * Long form only: `--loglevel ""` note If a settings file is specified with `--settingsfile`, the log level defined in the settings file takes precedence unless overridden by the command-line parameter. Information See [Logging Overview](/1.5/documentation/logging/Overview.md) for detailed information about logging configuration and output. ## Settings File[​](#settings-file "Direct link to Settings File") The Settings File parameter `--settingsfile` allows you to store all FastBCP parameters in a configuration file, making it easier to manage complex exports and reuse configurations. ``` ./FastBCP \ ... --settingsfile "/path/to/config/export-config.json" \ ... ``` **Syntax:** * Long form only: `--settingsfile ""` Information See [Logging Overview](/1.5/documentation/logging/Overview.md) for examples of settings file configuration. ## Config File[​](#config-file "Direct link to Config File") The Config File parameter `--config` allows you to define all FastBCP parameters in a YAML configuration file. This provides a more structured and readable way to manage export configurations compared to JSON settings files. * Windows * Linux ``` .\FastBCP.exe --config samples\sample_mssql_to_csv.yaml ``` ``` ./FastBCP --config samples/sample_mssql_to_csv.yaml ``` **Syntax:** * Long form only: `--config ""` ### YAML Configuration Example[​](#yaml-configuration-example "Direct link to YAML Configuration Example") Here's a complete example of a YAML configuration file: ``` # FastBCP – MSSQL to CSV using RangeId parallel method # # Usage: # .\FastBCP.exe --config samples\sample_mssql_to_csv.yaml connection: type: mssql server: localhost database: tpch10_collation_bin2 trusted: true source: schema: dbo table: orders output: file: "mssql_orders_{startdate}.csv" directory: 'D:\temp\{database}\{schema}\{table}\full\' delimiter: "|" decimal_separator: "." date_format: "yyyy-MM-dd HH:mm:ss" encoding: UTF-8 performance: method: RangeId degree: -2 distribute_key_column: o_orderkey merge: false logging: run_id: mssql_to_csv_parallel-2_rangeid ``` Benefits of YAML Configuration * **Structured and readable**: YAML format is more human-friendly than JSON * **Comments support**: Add documentation directly in your configuration files * **Reusable configurations**: Version control your export settings * **Simplified command-line**: Reduce complex exports to a single `--config` parameter ## Traceparent[​](#traceparent "Direct link to Traceparent") The `--traceparent` parameter accepts a [W3C Trace Context](https://www.w3.org/TR/trace-context/) traceparent identifier from an external caller. This enables distributed trace correlation between FastBCP and upstream systems such as orchestrators, APIs, or CI/CD pipelines. Information See [OpenTelemetry](/1.5/documentation/logging/OpenTelemetry.md) for detailed information about configuring OpenTelemetry tracing and log export. ``` ./FastBCP \ ... --traceparent "00-abcdef1234567890abcdef1234567890-1234567890abcdef-01" \ ... ``` **Syntax:** * Long form only: `--traceparent ""` ## No Banner[​](#no-banner "Direct link to No Banner") Disable the FastBCP banner display in the command line output. This is useful for scripting or when you want cleaner output in automated processes. **Example:** ``` ./FastBCP \ ... --nobanner \ ... ``` **Syntax:** * Long form: `--nobanner` Clean Output Using `--nobanner` is recommended when running FastBCP 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 ``` .\FastBCP.exe ` --connectiontype "oraodp" ` --server "localhost:1521/OraService" ` --database "tpch" ` --user "FastUser" ` --password "FastPassword" ` --sourceschema "TPCH" ` --sourcetable "ORDERS" ` --directory "D:\temp" ` --fileoutput "orders.xlsx" ` --encoding "UTF-8" ` --parallelmethod "Physical" ` --paralleldegree 7 ` --merge false ` --loglevel "Debug" ` --runid "oracle_to_excel_parallel_physical" ` --settingsfile "C:\config\oracle-export.json" ` --nobanner ``` ``` ./FastBCP \ --connectiontype "oraodp" \ --server "localhost:1521/OraService" \ --database "tpch" \ --user "FastUser" \ --password "FastPassword" \ --sourceschema "TPCH" \ --sourcetable "ORDERS" \ --directory "/temp" \ --fileoutput "orders.xlsx" \ --encoding "UTF-8" \ --parallelmethod "Physical" \ --paralleldegree 7 \ --merge false \ --loglevel "Debug" \ --runid "oracle_to_excel_parallel_physical" \ --settingsfile "/config/oracle-export.json" \ --nobanner ``` This example: * Connects to an Oracle database using the Physical parallel method (resolved to Rowid on Oracle) * Exports ORDERS table to Excel format with UTF-8 encoding * Uses 7 parallel threads with separate files (merge=false) * Enables Debug logging for detailed diagnostics * Uses a custom Run ID for tracking * Loads additional configuration from a settings file * Disables the banner for cleaner output --- # Authentication FastBCP supports two types of authentication methods depending on your database platform. ## Authentication Methods[​](#authentication-methods "Direct link to Authentication Methods") ### 1. Trusted Connection[​](#1-trusted-connection "Direct link to 1. Trusted Connection") Uses the current Windows user's credentials or the operating system authentication if allowed by the RDBMS. ``` .\FastBCP.exe ` ... --trusted ` ... ``` **Syntax:** * Short form: `-A` * Long form: `--trusted` Warning This method is only available if your RDBMS supports trusted/integrated authentication (e.g., SQL Server with Windows Authentication). ### 2. SQL Login with Username and Password[​](#2-sql-login-with-username-and-password "Direct link to 2. SQL Login with Username and Password") Standard database authentication with explicit credentials. ``` ./FastBCP ` ... --user "myuser" ` --password "mypassword" ` ... ``` **Syntax:** * Username: `-U "username"` or `--user "username"` * Password: `-X "password"` or `--password "password"` ### Alternative: Connection String Parameter[​](#alternative-connection-string-parameter "Direct link to Alternative: Connection String Parameter") You can also use the `--sourceconnectstring` parameter where you pass the user and password directly in the connection string. This parameter will be covered in detail in the [Connection Parameters](/1.5/documentation/cli/connection_parameters.md#source-connection-string) section. Password Security in Logs All passwords passed either through the `--password` parameter or within the `--sourceconnectstring` parameter 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 FASTBCP\_USER and FASTBCP\_PASSWORD for exemple or store the password in an encrypted file. Up to you to decrypt the file and it’s content before using it in a shell variable that will be used with FastBCP. --- # Cloud Options FastBCP supports direct exports to cloud storage platforms: AWS S3, Azure Blob Storage, Azure Data Lake Gen2, and Google Cloud Storage. For detailed cloud authentication setup and configuration, see the [Cloud Connectivity](/1.5/documentation/cloud-connectivity/overview.md) documentation. note FastBCP will use multi-part uploads for all cloud provider Warning Since FastBCP 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**. ## Supported Cloud Platforms[​](#supported-cloud-platforms "Direct link to Supported Cloud Platforms") To export data to a cloud storage service, use the URI scheme specific to your target destination with the `--directory` value | Platform | URI Scheme | Example | | ------------------------ | ------------ | ----------------------------------------------------------- | | **AWS S3** | `s3://` | `s3://my-bucket/data/` | | **Azure Blob** | `abs://` | `abs://myaccount.blob.core.windows.net/mycontainer/mydir/` | | **Azure Data Lake Gen2** | `abfss://` | `abfss://myaccount.dfs.core.windows.net/mycontainer/mydir/` | | **Google Cloud Storage** | `gs://` | `gs://my-bucket/data/` | | **S3-Compatible** | `s3://` | `s3://mybucket/export/` (MinIO, OVH, etc.) | | **OneLake** | `onelake://` | `onelake://MyWorSpace/MyLakeHouse/MyDir/` | ## Cloud Profile[​](#cloud-profile "Direct link to Cloud Profile") You can use the `--cloudprofile` parameter to specify which cloud credentials profile to use. ``` ./FastBCP \ ... --directory "s3://my-bucket/exports" \ --fileoutput "orders.parquet" \ --cloudprofile "production" \ ... ``` **Syntax:** * Long form: `--cloudprofile ` --- # Connection Parameters FastBCP requires connection information to access your database. This page covers all connection-related parameters. ## Connection Type[​](#connection-type "Direct link to Connection Type") Specify the type of database connection driver to use. This parameter determines how FastBCP connects to your database. ``` ./FastBCP \ ... --connectiontype mssql \ ... ``` **Syntax:** * Short form: `-C "connection_type"` * Long form: `--connectiontype "connection_type"` **Available Connection Types:** | Connection Type | Description | | --------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `adbc_mssql` | Microsoft SQL Server via ADBC (Arpe.io ADBC FastDriver) - 2x faster for Parquet exports | | `adbc_pgsql` | PostgreSQL via ADBC (Arpe.io ADBC FastDriver) - ultra-fast Parquet exports | | `adbc_oracle` | Oracle via ADBC (Arpe.io ADBC FastDriver) - ultra-fast Parquet exports | | `adbc_netezza` | Netezza / IBM NPS via ADBC (embedded ArpeNetezza driver) - no NZdotNET needed, works with IBM Cloud NPS | | `adbc_teradata` | Teradata via ADBC (embedded ArpeTeradata driver) - TLS logon needs no Teradata client software | | `backup_mssql` | SQL Server full backup files (`.bak`) read directly, without restoring them (embedded ArpeMSBackup ADBC driver) - see [SQL Server backup files](#sql-server-backup-files-backup_mssql) | | `clickhouse` | ClickHouse database | | `hana` | SAP HANA database | | `mssql` | Microsoft SQL Server (default) | | `mysql` | MySQL/MariaDB database | | `nzsql` | IBM Netezza | | `odbc` | Generic ODBC connection | | `oledb` | Generic OLE DB connection | | `oraodp` | Oracle Data Provider | | `pgcopy` | PostgreSQL with COPY protocol | | `pgsql` | PostgreSQL standard connection | | `teradata` | Teradata database | Platform availability The ADBC FastDriver connectors (`adbc_mssql`, `adbc_pgsql`, `adbc_oracle`, `adbc_netezza`, `adbc_teradata`, `backup_mssql`) are available on **Windows x64** and **Linux x64** only. They are **not** supported on **Linux ARM64**. Parquet-only output ADBC connectors (`adbc_mssql`, `adbc_pgsql`, `adbc_oracle`, `adbc_netezza`, `adbc_teradata`, `backup_mssql`) only support exporting to **Parquet** format. No other output format is supported with these connection types. ADBC end to end Since FastBCP 1.3, the ADBC connectors run fully on their ADBC driver: the metadata and planning step (row counts, column types, `Ntile`, `Random`, `Timepartition`, `DBPartition`, …) uses the same driver and the same connection string as the data step. No SqlClient, Npgsql, ODP.NET or NZdotNET is involved. ## DSN (Data Source Name)[​](#dsn-data-source-name "Direct link to DSN (Data Source Name)") If you have chosen an ODBC connection type, you must define the DSN with the `-N` or `--dsn` parameter, or alternatively define a connection string using `-g` or `--sourceconnectstring`. ``` ./FastBCP \ ... --connectiontype odbc \ --dsn "MyODBCDataSource" \ ... ``` **Syntax:** * Short form: `-N "DSN_name"` * Long form: `--dsn "DSN_name"` ## Provider[​](#provider "Direct link to Provider") If you have chosen an OLEDB connection type, you must define the OLEDB provider with the `-P` or `--provider` parameter. ``` ./FastBCP \ ... --connectiontype oledb \ --provider MSOLEDBSQL \ ... ``` ``` ./FastBCP \ ... --connectiontype oledb \ --provider NZOLEDB \ ... ``` **Syntax:** * Short form: `-P "provider_name"` * Long form: `--provider "provider_name"` ## Server[​](#server "Direct link to Server") Except if you have defined a connection string (`-g` or `--sourceconnectstring`), you must define a server (or could also be a TNS entry for Oracle). **Syntax:** * Short form: `-S "server"` * Long form: `--server "server"` ### Server Format Examples[​](#server-format-examples "Direct link to Server Format Examples") The server parameter accepts different formats depending on your database: **IP address or DNS name:** ``` ./FastBCP \ ... --server "myserver.mydomain.com" \ ... ``` **IP address or DNS name with port number:** ``` ./FastBCP \ ... --server "myserver.mydomain.com:2433" \ ... ``` or ``` ./FastBCP \ ... --server "myserver.mydomain.com,2433" \ ... ``` **IP address or DNS name with named instance:** ``` ./FastBCP \ ... --server "myserver.mydomain.com\myinstance" \ ... ``` **For Oracle - Easy Connect string:** ``` ./FastBCP \ ... --server "myserver.mydomain.com:1521/myinstance" \ ... ``` **For SQL Server backup files (`backup_mssql`) - the directory holding the backups:** ``` ./FastBCP \ ... --server "D:\Backups\MSSQL" \ ... ``` ## Trusted or User & Password[​](#trusted-or-user--password "Direct link to Trusted or User & Password") ### Trusted[​](#trusted "Direct link to Trusted") You can used a trusted (Windows or Kerberos Authentication) using the `--trusted` switch parameter. ``` ./FastBCP \ ... --server "myserver.mydomain.com\myinstance \ --trusted \ --database MySourceDB" \ ... ``` ### User and Password[​](#user-and-password "Direct link to User and Password") You can also provide a user and password the `--user` and `--password` can be used like this ``` ./FastBCP \ ... --server "myserver.mydomain.com\myinstance \ --user "FastUser" \ --password "FastPassword" \ --database MySourceDB" \ ... ``` ## 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 database. This connection string will override any other connection parameters and can be used if the other authentication mode are not enougth for your case You can use the connection string for any connection type. The connection string must be enclosed in double quotes. **Example:** ``` ./FastBCP \ ... --sourceconnectstring "Server=myserver;Database=mydb;User ID=FastUser;Password=FastPassword;Encrypt=True;TrustServerCertificate=True" ... ``` **Syntax:** * Short form: `-g "connection_string"` * Long form: `--sourceconnectstring "connection_string"` Passwords in logs Passwords are masked in logs and telemetry, including quoted passwords containing `;` (e.g. `Password="p;w=1"`). ### Connection Strings with ADBC Connectors[​](#connection-strings-with-adbc-connectors "Direct link to Connection Strings with ADBC Connectors") With the ADBC connection types (`adbc_mssql`, `adbc_pgsql`, `adbc_oracle`, `adbc_netezza`, `adbc_teradata`), `--sourceconnectstring` accepts: * The **native syntax** of the database (ADO.NET-style `Key=Value;` pairs), translated to the driver keys * Explicit **`adbc.*` / `arpeio.*` keys**, which win over translated keys * A **whole-connection** `uri` / `adbc..connection_string` Native keys with no driver equivalent (e.g. `Pooling=false`) are dropped with a warning. With a whole-connection `uri` / `connection_string`, native keys are dropped with a warning: put them inside the URI / connection string instead. A `Driver=` path in `--sourceconnectstring` is used for both the metadata and the data step. #### adbc\_netezza[​](#adbc_netezza "Direct link to adbc_netezza") Keys do not need the `adbc.arpenz.` prefix. All of the following are accepted: | Kind | Keys | | ----------------------- | ----------------------------------------------------------------------------------------------------------- | | Friendly / ADO.NET keys | `Server`, `Host`, `host:port`, `Port`, `Database`, `User ID`, `Password`, `SSL Mode`, `Application Name`, … | | Plain driver keys | `sslmode`, `tls_min_version`, `char_encoding`, `login_timeout`, … | | Whole connection | `uri`, `connection_string` | Keys the driver does not support (e.g. `propagate`, `Pooling`) are ignored, with a single warning. `Application Name` defaults to `FastBCP`. ``` ./FastBCP \ --connectiontype adbc_netezza \ --sourceconnectstring "Server=nps-host;Port=5480;Database=SALES;User ID=admin;Password=FastPassword;SSL Mode=require" \ ... ``` NPS 7.x NPS 7.x servers only offer TLS 1.0/1.1. Add `tls_min_version=1.0` to the connection string to connect to them. #### adbc\_pgsql[​](#adbc_pgsql "Direct link to adbc_pgsql") Like `-C pgsql`, `-C adbc_pgsql` honours `PGUSER`, `PGPASSWORD`, `PGPASSFILE` / `~/.pgpass` and `PGSSLROOTCERT` when `-U` / `-X` / `-g` do not provide them. A `NaN` in a `NUMERIC` column fails the read. Add `adbc.arpepgsql.numeric_special=null` to `--sourceconnectstring` to read it as `NULL` instead. #### adbc\_oracle[​](#adbc_oracle "Direct link to adbc_oracle") Like `-C oraodp`, `-C adbc_oracle` resolves TNS aliases through `tnsnames.ora` (looked up in `TNS_ADMIN`, then `$ORACLE_HOME/network/admin`), so `--server` can be a TNS alias. Network encryption and data integrity are negotiated with `encryption=accepted` and `data_integrity=accepted`, so the server decides, as with `-C oraodp`. Use the `FASTBCP_ADBC_ENCRYPTION` / `FASTBCP_ADBC_DATA_INTEGRITY` environment variables or explicit keys to override this. #### adbc\_teradata[​](#adbc_teradata "Direct link to adbc_teradata") `-C adbc_teradata` reads Teradata through the embedded **ArpeTeradata** ADBC driver, for both the metadata step and the data step. It uses the Teradata SQL dialect, like `-C teradata`. **Connection:** * `--server host[:port]` (legacy port, default `1025`), `--user`, `--password` and an optional `--database`, or a `--sourceconnectstring` in the Teradata provider spelling. * Keys translated from `--sourceconnectstring`: `Host` / `Server` / `Data Source`, `Port` / `DBS Port` / `Port Number`, `Database` / `Initial Catalog`, `User Id` / `User Name` / `UID`, `Password` / `PWD`, `SSL Mode`, `HTTPS Port`, `SSL CA`, `SSL CA Path`, `TMODE`, `Login Timeout` / `Connect Timeout` / `Connection Timeout`, `Query Timeout`, `TTU Path`. Explicit `adbc.arpeteradata.*` keys are passed as is and win. * Trusted authentication (`--trusted` / `-A`) is **not supported**: FastBCP stops with `-C adbc_teradata does not support trusted (-A) authentication: give -U and -X`. **Logon and Teradata Tools and Utilities (TTU):** * The default logon (`sslmode=prefer`) uses TLS on the HTTPS port (443) and needs no Teradata client software. * When the server has no TLS, the driver falls back to the legacy port (1025). `sslmode=disable` in `--sourceconnectstring` always uses the legacy port. The legacy-port logon needs the customer's TTU (CLIv2). * **Linux:** FastBCP looks for TTU in the [`FASTBCP_TTU_PATH`](/1.5/documentation/environment-variables/fastbcp-ttu-path.md) environment variable, then in a `ttu` or `TeradataToolsAndUtilitiesBase` directory next to the FastBCP binary. The library directory found is passed to the driver (`adbc.arpeteradata.ttu_path`) and logged. When nothing is found, the driver searches itself (`ARPETERADATA_TTU_PATH`, `/opt/teradata/client`, the system library path). * **Windows:** FastBCP passes nothing; the driver finds `wincli32.dll` itself (`ARPETERADATA_TTU_PATH`, its own directory, the registered TTU installation). See [FASTBCP\_TTU\_PATH](/1.5/documentation/environment-variables/fastbcp-ttu-path.md) for the TTU folder layouts accepted on Linux and how to prepare Teradata's TTU download without installing it. ``` ./FastBCP \ --connectiontype adbc_teradata \ --server "td-host" \ --user "FastUser" \ --password "FastPassword" \ --database "TPCH" \ ... ``` ## SQL Server Backup Files (backup\_mssql)[​](#sql-server-backup-files-backup_mssql "Direct link to SQL Server Backup Files (backup_mssql)") `-C backup_mssql` reads SQL Server **full backups** (`.bak` files) directly, **without restoring them** and without any SQL Server instance, through the embedded **ArpeMSBackup** ADBC driver (metadata and data steps). The backup is read in place (random access by page): it is never loaded in memory, so backups much larger than the RAM are read with a bounded memory. **Connection:** * `--server` (`-S`) is the **directory** of the backups (`D:\Backups\MSSQL`, `/var/opt/mssql/backup`). * `--database` (`-I`) is the **backup file name** in that directory, or a pattern (`*`, `?`) matching one backup. * No credentials: `--user`, `--password`, `--trusted` and `--sourceconnectstring` are not used. The driver is licensed like the other Arpe.io ADBC FastDrivers. **Backups read:** * Full backups and copy-only full backups, uncompressed or compressed with **MS\_XPRESS** or **ZSTD**, any `BLOCKSIZE` / `MAXTRANSFERSIZE`. * **Striped backups** (`BACKUP DATABASE ... TO DISK = a, DISK = b, ...`): name all the stripes with a pattern (`-I "mydb_*.bak"`) or a list separated by `;` (`-I "mydb_1.bak;mydb_2.bak;mydb_3.bak"`), in any order. An incomplete set, stripes of different backups or a lone stripe are refused with a message naming the missing stripes. * **Several backups in one file** (`WITH NOINIT`): the **last full backup** of the file is read (a copy-only full backup counts). Differential and log backups are not applied; a file without a full backup is refused. * Databases over **several data files and filegroups**, from **SQL Server 2017, 2019, 2022 and 2025** (Windows or Linux). **Tables read:** rowstore tables (heaps, clustered indexes, partitions, ROW / PAGE compression, LOBs including `text` / `ntext` / `image` and `xml`, row-overflow, sparse columns, computed persisted columns) and **clustered columnstore** tables (including archive compression and the open delta store). **Refused with a clear message:** backups of **TDE** databases and **encrypted backups** (`WITH ENCRYPTION`), whose pages cannot be read without the server certificate. QAT\_DEFLATE backup compression is not supported. **Queries and parallelism:** * `--sourceschema` / `--sourcetable`, or `--query` limited to `SELECT * | col1, col2, … FROM [schema.]table`. * Parallel methods: `None`, or `Physical`, which resolves to the **Pages** method for this source: each thread reads a slice of the data pages (rowstore) or of the rowgroups (columnstore). See [Parallel parameters](/1.5/documentation/cli/parallel_parameters.md). * Parquet output only. Consistency A backup taken while the database is written to is read as its pages are: the transaction log contained in the backup is not replayed. ``` ./FastBCP \ --connectiontype backup_mssql \ --server "D:\Backups\MSSQL" \ --database "tpch_full.bak" \ --sourceschema "dbo" \ --sourcetable "orders" \ --directory "D:\export\orders" \ --fileoutput "orders.parquet" \ --parallelmethod "Physical" \ --paralleldegree 8 ``` A striped backup, on Linux: ``` ./FastBCP \ --connectiontype backup_mssql \ --server "/var/opt/mssql/backup" \ --database "tpch_*.bak" \ --sourceschema "dbo" \ --sourcetable "lineitem" \ --directory "/export/lineitem" \ --fileoutput "lineitem.parquet" \ --parallelmethod "Physical" \ --paralleldegree 8 ``` ## Database[​](#database "Direct link to Database") Optionally define a source database. With `backup_mssql`, `--database` is the backup file name (see [SQL Server backup files](#sql-server-backup-files-backup_mssql)). **Example:** ``` ./FastBCP \ ... --database "AdventureWorks" \ ... ``` **Syntax:** * Short form: `-I "database_name"` * Long form: `--database "database_name"` ## Application Intent[​](#application-intent "Direct link to Application Intent") Specifies the application workload type when connecting to SQL Server. This parameter is only applicable for SQL Server (`mssql`, `adbc_mssql`) and OLEDB (`oledb`) connection types. With `adbc_mssql`, an `ApplicationIntent` key in `--sourceconnectstring` is also passed to the driver. **Syntax:** * Long form: `--applicationintent "ReadOnly|ReadWrite"` **Values:** * `ReadOnly` (default) - Declares the read-only workload type when connecting to a read-only replica in an Always On availability group * `ReadWrite` - Declares a read-write workload type (standard connection) **Example (Read-Only):** ``` ./FastBCP \ --connectiontype mssql \ --server "myserver.mydomain.com" \ --applicationintent ReadOnly \ --database "AdventureWorks" \ ... ``` **Example (Read-Write):** ``` ./FastBCP \ --connectiontype mssql \ --server "myserver.mydomain.com" \ --applicationintent ReadWrite \ --database "AdventureWorks" \ ... ``` info When using `ReadOnly`, the connection will be routed to a read-only replica if available in an Always On availability group configuration. This is useful for offloading reporting and export workloads from the primary replica. --- # CSV Formatting When exporting to CSV format (`.csv` extension), FastBCP provides extensive formatting options. ## Delimiter[​](#delimiter "Direct link to Delimiter") Use the `-d` or `--delimiter` parameter to specify the character(s) used to separate fields. ``` ./FastBCP \ ... --fileoutput "data.csv" \ --delimiter "," \ ... ``` **Syntax:** * Short form: `-d "delimiter"` * Long form: `--delimiter "delimiter"` **Default:** `,` (comma) ### Common Delimiters[​](#common-delimiters "Direct link to Common Delimiters") * Comma (CSV) * Tab (TSV) * Pipe * Semicolon ``` --delimiter "," ``` ``` --delimiter "\t" ``` ``` --delimiter "|" ``` ``` --delimiter ";" ``` ## Use Quotes[​](#use-quotes "Direct link to Use Quotes") Use the `-t` or `--quotes` switch to enclose string fields in double quotes. ``` ./FastBCP \ ... --fileoutput "products.csv" \ --quotes \ ... ``` **Syntax:** * Short form: `-t` * Long form: `--quotes` **Default:** Without quotes * Without --quotes * With --quotes ``` ProductID,ProductName,Description,Price 1,Widget A,Small widget,19.99 2,Widget B,Large widget,29.99 ``` ``` "ProductID","ProductName","Description","Price" "1","Widget A","Small widget","19.99" "2","Widget B","Large widget","29.99" ``` Information When `--quotes`, any double quotes (`"`) in the data are escaped with backslash (`\"`). ## Date Format[​](#date-format "Direct link to Date Format") Use the `-f` or `--dateformat` parameter to specify how dates and timestamps are formatted. ``` ./FastBCP \ ... --fileoutput "orders.csv" --dateformat "yyyy-MM-dd HH:mm:ss" \ ... ``` **Syntax:** * Short form: `-f "format"` * Long form: `--dateformat "format"` **Default:** `yyyy-MM-dd HH:mm:sszzz` Auto-adaptive formatting The date format is auto-adaptive based on the column type: * **Date-only** columns will always output as `yyyy-MM-dd` regardless of the format string * **Timestamp/DateTime** columns will output as `yyyy-MM-dd HH:mm:ss` even if a timezone token (`zzz`) is present in the format string * **DateTimeOffset** columns will include the timezone offset as specified ### Format Codes[​](#format-codes "Direct link to Format Codes") | Code | Description | Example | | ------ | ---------------- | -------- | | `yyyy` | 4-digit year | `2026` | | `MM` | Month (01-12) | `01` | | `dd` | Day (01-31) | `07` | | `HH` | Hour 24h (00-23) | `14` | | `mm` | Minute (00-59) | `30` | | `ss` | Second (00-59) | `22` | | `zzz` | UTC offset | `+02:00` | ## Decimal Separator[​](#decimal-separator "Direct link to Decimal Separator") Use the `-n` or `--decimalseparator` parameter to specify the decimal separator for numeric values. ``` ./FastBCP \ ... --fileoutput "products.csv" --decimalseparator "," ... ``` **Syntax:** * Short form: `-n "separator"` * Long form: `--decimalseparator "separator"` **Default:** `.` (period/dot) ## No Header[​](#no-header "Direct link to No Header") Use the `-h` or `--noheader` parameter to exclude column headers from the output. ``` ./FastBCP \ ... --fileoutput "customers.csv" \ --noheader \ ... ``` **Syntax:** * Short form: `-h` * Long form: `--noheader` - Without --noheader (default) - With --noheader ``` CustomerID,CustomerName,Email 1,John Doe,john@example.com 2,Jane Smith,jane@example.com ``` ``` 1,John Doe,john@example.com 2,Jane Smith,jane@example.com ``` ## Boolean Format[​](#boolean-format "Direct link to Boolean Format") Use the `-b` or `--boolformat` parameter to specify how boolean values are represented. ``` ./FastBCP \ ... --fileoutput "products.csv" \ --boolformat "1/0" \ ... ``` **Syntax:** * Short form: `-b "format"` * Long form: `--boolformat "format"` **Default:** `True/False` **Options:** * `true/false` * `True/False` (default) * `t/f` * `1/0` * `yes/no` * `y/n` **With `--boolformat "true/false"` (default):** ``` ProductID,ProductName,InStock,Discontinued 1,Widget A,true,false 2,Widget B,false,true ``` **With `--boolformat "1/0"`:** ``` ProductID,ProductName,InStock,Discontinued 1,Widget A,1,0 2,Widget B,0,1 ``` **With `--boolformat "yes/no"`:** ``` ProductID,ProductName,InStock,Discontinued 1,Widget A,yes,no 2,Widget B,no,yes ``` ## Complete Example[​](#complete-example "Direct link to Complete Example") * Windows * Linux ``` .\FastBCP.exe ` --connectiontype mssql ` --server "localhost" ` --database "AdventureWorks" ` --trusted ` --query "SELECT OrderID, OrderDate, CustomerName, TotalAmount, IsShipped FROM Sales.Orders WHERE OrderDate >= '2024-01-01'" ` --directory "C:\exports\sales" ` --fileoutput "orders_{startdate}.csv" ` --delimiter "," ` --quotes ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --decimalseparator "." ` --boolformat "1/0" ` --encoding "UTF-8" ``` ``` ./FastBCP \ --connectiontype mssql \ --server "localhost" \ --database "AdventureWorks" \ --trusted \ --query "SELECT OrderID, OrderDate, CustomerName, TotalAmount, IsShipped FROM Sales.Orders WHERE OrderDate >= '2024-01-01'" \ --directory "/exports/sales" \ --fileoutput "orders_{startdate}.csv" \ --delimiter "," \ --quotes \ --dateformat "yyyy-MM-dd HH:mm:ss" \ --decimalseparator "." \ --boolformat "1/0" \ --encoding "UTF-8" ``` **Output (orders\_20260107.csv):** ``` "OrderID","OrderDate","CustomerName","TotalAmount","IsShipped" "1001","2026-01-05 10:30:00","John Doe","299.99","1" "1002","2026-01-05 11:15:00","Jane Smith","149.50","0" "1003","2026-01-06 09:20:00","Bob Johnson","599.00","1" ``` tip For Excel compatibility, use `.xlsx` format instead: `--fileoutput "data.xlsx"` --- # License Configure how FastBCP 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 FastBCP license. By default, FastBCP looks for a license file named `FastBCP.lic` in the **current directory**, then **next to the FastBCP executable**. You can specify a custom license file using the `--license` parameter. Since FastBCP 1.5 * A license is always required, including for the free 30-day trial: the trial is a license file requested at [arpe.io](https://www.arpe.io). There is no build-date trial any more. `--help` and `--version` work without a license. * A license file can hold several blocks, each followed by its own signature, in any order: the FASTBCP block, an `ARPE ADBC DRIVER LICENCE` block for the ADBC drivers, and other products' blocks. FastBCP checks the FASTBCP block against the signature that follows it, and forwards every ADBC block with its signature to the ADBC drivers, inline (`arpeio.adbc.license`, no temporary file); each driver uses the block meant for it. A driver license of your own (`arpeio.adbc.license` / `LicenseFile` in `--sourceconnectstring`, or `ARPEIO_ADBC_LICENCE` / `ARPEIO_ADBC_LICENCE_FILE`) wins: FastBCP then forwards nothing. * No license, an invalid signature, or an `adbc_*` / `backup_mssql` connection type with no ADBC driver block (and no `ARPEIO_ADBC_LICENCE` / `ARPEIO_ADBC_LICENCE_FILE`): FastBCP stops with exit code **99**. An expired license after its grace period: exit code **100**. ### License Sources[​](#license-sources "Direct link to License Sources") FastBCP 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 ``` .\FastBCP.exe ` ... --license "C:\licenses\FastBCP.lic" ` ... ``` ``` ./FastBCP \ ... --license "/path/to/licenses/FastBCP.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 ``` .\FastBCP.exe ` ... --license "https://licenseserve.yourdomain.lan/fastbcp.lic" ` ... ``` ``` ./FastBCP \ ... --license "https://licenseserve.yourdomain.lan/fastbcp.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:FASTBCP_LICENSE = "LICENSE_CONTENT_HERE" .\FastBCP.exe ` ... --license $env:FASTBCP_LICENSE ` ... # Using variable $license = Get-Content "C:\licenses\FastBCP.lic" -Raw .\FastBCP.exe ` ... --license $license ` ... ``` ``` # Using environment variable export FASTBCP_LICENSE="LICENSE_CONTENT_HERE" ./FastBCP \ ... --license "$FASTBCP_LICENSE" \ ... # Using variable license=$(cat /path/to/licenses/FastBCP.lic) ./FastBCP \ ... --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 parallel export: * Windows * Linux ``` .\FastBCP.exe ` --connectiontype pgsql ` --server "localhost:15432" ` --database "tpch10" ` --user "FastUser" ` --password "FastPassword" ` --query "SELECT * FROM dbo.orders" ` --directory "D:\temp" ` --fileoutput "pgsql_orders.parquet" ` --parallelmethod DataDriven ` --distributekeycolumn "YEAR(o_orderdate)" ` --paralleldegree 7 ` --merge false ` --runid "pgsql_to_parquet_parallel_datadriven" ` --license "//SharedUnc/licenses/fastbcp/fastbcp.lic" ``` ``` ./FastBCP \ --connectiontype pgsql \ --server "localhost:15432" \ --database "tpch10" \ --user "FastUser" \ --password "FastPassword" \ --query "SELECT * FROM dbo.orders" \ --directory "/temp" \ --fileoutput "pgsql_orders.parquet" \ --parallelmethod DataDriven \ --distributekeycolumn "YEAR(o_orderdate)" \ --paralleldegree 7 \ --merge false \ --runid "pgsql_to_parquet_parallel_datadriven" \ --license "//SharedUnc/licenses/fastbcp/fastbcp.lic" ``` This example: * Retrieves the license from a remote unc path * Connects to a PostgreSQL database * Exports orders data using DataDriven parallel method with 7 threads * Uses a YEAR expression on the distribute key column * Keeps distributed files separate (merge=false) ## License Agreement[​](#license-agreement "Direct link to License Agreement") FastBCP and the ARPE.IO drivers it ships with are licensed under the **ARPE.IO Software License Agreement**, delivered with the software (`LICENSE.txt`, next to the executable). No reverse engineering Reverse engineering, decompiling or disassembling the binaries of ARPE.IO tools and drivers, or otherwise attempting to derive their source code, internal structure, algorithms or data formats, is **prohibited**, whether it is done manually or with the help of automated tools or artificial intelligence, except to the extent that applicable law expressly permits it. Any breach terminates the license and may give rise to legal proceedings. --- # Output Info Configure where and how FastBCP saves exported data. ## Directory[​](#directory "Direct link to Directory") Use the `-D` or `--directory` parameter to specify where the output file(s) will be saved. ### Local Paths[​](#local-paths "Direct link to Local Paths") * Windows * Linux ``` .\FastBCP.exe \ ... --directory "C:\exports\sales\orders" \ ... ``` ``` ./FastBCP \ ... --directory "/exports/sales/orders" \ ... ``` ### UNC Paths[​](#unc-paths "Direct link to UNC Paths") For Windows network shares, you can use UNC paths: ``` .\FastBCP.exe \ ... --directory "\\server\share\exports\orders" \ ... ``` ### Cloud Paths[​](#cloud-paths "Direct link to Cloud Paths") FastBCP supports direct export to cloud storage: * AWS S3 * Azure Blob * Azure Data Lake Gen2 * Google Cloud Storage * S3-Compatible (MinIO, OVH) * OneLake ``` ./FastBCP \ ... --directory "s3://my-bucket/exports/orders" \ ... ``` ``` ./FastBCP \ ... --directory "abs://mystorageaccount.blob.core.windows.net/container/path" \ ... ``` ``` ./FastBCP \ ... --directory "abfss://mystorageaccount.dfs.core.windows.net/container/path/to/data" \ ... ``` ``` ./FastBCP \ ... --directory "gs://my-bucket/exports/orders" \ ... ``` ``` ./FastBCP \ ... --directory "s3://my-bucket/exports" \ ... ``` ``` ./FastBCP \ ... --directory "onelake://myworkspace.dfs.core.windows.net/lakehouse/path/to/data" \ ... ``` Information See [Cloud Options](/1.5/documentation/cli/cloud_options.md) for authentication and configuration details. **Syntax:** * Short form: `-D "path"` * Long form: `--directory "path"` ## Output File[​](#output-file "Direct link to Output File") Use the `-o` or `--fileoutput` parameter to specify the name of the output file. The file extension determines the output format. ``` ./FastBCP \ ... --fileoutput "orders.parquet" \ ... ``` **Syntax:** * Short form: `-o "filename"` * Long form: `--fileoutput "filename"` ### Supported Formats[​](#supported-formats "Direct link to Supported Formats") | Extension | Format | Description | | ---------- | ------------ | --------------------------------------------------- | | `.parquet` | Parquet | Columnar, compressed (recommended) | | `.csv` | CSV | Delimiter-separated values | | `.tsv` | TSV | Tab-separated values | | `.json` | JSON | JavaScript Object Notation | | `.bson` | BSON | Binary JSON | | `.xlsx` | Excel | Microsoft Excel format | | `.bin` | Binary | PostgreSQL COPY binary format | | `.csv.gz` | CSV Gzipped | Delimiter-separated values and compressed with Gzip | | `.tsv.gz` | TSV Gzipped | Tab delimited values and compressed with Gzip | | `.json.gz` | JSON Gzipped | JavaScript Object Notation with Gzip | ## Tokens[​](#tokens "Direct link to Tokens") Use tokens in `--directory` and `--fileoutput` parameters for dynamic paths and filenames. ``` ./FastBCP \ ... --directory "/exports/{sourcedatabase}/{sourceschema}" \ --fileoutput "{sourcetable}_{startdate}.parquet" \ ... ``` **Syntax:** Tokens are enclosed in curly braces `{token_name}` ### Available Tokens[​](#available-tokens "Direct link to Available Tokens") | Token | Description | Example Value | | ------------------------- | ---------------------------------- | ------------------------------------ | | `{sourcedatabase}` | Value from `--database` | `AdventureWorks` | | `{sourceschema}` | Value from `--sourceschema` | `Sales` | | `{sourcetable}` | Value from `--sourcetable` | `Orders` | | `{starttimestamp}` | Job start (yyyyMMddHHmmss) | `20260107143022` | | `{starttimestamp:FORMAT}` | Custom timestamp format | [See below](#timestamp-format-codes) | | `{startdate}` | Job start date (yyyyMMdd) | `20260107` | | `{starttime}` | Job start time (HHmmss) | `143022` | | `{starthour}` | Job start hour (HH) | `14` | | `{user}` | Username (from `--user` or system) | `dbuser` | | `{filetype}` | Output format extension | `parquet` | | `{datadrivencolumn}` | Data-driven split value | Varies | ### Timestamp Format Codes[​](#timestamp-format-codes "Direct link to Timestamp Format Codes") Use `{starttimestamp:FORMAT}` with custom format: | Format | Description | Example | | ------ | ---------------- | ------- | | `yyyy` | 4-digit year | `2026` | | `yy` | 2-digit year | `26` | | `MM` | Month (01-12) | `01` | | `dd` | Day (01-31) | `07` | | `HH` | Hour 24h (00-23) | `14` | | `mm` | Minute (00-59) | `30` | | `ss` | Second (00-59) | `22` | **Examples:** ``` # yyyyMMdd format ./FastBCP \ ... --fileoutput "orders_{starttimestamp:yyyyMMdd}.parquet" \ ... # yyyy-MM-dd format ./FastBCP \ ... --fileoutput "orders_{starttimestamp:yyyy-MM-dd}.parquet" \ ... # yyyyMMddHH format (hourly) ./FastBCP \ ... --fileoutput "logs_{starttimestamp:yyyyMMddHH}.parquet" \ ... ``` ## Timestamped Output[​](#timestamped-output "Direct link to Timestamped Output") Use the `-x` or `--timestamped` parameter to automatically add a timestamp to the filename. ``` ./FastBCP \ ... --fileoutput "orders.parquet" \ --timestamped \ ... ``` **Syntax:** * Short form: `-x` * Long form: `--timestamped` tip `--timestamped` automatically appends `_yyyyMMddHHmmss` to the filename. For more control over format and placement, use timestamp tokens instead. ## Encoding[​](#encoding "Direct link to Encoding") Use the `-e` or `--encoding` parameter to specify character encoding for text formats (CSV, JSON, TSV). ``` ./FastBCP \ ... --fileoutput "orders.csv" \ --encoding "UTF-8" \ ... ``` **Syntax:** * Short form: `-e "encoding"` * Long form: `--encoding "encoding"` **Default:** `UTF-8` note Encoding is not applicable to Parquet files (they use UTF-8 internally). --- # Parallel Parameters FastBCP 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 ``` .\FastBCP.exe ` ... --parallelmethod Ntile ` ... ``` ``` ./FastBCP \ ... --parallelmethod Ntile \ ... ``` **Syntax:** * Short form: `-m ` * Long form: `--parallelmethod ` ### Methods Comparison[​](#methods-comparison "Direct link to Methods Comparison") | Method | Parallel | Needs Distributed Column | Database Source Type | | ---------------------------- | -------- | ------------------------ | --------------------------------------------------------------------------------------------------- | | `None` | | | Any | | `Random` | | | Any | | `DataDriven` | | | Any | | `RangeId` | | | Any | | `Ntile` | | | Any | | `Physical` | | | PostgreSQL, Oracle, SQL Server, Netezza, SQL Server backup files (see [Physical](#physical-method)) | | `Ctid` *(deprecated)* | | | PostgreSQL (pgsql/pgcopy) | | `Physloc` *(deprecated)* | | | SQL Server (mssql) | | `Rowid` *(deprecated)* | | | Oracle (oraodp/adbc\_oracle) | | `NZDataSlice` *(deprecated)* | | | Netezza (nzsql/adbc\_netezza) | | `DBPartition` | | | SQL Server, PostgreSQL, Oracle, MySQL, Teradata (and their `adbc_*` counterparts) | | `Timepartition` | | | Any | ### Available Methods[​](#available-methods "Direct link to Available Methods") **None** - No parallel processing. Data is exported sequentially. **DataDriven** - Uses all values of a column (or a given list provided by `--datadrivenquery`) to split the export. If the number of values is greater than the degree of parallelism, throttling will be applied. tip You can use an expression in the distribute key column instead of a column name.
Example: `YEAR(o_orderdate)` **Ntile** - Uses the distributed column field and ntile values to retrieve evenly distributed chunks of data. Each parallel thread exports a portion based on a range built using the distributed column values. The uniqueness of the distributed column is not mandatory. **RangeId** - Uses the distributed column field and its min/max values to retrieve chunks of data. Each parallel thread exports a portion based on a range built using the distributed column values. **Random** - Requires a distribution column that must be an integer/bigint with many values (at least as many as the degree of parallelism). **Physical** *(recommended)* - Splits the data on the physical row location of the source engine. The strategy (Ctid, Rowid, Physloc, NZDataSlice, or Pages for SQL Server backup files) is picked from the connection type. See [Physical Method](#physical-method) below. SQL Server backup files With `backup_mssql`, only `None` and `Physical` are available: there is no SQL engine behind a backup file to compute ranges, partitions or random keys. Any other method stops with `ERROR in command line parameters : method is not available with connection type backup_mssql ==> use --parallelmethod None or Physical`. #### Deprecated engine-specific methods[​](#deprecated-engine-specific-methods "Direct link to Deprecated engine-specific methods") The four engine-specific values below are still accepted, but they are **deprecated** and will be removed in **FastBCP 2.0**. Use [`Physical`](#physical-method) instead: it picks the same strategy from the connection type. Their description is kept here for reference. **Ctid** *(deprecated)* - Uses an internal hidden field to retrieve chunks of data. Each parallel thread exports a portion based on the CTID range. Deprecated `Ctid` is deprecated and will be removed in 2.0. Use `--parallelmethod Physical`, which resolves to Ctid on PostgreSQL (`pgsql`, `pgcopy`, `adbc_pgsql`). note PostgreSQL databases only (and some compatible PostgreSQL databases). **Physloc** *(deprecated)* - Uses an internal hidden field (`%%physloc%%`) to retrieve chunks of data. Each parallel thread exports a portion based on the Physloc value. Deprecated `Physloc` is deprecated and will be removed in 2.0. Use `--parallelmethod Physical`, which resolves to Physloc on SQL Server (`mssql`, `msoledbsql`, `adbc_mssql`). note `Physloc` parallel method is for SQL Server databases only. Since FastBCP 1.4, it requires `--sourceschema` and `--sourcetable` (directly or through `Physical`). * On a rowstore table, the rows are distributed on the two low bytes of the page id, so runs of 256 pages go to each chunk. * On a **clustered columnstore** table, `%%physloc%%` is a row id, not a page address. FastBCP detects the clustered columnstore index and distributes the rows on the whole row id instead (logged as `Physloc : .
is a clustered columnstore, splitting on the columnstore row id`). If the check fails, FastBCP logs a warning and uses the rowstore key. **Rowid** *(deprecated)* - Uses an internal hidden field to retrieve chunks of data. Each parallel thread exports a portion based on the ROWID range. Deprecated `Rowid` is deprecated and will be removed in 2.0. Use `--parallelmethod Physical`, which resolves to Rowid on Oracle (`oraodp`, `adbc_oracle`). note `RowId` parallel method is for Oracle databases only (`oraodp` and `adbc_oracle` connection types). Since FastBCP 1.4, it requires `--sourceschema` and `--sourcetable` (directly or through `Physical`); it used to crash when they were missing. **NZDataSlice** *(deprecated)* - Uses the native Netezza data slices to retrieve chunks of data. Each parallel thread exports a portion based on the data slice distribution. Slices go through a shared work queue: an idle thread takes the next waiting slice, which keeps all threads busy when slices are uneven. After the first failure, no new slice is started. Deprecated `NZDataSlice` is deprecated and will be removed in 2.0. Use `--parallelmethod Physical`, which resolves to NZDataSlice on Netezza (`nzsql`, `nzcopy`, `nzoledb`, `adbc_netezza`). note `NZDataSlice` parallel method is for Netezza databases only (`nzsql` and `adbc_netezza` connection types). When a deprecated value is used, FastBCP runs the export as before and logs a warning: ``` Parallel method Ctid is deprecated and will be removed in 2.0 ==> use --parallelmethod Physical ``` **DBPartition** - Runs one extraction per native partition / subpartition of the source table. The largest partitions are scheduled first, based on the catalog row estimates. | Source | Partitioning used | | -------------------------------------------- | --------------------------------------------- | | SQL Server (`mssql`, `adbc_mssql`) | `$PARTITION` | | PostgreSQL (`pgsql`, `pgcopy`, `adbc_pgsql`) | Leaf tables | | Oracle (`oraodp`, `adbc_oracle`) | `PARTITION (...)` | | MySQL (`mysql`) | `PARTITION (...)` | | Teradata (`teradata`, `adbc_teradata`) | Row partitioning, single- and multi-level PPI | note `DBPartition` requires `--sourceschema` and `--sourcetable`; it does not need a distribute key column. It falls back to `None`, with a warning, when the table is not partitioned, has a single partition, or the source is not supported. tip The output file layout is controlled by the [`FASTBCP_DBPARTITION_TARGET_MODE`](/1.5/documentation/environment-variables/fastbcp-dbpartition-target-mode.md) environment variable: numbered chunks (`CHUNK`, default) or Hive-style directories named after each partition (`HIVE`). `--merge` works in both modes. **Timepartition** - Uses a date/datetime column to partition data into time-based chunks. Each parallel thread exports data for a specific time period (year, month, week, or day). The distributed key column must be specified in a special format: `(datecolumn, year, month)`, `(datecolumn, year, month, day)`, `(datecolumn, year)`, or `(datecolumn, year, week)`. tip This method is ideal for time-series data and allows efficient parallel export based on temporal ranges. ## Physical Method[​](#physical-method "Direct link to Physical Method") `--parallelmethod Physical` is the recommended way to split a table on its physical row location, without a distribute key column. FastBCP picks the physical-location strategy of the source engine from the connection type (`-C` / `--connectiontype`): | Source | Connection types | Resolved strategy | | ----------------------- | -------------------------------------------- | ----------------- | | PostgreSQL | `pgsql`, `pgcopy`, `adbc_pgsql` | `Ctid` | | Oracle | `oraodp`, `adbc_oracle` | `Rowid` | | SQL Server | `mssql`, `msoledbsql`, `adbc_mssql` | `Physloc` | | Netezza | `nzsql`, `nzcopy`, `nzoledb`, `adbc_netezza` | `NZDataSlice` | | SQL Server backup files | `backup_mssql` | `Pages` | The resolved strategy behaves exactly like the deprecated engine-specific method of the same name (see [Deprecated engine-specific methods](#deprecated-engine-specific-methods)). **Pages** (`backup_mssql` only, reached through `Physical`) splits the table read from the backup into as many slices as the degree of parallelism: contiguous ranges of data pages for a rowstore table, of rowgroups (and delta stores) for a clustered columnstore table. Each thread opens the shared, already indexed backup and reads its own slice, so the threads do not read the same pages twice. Each slice is logged as `Completed Pages Load sub-process : rows x columns in ms`. **Requirements:** * `--sourceschema` and `--sourcetable` are required. `--query` can be added to filter the table (simple query with a WHERE clause). FastBCP stops with an error when one of them is missing: ``` ERROR in command line parameters : With Physical (Ctid) Method you must define source schema (--sourceschema) and source table (--sourcetable) ==> With Physical (Ctid) Method --sourceschema and --sourcetable are both mandatory ``` * `--distributekeycolumn` is not used. **Unsupported sources:** any other connection type (`odbc`, `oledb`, `mysql`, `clickhouse`, `hana`, `teradata`, `adbc_teradata`) stops with an error: ``` ERROR in command line parameters : Physical method is not supported for connection type 'mysql' ==> supported sources are PostgreSQL, Oracle, SQL Server, SQL Server backups and Netezza ``` With `odbc` and `oledb`, FastBCP cannot know which engine is behind the driver, so the error asks for a native connection type: ``` ERROR in command line parameters : Physical method cannot identify the source engine behind connection type 'odbc' ==> use a native connection type (pgsql, pgcopy, oraodp, mssql, msoledbsql, nzsql, nzcopy, nzoledb or their adbc_* counterpart, backup_mssql) ``` **Logs:** the resolved strategy is written to the log as the distribute method: ``` Distribute Method : Physical (Ctid) ``` The OpenTelemetry spans carry the resolved method in `fastbcp.method`. When `Physical` was resolved, `fastbcp.method.requested` holds `Physical`. ### Physical Examples[​](#physical-examples "Direct link to Physical Examples") * Windows * Linux ``` # PostgreSQL: resolved to Ctid .\FastBCP.exe ` --connectiontype "pgsql" ` --server "localhost:5432" ` --database "tpch" ` --user "FastUser" ` --password "FastPassword" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --parallelmethod "Physical" ` --paralleldegree 8 ` --directory "D:\temp\orders" ` --fileoutput "orders.parquet" ` --merge "False" ``` ``` # SQL Server: resolved to Physloc .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "tpch" ` --trusted ` --sourceschema "dbo" ` --sourcetable "orders" ` --parallelmethod "Physical" ` --paralleldegree -2 ` --directory "D:\temp\orders" ` --fileoutput "orders.parquet" ` --merge "False" ``` ``` # SQL Server backup file: resolved to Pages .\FastBCP.exe ` --connectiontype "backup_mssql" ` --server "D:\Backups\MSSQL" ` --database "tpch_full.bak" ` --sourceschema "dbo" ` --sourcetable "orders" ` --parallelmethod "Physical" ` --paralleldegree 8 ` --directory "D:\temp\orders" ` --fileoutput "orders.parquet" ` --merge "False" ``` ``` # PostgreSQL: resolved to Ctid ./FastBCP \ --connectiontype "pgsql" \ --server "localhost:5432" \ --database "tpch" \ --user "FastUser" \ --password "FastPassword" \ --sourceschema "tpch_10" \ --sourcetable "orders" \ --parallelmethod "Physical" \ --paralleldegree 8 \ --directory "/data/export/orders" \ --fileoutput "orders.parquet" \ --merge "False" ``` ``` # Oracle: resolved to Rowid ./FastBCP \ --connectiontype "oraodp" \ --server "dbserver:1521/ORCLPDB" \ --user "FastUser" \ --password "FastPassword" \ --sourceschema "SALES" \ --sourcetable "ORDERS" \ --parallelmethod "Physical" \ --paralleldegree 8 \ --directory "/data/export/orders" \ --fileoutput "orders.parquet" \ --merge "False" ``` ``` # SQL Server backup files (striped over 3 files): resolved to Pages ./FastBCP \ --connectiontype "backup_mssql" \ --server "/var/opt/mssql/backup" \ --database "tpch_*.bak" \ --sourceschema "dbo" \ --sourcetable "lineitem" \ --parallelmethod "Physical" \ --paralleldegree 8 \ --directory "/data/export/lineitem" \ --fileoutput "lineitem.parquet" \ --merge "False" ``` ## Distribute Key Column[​](#distribute-key-column "Direct link to Distribute Key Column") Use the `-c` or `--distributekeycolumn` parameter to define the column (or computation) on the data source that will be used to split the data into several parts. FastBCP 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. It is not used by `Physical` (nor by the deprecated Ctid, Rowid, Physloc and NZDataSlice) or `DBPartition`. Timepartition Special Format When using the `Timepartition` method, the distribute key column must be specified in a special format: * `(datecolumn, year, month)` - Partition by year and month * `(datecolumn, year, month, day)` - Partition by year, month, and day * `(datecolumn, year)` - Partition by year only * `(datecolumn, year, week)` - Partition by year and week Example: `--distributekeycolumn "(o_orderdate, year, month)"` * Windows * Linux ``` # Using a column name .\FastBCP.exe ` ... --distributekeycolumn order_date ` ... # Using an expression .\FastBCP.exe ` ... --distributekeycolumn "YEAR(order_date)" ` ... ``` ``` # Using a column name ./FastBCP \ ... --distributekeycolumn order_date \ ... # Using an expression ./FastBCP \ ... --distributekeycolumn "YEAR(order_date)" \ ... ``` **Syntax:** * Short form: `-c ` * Long form: `--distributekeycolumn ` ## Degree of Parallelism[​](#degree-of-parallelism "Direct link to Degree of Parallelism") Use the `-p` or `--paralleldegree` 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 .\FastBCP.exe ` ... --paralleldegree 8 ` ... # Auto-detect based on CPU cores .\FastBCP.exe ` ... --paralleldegree 0 ` ... # Use half of available cores .\FastBCP.exe ` ... --paralleldegree -2 ` ... ``` ``` # Use 8 parallel threads ./FastBCP \ ... --paralleldegree 8 \ ... # Auto-detect based on CPU cores ./FastBCP \ ... --paralleldegree 0 \ ... # Use half of available cores ./FastBCP \ ... --paralleldegree -2 \ ... ``` **Syntax:** * Short form: `-p ` * Long form: `--paralleldegree ` **Default:** `-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. * Windows * Linux ``` .\FastBCP.exe ` ... --datadrivenquery "SELECT tagname FROM tags" ` ... ``` ``` ./FastBCP \ ... --datadrivenquery "SELECT tagname FROM tags" \ ... ``` * Windows * Linux ``` .\FastBCP.exe ` ... --datadrivenquery "SELECT o_orderdate FROM dim_date where ref_date > getdate() - 30" ` ... ``` ``` ./FastBCP \ ... --datadrivenquery "SELECT o_orderdate FROM dim_date where ref_date > getdate() - 30" \ ... ``` **Syntax:** * Long form only: `--datadrivenquery ""` ## Merge (boolean)[​](#merge-boolean "Direct link to Merge (boolean)") Use the `-M` or `--merge` true/false to specify if the files generated by the parallel export should be merged into a single output file (`true`) or kept as separate files (`false`). Default `false` warning Current version allows valid merge for CSV and Parquet formats only. warning Merge is not available for cloud destinations: `--merge true` is forced to `false` (with a warning in the log) when `--directory` is a cloud URI. warning Merge is not supported with gzip compressed output (`.csv.gz`, `.tsv.gz`, `.json.gz`): FastBCP stops with an error. * Windows * Linux ``` # Merge files after parallel export .\FastBCP.exe ` ... --merge true ` ... # Keep distributed files (default) .\FastBCP.exe ` ... --merge false ` ... ``` ``` # Merge files after parallel export ./FastBCP \ ... --merge true \ ... # Keep distributed files (default) ./FastBCP \ ... --merge false \ ... ``` **Syntax:** * Short form: `-M` * Long form: `--merge` **Default:** `false` ## Complete Example[​](#complete-example "Direct link to Complete Example") Here's a complete example using parallel parameters with the DataDriven method: * Windows * Linux ``` .\FastBCP.exe ` --connectiontype "pgcopy" ` --server "localhost:15432" ` --database "tpch" ` --user "FastUser" ` --password "FastPassword" ` --query "with T1 AS (select *, to_char(o_orderdate, 'YYYYMM') o_ordermonth from tpch_10.orders) SELECT * FROM T1" ` --directory "D:\temp\tpch\orders\" ` --fileoutput "pgcopy_orders.parquet" ` --method "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" ` --paralleldegree 10 ` --merge "False" ` --runid "pgcopy_to_parquet_parallel12_DataDriven" ``` ``` ./FastBCP \ --connectiontype "pgcopy" \ --server "localhost:15432" \ --database "tpch" \ --user "FastUser" \ --password "FastPassword" \ --query "with T1 AS (select *, to_char(o_orderdate, 'YYYYMM') o_ordermonth from tpch_10.orders) SELECT * FROM T1" \ --directory "/data/export/tpch/orders/" \ --fileoutput "pgcopy_orders.parquet" \ --method "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" \ --paralleldegree 10 \ --merge "False" \ --runid "pgcopy_to_parquet_parallel12_DataDriven" ``` This example: * Connects to a PostgreSQL database on localhost:15432 * Exports data from the dbo.orders table * Uses the DataDriven distribution method * Distributes work based on the month of the order date using an expression * Use a custom query to generate month values to extract from a light query (instead of a `SELECT DISTINCT o_ordermonth` from the source query) * Uses 10 parallel threads (even if there is 12 month to export) * Keeps distributed files without merging (--merge false) * Assigns a custom Run ID for tracking ## Timepartition Example[​](#timepartition-example "Direct link to Timepartition Example") Here's an example using the Timepartition method to partition data based on a date column: * Windows * Linux ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "tpch_copy" ` --user "FastUser" ` --password "FastPassword" ` --sourceschema "tpch_10" ` --sourcetable "orders_date_sorted" ` --directory "D:\temp\TestPartition" ` --fileoutput "orders.csv" ` --decimalseparator "," ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --method "Timepartition" ` --distributekeycolumn "(o_orderdate,year,month)" ` --paralleldegree 16 ` --merge "False" ` --runid "mssql_to_csv_parallel8_timepartition" ``` ``` ./FastBCP \ --connectiontype "mssql" \ --server "localhost" \ --database "tpch_copy" \ --user "FastUser" \ --password "FastPassword" \ --sourceschema "tpch_10" \ --sourcetable "orders_date_sorted" \ --directory "/data/export/TestPartition" \ --fileoutput "orders.csv" \ --decimalseparator "," \ --delimiter "|" \ --dateformat "yyyy-MM-dd HH:mm:ss" \ --encoding "UTF-8" \ --method "Timepartition" \ --distributekeycolumn "(o_orderdate,year,month)" \ --paralleldegree 16 \ --merge "False" \ --runid "mssql_to_csv_parallel8_timepartition" ``` This example: * Connects to a SQL Server database on localhost * Exports data from the tpch\_10.orders\_date\_sorted table * Uses the Timepartition distribution method * Partitions data by year and month based on the o\_orderdate column * Uses 16 parallel threads * Keeps distributed files without merging * Assigns a custom Run ID for tracking ## DBPartition Example[​](#dbpartition-example "Direct link to DBPartition Example") Here's an example using the DBPartition method to export each partition of a partitioned table into a Hive-style directory: * Windows * Linux ``` $env:FASTBCP_DBPARTITION_TARGET_MODE = "HIVE" .\FastBCP.exe ` --connectiontype "pgsql" ` --server "localhost:5432" ` --database "tpch" ` --user "FastUser" ` --password "FastPassword" ` --sourceschema "tpch_10" ` --sourcetable "orders_partitioned" ` --method "DBPartition" ` --paralleldegree 8 ` --directory "D:\temp\orders" ` --fileoutput "orders.parquet" ` --merge "False" ` --runid "pgsql_to_parquet_dbpartition" ``` ``` export FASTBCP_DBPARTITION_TARGET_MODE=HIVE ./FastBCP \ --connectiontype "pgsql" \ --server "localhost:5432" \ --database "tpch" \ --user "FastUser" \ --password "FastPassword" \ --sourceschema "tpch_10" \ --sourcetable "orders_partitioned" \ --method "DBPartition" \ --paralleldegree 8 \ --directory "/data/export/orders" \ --fileoutput "orders.parquet" \ --merge "False" \ --runid "pgsql_to_parquet_dbpartition" ``` This example: * Connects to a PostgreSQL database on localhost:5432 * Exports the partitioned table `tpch_10.orders_partitioned`, one extraction per leaf table * Starts with the largest partitions and runs up to 8 of them in parallel * Writes each partition to `partition=/orders.parquet` (`HIVE` mode) * Keeps distributed files without merging --- # Parquet Formatting [Apache Parquet](https://parquet.apache.org/) is a columnar storage format optimized for analytics. FastBCP automatically uses Parquet format when the output file has a `.parquet` extension. ## Parquet Compression[​](#parquet-compression "Direct link to Parquet Compression") Use the `--parquetcompression` parameter to specify the parquet compression codec. ``` ./FastBCP \ ... --fileoutput "orders.parquet" \ --parquetcompression Snappy \ ... ``` **Syntax:** * Long form: `--parquetcompression ` **Default:** `Zstd` (faster and better compression ratio than others) **Available Algorithms:** * `None` - No compression * `Snappy` - Fast, small compression, classic * `Gzip` - Smaller files, slower * `Lzo` - Slower, medium compression (rarely used) * `Lz4` - Slower, moderate compression * `Zstd` - Best compression and Fast (default) tip The **Zstd** (default) is best for most cases. It provides the best compression ratio with moderate speed, ideal for cloud storage to minimize storage costs and transfer time. * So no need to set this parameter to use Zstd. ## Row Group Size Configuration[​](#row-group-size-configuration "Direct link to Row Group Size Configuration") Available since version 0.30.1 This feature is available starting from FastBCP version 0.30.1. You can control the Parquet row group size using the `FASTBCP_RGSIZE` environment variable. Row groups are the unit of parallelization in Parquet files, and their size can impact query performance and memory usage. **Environment Variable:** `FASTBCP_RGSIZE` **Default Value:** `max(2^18/sqrt(degree),64000)` **Usage:** * Windows * Linux ``` # Set the row group size to 500,000 rows $env:FASTBCP_RGSIZE = "500000" # Run FastBCP .\FastBCP.exe --connectiontype mssql --server "localhost" ... ``` ``` # Set the row group size to 500,000 rows export FASTBCP_RGSIZE=500000 # Run FastBCP ./FastBCP --connectiontype mssql --server "localhost" ... ``` ## Complete Example[​](#complete-example "Direct link to Complete Example") * Windows * Linux ``` $env:FASTBCP_RGSIZE = "500000" .\FastBCP.exe ` --connectiontype mssql ` --server "localhost" ` --database "sales" ` --trusted ` --query "SELECT * FROM orders WHERE OrderDate >= '2024-01-01'" ` --directory "C:\exports" ` --fileoutput "orders.parquet" ` --parquetcompression Snappy ``` ``` export FASTBCP_RGSIZE=500000 ./FastBCP \ --connectiontype mssql \ --server "localhost" \ --database "sales" \ --trusted \ --query "SELECT * FROM orders WHERE OrderDate >= '2024-01-01'" \ --directory "/exports" \ --fileoutput "orders.parquet" \ --parquetcompression Snappy ``` --- # Source Info FastBCP offers multiple ways to define your data source for extraction. You can use a query, an input file, or specify schema and table names directly. ## Query[​](#query "Direct link to Query") Use the `-q` or `--query` parameter to specify your extraction as a SELECT statement. ``` ./FastBCP \ ... --query "SELECT * FROM Sales.Orders WHERE OrderDate >= '2024-01-01'" \ ... ``` **Syntax:** * Short form: `-q "SELECT_statement"` * Long form: `--query "SELECT_statement"` ## Input File[​](#input-file "Direct link to Input File") Use the `-F` or `--fileinput` parameter to specify an input file that contains only one query. ``` ./FastBCP \ ... --fileinput "/sources/sql/queries/my_extraction.sql" \ ... ``` **Syntax:** * Short form: `-F "file_path"` * Long form: `--fileinput "file_path"` Warning The query in the input file must not end with a semicolon (`;`). ## Source Schema[​](#source-schema "Direct link to Source Schema") If no query or input file is used, you can specify the source schema with the `-s` or `--sourceschema` parameter. Combined with the source table, this will extract data from `sourceschema.sourcetable`. ``` ./FastBCP \ ... --sourceschema "Sales" \ --sourcetable "Orders" \ ... ``` **Syntax:** * Short form: `-s "schema_name"` * Long form: `--sourceschema "schema_name"` Information This field is mandatory with the `Physical` (and the deprecated `Ctid`, `Rowid`, `Physloc`) and `DBPartition` parallel methods. See **[Parallel Parameters](/1.5/documentation/cli/parallel_parameters.md#physical-method)** for more details. ## Source Table[​](#source-table "Direct link to Source Table") If no query or input file is used, you can specify the source table with the `-T` or `--sourcetable` parameter. Combined with the source schema, this will extract data from `sourceschema.sourcetable`. ``` ./FastBCP \ ... --sourceschema "Sales" \ --sourcetable "Orders" \ ... ``` **Syntax:** * Short form: `-T "table_name"` * Long form: `--sourcetable "table_name"` Information This field is mandatory with the `Physical` (and the deprecated `Ctid`, `Rowid`, `Physloc`) and `DBPartition` parallel methods. See **[Parallel Parameters](/1.5/documentation/cli/parallel_parameters.md#physical-method)** for more details. Warning if you use the placeholder `{sourceschema}` and `{sourcetable}` in the `--directory` or `--fileoutput` (See **[Output Info](/1.5/documentation/cli/output_info.md)**) then you must set the `--sourceschema `and the `--sourcetable `even you use `--query `or `--inputfile` --- # AWS S3 Configuration Complete guide for configuring AWS S3 connectivity with FastBCP. ## Authentication Methods[​](#authentication-methods "Direct link to Authentication Methods") FastBCP 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 FastBCP:** ``` # Use default profile ./FastBCP \ ... --directory "s3://my-bucket/exports" \ --fileoutput "data.parquet" \ ... # Use production profile ./FastBCP \ ... --directory "s3://prod-bucket/exports" \ --cloudprofile "production" \ --fileoutput "data.parquet" \ ... # Use development profile ./FastBCP \ ... --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 FastBCP .\FastBCP.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 FastBCP ./FastBCP \ ... --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 FastBCP 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 FastBCP:** ``` { "Version": "2012-10-17", "Statement": [ { "Sid": "FastBCPRequired", "Comment": "REQUIRED - actual operations performed by FastBCP (multipart upload)", "Effect": "Allow", "Action": [ "s3:PutObject", "s3:AbortMultipartUpload" ], "Resource": "arn:aws:s3:::MY-BUCKET/exports/*" }, { "Sid": "FastBCPOptionalConvenience", "Comment": "OPTIONAL - operational convenience, not required by the code", "Effect": "Allow", "Action": [ "s3:GetObject", "s3:ListBucket" ], "Resource": [ "arn:aws:s3:::MY-BUCKET/exports/*", "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 ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "orders" ` --directory "s3://my-bucket/exports/{sourcetable}" ` --fileoutput "{sourcetable}.parquet" ``` ``` ./FastBCP \ --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 ``` .\FastBCP.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" ``` ``` ./FastBCP \ --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 ``` .\FastBCP.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 ``` ``` ./FastBCP \ --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") FastBCP 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/*" } } } ] } ``` ## Server-Side Encryption with AWS KMS (SSE-KMS)[​](#server-side-encryption-with-aws-kms-sse-kms "Direct link to Server-Side Encryption with AWS KMS (SSE-KMS)") FastBCP can write to buckets encrypted with SSE-KMS. Encryption is done by S3 on the server side, so FastBCP never calls AWS KMS directly: S3 calls KMS on behalf of the identity that uploads the files. Encryption can come from: * **Bucket default encryption:** the bucket is configured with SSE-KMS as its default encryption, and S3 encrypts every new object with the configured key. Nothing needs to be set on the FastBCP side. * **App-driven encryption:** the upload request itself asks for SSE-KMS (and optionally a specific KMS key). The required permissions are the same. ### KMS Permissions[​](#kms-permissions "Direct link to KMS Permissions") FastBCP uploads files with S3 multipart uploads. With SSE-KMS, a multipart upload needs both `kms:GenerateDataKey` and `kms:Decrypt` on the KMS key, in addition to the S3 permissions above. | Key type | What to configure | | ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | **AWS managed key** (`aws/s3`) | Nothing more: its key policy already lets any principal of the account use it through S3. It cannot be used across accounts. | | **Customer managed key** | Allow `kms:GenerateDataKey` and `kms:Decrypt` in the IAM policy of the identity running FastBCP **and** make sure the key policy allows that identity (or delegates to IAM policies). | **Example IAM policy for a customer managed key:** ``` { "Version": "2012-10-17", "Statement": [ { "Sid": "FastBCPS3Upload", "Effect": "Allow", "Action": [ "s3:PutObject", "s3:AbortMultipartUpload" ], "Resource": "arn:aws:s3:::MY-BUCKET/exports/*" }, { "Sid": "FastBCPKmsForSSE", "Effect": "Allow", "Action": [ "kms:GenerateDataKey", "kms:Decrypt" ], "Resource": "arn:aws:kms:eu-west-1:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab", "Condition": { "StringEquals": { "kms:ViaService": "s3.eu-west-1.amazonaws.com" } } } ] } ``` S3 Bucket Keys Enabling **S3 Bucket Keys** on the bucket reduces the number of calls from S3 to KMS, and therefore KMS costs and throttling, which matters for parallel exports that write many files. With Bucket Keys, the KMS encryption context is the bucket ARN instead of the object ARN: update any `kms:EncryptionContext` condition in your policies accordingly. ### Network / Egress[​](#network--egress "Direct link to Network / Egress") Since S3 calls KMS itself, FastBCP only needs network access to the S3 endpoint, not to the KMS endpoint. In a private VPC, an S3 gateway or interface endpoint is enough. --- # Azure Configuration Complete guide for configuring Azure Blob Storage and Azure Data Lake Gen2 connectivity with FastBCP. ## 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") FastBCP 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) 5. **SAS URL** (scoped, time-limited access) For direct commit to Azure Blob Storage, FastBCP uses `AZURE_STORAGE_CONNECTION_STRING` or `AZURE_STORAGE_SAS_URL` when one of them is set, and falls back to `DefaultAzureCredential` (Azure CLI, Managed Identity, environment credentials, …) otherwise. The selected authentication method is written to the log. ### 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 ``` FastBCP will automatically use the Azure CLI's authentication credentials. **Using with FastBCP:** ``` # No additional configuration needed - just run FastBCP ./FastBCP \ ... --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 FastBCP .\FastBCP.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 FastBCP ./FastBCP \ ... --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 FastBCP .\FastBCP.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 FastBCP ./FastBCP \ ... --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 FastBCP 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}" ``` ### 5. SAS URL[​](#5-sas-url "Direct link to 5. SAS URL") Since FastBCP 1.3, you can authenticate to Azure Blob Storage with a Shared Access Signature (SAS) URL, set in the `AZURE_STORAGE_SAS_URL` environment variable. A SAS grants scoped, time-limited access without sharing the account key. **Generate a container SAS URL:** * Azure Portal * Azure CLI 1. Navigate to your Storage Account → **Containers** → your container 2. Go to **Shared access tokens** 3. Select the **Create** and **Write** permissions and an expiry date 4. Click **Generate SAS token and URL** and copy the **Blob SAS URL** ``` az storage container generate-sas \ --account-name mystorageaccount \ --name mycontainer \ --permissions cw \ --expiry 2026-12-31T23:59Z \ --auth-mode key \ --output tsv # Then build the URL: https://mystorageaccount.blob.core.windows.net/mycontainer? ``` **Set the SAS URL:** * Windows (PowerShell) * Linux/macOS ``` $env:AZURE_STORAGE_SAS_URL="https://mystorageaccount.blob.core.windows.net/mycontainer?sv=...&sig=..." # Run FastBCP .\FastBCP.exe ` ... --directory "abs://mystorageaccount.blob.core.windows.net/mycontainer/exports" ` --fileoutput "data.parquet" ` ... ``` ``` export AZURE_STORAGE_SAS_URL="https://mystorageaccount.blob.core.windows.net/mycontainer?sv=...&sig=..." # Run FastBCP ./FastBCP \ ... --directory "abs://mystorageaccount.blob.core.windows.net/mycontainer/exports" \ --fileoutput "data.parquet" \ ... ``` tip Quote the SAS URL: it contains `&` characters that the shell would otherwise interpret. ## 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 ``` .\FastBCP.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" ``` ``` ./FastBCP \ --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 ``` .\FastBCP.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 ``` ``` ./FastBCP \ --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 ``` .\FastBCP.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" ``` ``` ./FastBCP \ --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 ``` .\FastBCP.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 ``` ``` ./FastBCP \ --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) ### Container Access[​](#container-access "Direct link to Container Access") FastBCP creates the target container if it does not exist. When the container already exists, a missing permission to create it (HTTP 403 or 409 on the create call) is tolerated, so an identity or SAS that can only write blobs into an existing container is enough. ### Troubleshooting 403 Errors[​](#troubleshooting-403-errors "Direct link to Troubleshooting 403 Errors") A `403 Forbidden` from Azure Storage usually comes from one of the following: * **Firewall:** the storage account's network rules do not allow the IP address or virtual network FastBCP runs from. * **RBAC:** the identity used by `DefaultAzureCredential` has no data-plane role (such as **Storage Blob Data Contributor**) on the account or container. Management roles such as *Owner* or *Contributor* are not enough. Role assignments can take a few minutes to apply. * **SAS permissions:** the SAS token is expired, is scoped to another container, or lacks the **Create** / **Write** permissions. FastBCP logs the authentication method it used, which helps tell these cases apart. ### 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 FastBCP. ## Authentication Methods[​](#authentication-methods "Direct link to Authentication Methods") FastBCP 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 ``` FastBCP will automatically use the gcloud CLI's authentication credentials. **Using with FastBCP:** ``` # No additional configuration needed - just run FastBCP ./FastBCP \ ... --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., "fastbcp-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 fastbcp-export \ --display-name="FastBCP Export Service Account" # Grant Storage Object Admin role gcloud projects add-iam-policy-binding my-project-id \ --member="serviceAccount:fastbcp-export@my-project-id.iam.gserviceaccount.com" \ --role="roles/storage.objectAdmin" # Create and download key file gcloud iam service-accounts keys create ~/fastbcp-key.json \ --iam-account=fastbcp-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\fastbcp-key.json" # Run FastBCP .\FastBCP.exe ` ... --directory "gs://my-bucket/exports" ` --fileoutput "data.parquet" ` ... ``` ``` # Set path to service account key file export GOOGLE_APPLICATION_CREDENTIALS="/path/to/fastbcp-key.json" # Run FastBCP ./FastBCP \ ... --directory "gs://my-bucket/exports" \ --fileoutput "data.parquet" \ ... ``` ### 3. Default Application Credentials[​](#3-default-application-credentials "Direct link to 3. Default Application Credentials") When FastBCP 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 ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Orders" ` --directory "gs://my-bucket/exports/orders" ` --fileoutput "orders.parquet" ``` ``` ./FastBCP \ --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 ``` .\FastBCP.exe ` --connectiontype "pgsql" ` --server "localhost" ` --port "5432" ` --database "analytics" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "events" ` --query "SELECT * FROM events WHERE event_date >= '2024-01-01'" ` --directory "gs://analytics-bucket/events/2024" ` --fileoutput "events.parquet" ` --parallelmethod "Physical" ` --paralleldegree 10 ``` ``` ./FastBCP \ --connectiontype "pgsql" \ --server "localhost" \ --port "5432" \ --database "analytics" \ --user "postgres" \ --password "postgres" \ --sourceschema "public" \ --sourcetable "events" \ --query "SELECT * FROM events WHERE event_date >= '2024-01-01'" \ --directory "gs://analytics-bucket/events/2024" \ --fileoutput "events.parquet" \ --parallelmethod "Physical" \ --paralleldegree 10 ``` ### Export with Date Partitioning[​](#export-with-date-partitioning "Direct link to Export with Date Partitioning") * Windows * Linux ``` .\FastBCP.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 ``` ``` ./FastBCP \ --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 the Physical parallel method[​](#export-from-oracle-to-gcs-using-the-physical-parallel-method "Direct link to Export from Oracle to GCS using the Physical parallel method") * Windows * Linux ``` .\FastBCP.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 "Physical" ` --paralleldegree 8 ``` ``` ./FastBCP \ --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 "Physical" \ --paralleldegree 8 \ --merge "False" ``` ## 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:fastbcp-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 FastBCP 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" .\FastBCP.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 "onelake://myworkspace/mylakehouse/{sourcedatabase}/{sourceschema}/{sourcetable}/year=2024/" ` --fileoutput "orders_2024.parquet" ` --parallelmethod "Physical" ` --paralleldegree 8 ``` ``` export AZURE_TENANT_ID="YOUR_TENANT_ID" export AZURE_CLIENT_ID="APPLICATION_ENTRA_ID" export AZURE_CLIENT_SECRET="Your_AZCLient_Secret" ./FastBCP ` --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 "onelake://myworkspace/mylakehouse/{sourcedatabase}/{sourceschema}/{sourcetable}/year=2024/" \ --fileoutput "orders_2024.parquet" \ --parallelmethod "Physical" \ --paralleldegree 8 ``` --- # Cloud Connectivity Overview FastBCP 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 FastBCP will use multi-part uploads for all cloud provider Warning Since FastBCP 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") FastBCP 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](/1.5/documentation/cloud-connectivity/aws-s3.md) * [Azure Setup](/1.5/documentation/cloud-connectivity/azure.md) * [Google Cloud Storage Setup](/1.5/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 ./FastBCP / ... --directory "s3://my-bucket/exports" / --fileoutput "data.parquet" / ... ``` ``` # Azure Blob ./FastBCP \ ... --directory "abs://account.blob.core.windows.net/container/exports/" \ --fileoutput "data.parquet" \ ... ``` ``` # Azure Datalake Gen 2 ./FastBCP \ ... --directory "abs://account.dfs.core.windows.net/container/exports/" \ --fileoutput "data.parquet" \ ... ``` ``` # Google Cloud Storage ./FastBCP \ ... --directory "gs://my-bucket/exports" \ --fileoutput "data.parquet" \ ... ``` ``` # OneLake ./FastBCP \ ... --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: ``` ./FastBCP \ ... --directory "s3://prod-bucket/exports" \ --cloudprofile "production" \ ... ./FastBCP \ ... --directory "s3://dev-bucket/exports" \ --cloudprofile "development" ... ``` --- # Operating Systems FastBCP supports Windows and Linux 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 | | ------------------------ | -------------------------- | ------------- | --------- | | Amazon Linux | 2023 (Kernel 6.1) | Arm64, x64 | | | 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 FastBCP supports a wide range of database systems across different platforms. ## Supported Databases & Platforms[​](#supported-databases--platforms "Direct link to Supported Databases & Platforms") | Database | Windows AMD64 | Linux AMD64 | Linux ARM64 | | ---------------------------------------- | ------------- | ----------- | ----------- | | **SQL Server** | | | | | **SQL Server (ADBC)** | | | | | **SQL Server backup files (.bak, ADBC)** | | | | | **PostgreSQL** | | | | | **PostgreSQL (ADBC)** | | | | | **MySQL** | | | | | **Oracle** | | | | | **Oracle (ADBC)** | | | | | **ClickHouse** | | | | | **DuckDB** | | | | | **Teradata** | | | | | **Teradata (ADBC)** | | | | | **Netezza** | | | | | **Netezza (ADBC)** | | | | | **SAP HANA** | | | | | **ODBC** | | | | | **OLEDB** | | | | The ADBC FastDriver connectors (**SQL Server (ADBC)**, **SQL Server backup files**, **PostgreSQL (ADBC)**, **Oracle (ADBC)**, **Netezza (ADBC)** and **Teradata (ADBC)**) are not supported on **Linux ARM64**. --- # FASTBCP\_ADBC\_BATCHCELLS ## Overview[​](#overview "Direct link to Overview") The `FASTBCP_ADBC_BATCHCELLS` environment variable controls the size of the Arrow record batches fetched by the ADBC connectors (`adbc_mssql`, `adbc_pgsql`), expressed in **cells** (rows × columns) rather than rows alone. Because a batch's memory footprint depends on both its row count and its column count, sizing by cell count keeps memory usage predictable across tables of very different widths: a narrow table fetches more rows per batch, a wide table fewer, for a comparable memory footprint. ## Syntax[​](#syntax "Direct link to Syntax") * Windows * Linux ``` $env:FASTBCP_ADBC_BATCHCELLS = 1000000 ``` ``` export FASTBCP_ADBC_BATCHCELLS=1000000 ``` ## Configuration[​](#configuration "Direct link to Configuration") | Property | Value | | -------------- | ------------------------------------------------------------------- | | **Type** | Integer (> 0) | | **Default** | `500000` (500,000 cells) | | **Applies to** | `adbc_mssql` and `adbc_pgsql` connections (Arpe.io ADBC FastDriver) | | **Since** | FastBCP 1.2 | ## How Batch Size Is Derived[​](#how-batch-size-is-derived "Direct link to How Batch Size Is Derived") For a given table, the effective number of rows per Arrow record batch is computed as: ``` rows per batch = FASTBCP_ADBC_BATCHCELLS / number of columns ``` For example, with the default `500000` cells: | Columns | Rows per batch | | ------- | -------------- | | 10 | 50,000 | | 50 | 10,000 | | 500 | 1,000 | ## When to Change It[​](#when-to-change-it "Direct link to When to Change It") * **Increase** the value to reduce the number of round trips for very wide or very narrow tables when more memory is available, which can improve throughput. * **Decrease** the value to lower peak memory usage in constrained environments (containers, small VMs) or when exporting extremely wide tables. ## Examples[​](#examples "Direct link to Examples") ### Increase batch size for higher throughput[​](#increase-batch-size-for-higher-throughput "Direct link to Increase batch size for higher throughput") * Windows * Linux ``` $env:FASTBCP_ADBC_BATCHCELLS = 2000000 fastbcp -S myserver.database.windows.net ` -d MyDatabase ` -T dbo.MyTable ` -C adbc_mssql ` --fileoutput "output.parquet" ``` ``` export FASTBCP_ADBC_BATCHCELLS=2000000 fastbcp -S myserver.database.windows.net \ -d MyDatabase \ -T dbo.MyTable \ -C adbc_mssql \ --fileoutput "output.parquet" ``` ### Reduce batch size to limit memory usage[​](#reduce-batch-size-to-limit-memory-usage "Direct link to Reduce batch size to limit memory usage") * Windows * Linux ``` $env:FASTBCP_ADBC_BATCHCELLS = 100000 fastbcp -S pg-server:5432 ` -d MyDatabase ` -Q "SELECT * FROM public.orders" ` -C adbc_pgsql ` --fileoutput "orders.parquet" ``` ``` export FASTBCP_ADBC_BATCHCELLS=100000 fastbcp -S pg-server:5432 \ -d MyDatabase \ -Q "SELECT * FROM public.orders" \ -C adbc_pgsql \ --fileoutput "orders.parquet" ``` Platform availability This variable only applies to the ADBC FastDriver connectors (`adbc_mssql`, `adbc_pgsql`), available on **Windows x64** and **Linux x64** only. See [Connection Parameters](/1.5/documentation/cli/connection_parameters.md#connection-type) for details. --- # FASTBCP\_CLOUD\_ISBUFFERED ## Overview[​](#overview "Direct link to Overview") The `FASTBCP_CLOUD_ISBUFFERED` environment variable controls whether FastBCP uses buffered uploads when writing to cloud storage. ## Syntax[​](#syntax "Direct link to Syntax") * Windows * Linux ``` $env:FASTBCP_CLOUD_ISBUFFERED = "True" # or "False" ``` ``` export FASTBCP_CLOUD_ISBUFFERED=True # or False ``` ## Configuration[​](#configuration "Direct link to Configuration") | Property | Value | | -------------- | --------------------------------------------------------------------- | | **Type** | Boolean (`True` / `False`) | | **Default** | `False` | | **Applies to** | Azure Data Lake Storage (ADLS), OneLake, AWS S3, Google Cloud Storage | | **Since** | FastBCP 1.0 | ## Behavior[​](#behavior "Direct link to Behavior") ### When `False` (Default)[​](#when-false-default "Direct link to when-false-default") FastBCP uses the cloud SDK's `OpenWriteAsync` streaming upload: * Data is written directly to the cloud storage in chunks * Each chunk blocks the writer until acknowledged * **Simpler** but can be **slower** for Azure storage ### When `True` (Recommended for Azure)[​](#when-true-recommended-for-azure "Direct link to when-true-recommended-for-azure") FastBCP uses buffered uploads: * Data is first written to a local temporary file (see [`FASTBCP_TMPPATH`](/1.5/documentation/environment-variables/fastbcp-tmppath.md)) * When the stream is closed, the file is uploaded in parallel blocks (azcopy-like pattern) * **Significantly faster** for Azure Data Lake Storage and OneLake * Requires temporary disk space --- # FASTBCP\_CLOUD\_MAXUPLOADTHREAD\_PER\_STREAM ## Overview[​](#overview "Direct link to Overview") The `FASTBCP_CLOUD_MAXUPLOADTHREAD_PER_STREAM` environment variable controls the maximum number of parallel threads used to upload each file to cloud storage during buffered uploads. ## Syntax[​](#syntax "Direct link to Syntax") * Windows * Linux ``` $env:FASTBCP_CLOUD_MAXUPLOADTHREAD_PER_STREAM = 16 ``` ``` export FASTBCP_CLOUD_MAXUPLOADTHREAD_PER_STREAM=16 ``` ## Configuration[​](#configuration "Direct link to Configuration") | Property | Value | | -------------- | -------------------------------------------------------------------------------------------------------------------------- | | **Type** | Integer (> 0) | | **Default** | `8` when `parallelmethod=None`, `2` otherwise | | **Applies to** | Cloud uploads when [`FASTBCP_CLOUD_ISBUFFERED=True`](/1.5/documentation/environment-variables/fastbcp-cloud-isbuffered.md) | | **Since** | FastBCP 1.0 | ## Behavior[​](#behavior "Direct link to Behavior") ### Default Values[​](#default-values "Direct link to Default Values") FastBCP automatically adjusts the default based on the parallel extraction method: | Parallel Method | Default Threads | Reason | | --------------------------- | --------------- | ---------------------------------------------------------------------------------------------- | | `None` (single stream) | `8` | FastBCP itself is not parallelized, so more bandwidth can be allocated to upload | | `Ntile`, `DataDriven`, etc. | `2` | FastBCP is already extracting in parallel, so limit upload threads to avoid saturating network | ### How It Works[​](#how-it-works "Direct link to How It Works") When [`FASTBCP_CLOUD_ISBUFFERED=True`](/1.5/documentation/environment-variables/fastbcp-cloud-isbuffered.md): 1. Data is written to a local temporary file 2. On stream close, the file is uploaded in parallel blocks 3. `FASTBCP_CLOUD_MAXUPLOADTHREAD_PER_STREAM` controls how many threads upload blocks concurrently 4. Maps to `StorageTransferOptions.MaximumConcurrency` in Azure SDK --- # FASTBCP\_DATEFORMAT ## Overview[​](#overview "Direct link to Overview") The `FASTBCP_DATEFORMAT` environment variable lets you specify a custom format string for converting date values to strings in the output. When not set, FastBCP uses the default `yyyy-MM-dd HH:mm:sszzz`. The format string follows [.NET standard and custom date/time format patterns](https://learn.microsoft.com/en-us/dotnet/standard/base-types/custom-date-and-time-format-strings). ## Syntax[​](#syntax "Direct link to Syntax") * Windows * Linux ``` $env:FASTBCP_DATEFORMAT = "yyyyMMdd" ``` ``` export FASTBCP_DATEFORMAT=yyyyMMdd ``` ## Configuration[​](#configuration "Direct link to Configuration") | Property | Value | | -------------- | --------------------------------------------------------------------------- | | **Type** | Format string | | **Default** | `yyyy-MM-dd HH:mm:sszzz` | | **Applies to** | All output formats that serialize date columns as strings (CSV, JSON, etc.) | | **Since** | FastBCP 1.0 | Auto-adaptive formatting The date format is auto-adaptive based on the column type: * **Date-only** columns will always output as `yyyy-MM-dd` regardless of the format string * **Timestamp/DateTime** columns will output as `yyyy-MM-dd HH:mm:ss` even if a timezone token (`zzz`) is present in the format string * **DateTimeOffset** columns will include the timezone offset as specified ## Format Examples[​](#format-examples "Direct link to Format Examples") | Format string | Example output | | ---------------------------------- | --------------------------- | | `yyyy-MM-dd HH:mm:sszzz` (default) | `2026-06-28 14:30:22+02:00` | | `yyyy-MM-dd` | `2026-06-28` | | `yyyyMMdd` | `20260628` | | `dd/MM/yyyy` | `28/06/2026` | | `MM-dd-yyyy` | `06-28-2026` | | `yyyy/MM/dd` | `2026/06/28` | | `yyyy-MM-dd HH:mm:ss` | `2026-06-28 14:30:22` | ## Examples[​](#examples "Direct link to Examples") ### Compact date format — no separators[​](#compact-date-format--no-separators "Direct link to Compact date format — no separators") * Windows * Linux ``` $env:FASTBCP_DATEFORMAT = "yyyyMMdd" fastbcp -S myserver.database.windows.net ` -d MyDatabase ` -T dbo.MyTable ` --fileoutput "output.csv" ``` ``` export FASTBCP_DATEFORMAT=yyyyMMdd fastbcp -S myserver.database.windows.net \ -d MyDatabase \ -T dbo.MyTable \ --fileoutput "output.csv" ``` Output column value: `20260628` ### Restore default ISO 8601 format[​](#restore-default-iso-8601-format "Direct link to Restore default ISO 8601 format") * Windows * Linux ``` Remove-Item Env:FASTBCP_DATEFORMAT ``` ``` unset FASTBCP_DATEFORMAT ``` --- # FASTBCP\_DBPARTITION\_TARGET\_MODE ## Overview[​](#overview "Direct link to Overview") The `FASTBCP_DBPARTITION_TARGET_MODE` environment variable controls how the files produced by the [`DBPartition`](/1.5/documentation/cli/parallel_parameters.md#available-methods) parallel method are named and laid out. `DBPartition` runs one extraction per native partition / subpartition of the source table. Each extraction writes its own file, either as a numbered chunk (`CHUNK`) or in a Hive-style directory named after the partition (`HIVE`). ## Syntax[​](#syntax "Direct link to Syntax") * Windows * Linux ``` $env:FASTBCP_DBPARTITION_TARGET_MODE = "HIVE" ``` ``` export FASTBCP_DBPARTITION_TARGET_MODE=HIVE ``` ## Configuration[​](#configuration "Direct link to Configuration") | Property | Value | | -------------- | ---------------- | | **Type** | `CHUNK` / `HIVE` | | **Default** | `CHUNK` | | **Applies to** | `-m DBPartition` | | **Since** | FastBCP 1.3 | ## Modes[​](#modes "Direct link to Modes") ### CHUNK (default)[​](#chunk-default "Direct link to CHUNK (default)") Each partition is written as a numbered chunk next to the target file: ``` _chunk_NNN. ``` For example, with `--fileoutput "orders.parquet"`: ``` orders_chunk_001.parquet orders_chunk_002.parquet orders_chunk_003.parquet ``` ### HIVE[​](#hive "Direct link to HIVE") Each partition is written into a Hive-style directory named after the partition, and the subpartition when there is one: ``` partition=

/[subpartition=/]. ``` Some sources use their own directory naming: | Source | Directory layout | | ------------------------- | ------------------------------------------------ | | SQL Server | `bounds=_/.` | | Teradata | `L1=/[L2=/].` | | PostgreSQL, Oracle, MySQL | `partition=

/[subpartition=/].` | For example, an Oracle table partitioned by month, with `--fileoutput "orders.parquet"`: ``` partition=ORDERS_2024_01/orders.parquet partition=ORDERS_2024_02/orders.parquet partition=ORDERS_2024_03/orders.parquet ``` tip The `HIVE` layout can be read directly as a partitioned dataset by engines such as Spark, DuckDB, Trino or Athena. `--merge` works in both modes. ## Example[​](#example "Direct link to Example") * Windows * Linux ``` $env:FASTBCP_DBPARTITION_TARGET_MODE = "HIVE" .\FastBCP.exe ` --connectiontype oraodp ` --server "dbserver:1521/ORCLPDB" ` --user "FastUser" ` --password "FastPassword" ` --sourceschema "SALES" ` --sourcetable "ORDERS" ` --directory "D:\export\orders" ` --fileoutput "orders.parquet" ` --parallelmethod DBPartition ` --paralleldegree 8 ` --merge false ``` ``` export FASTBCP_DBPARTITION_TARGET_MODE=HIVE ./FastBCP \ --connectiontype oraodp \ --server "dbserver:1521/ORCLPDB" \ --user "FastUser" \ --password "FastPassword" \ --sourceschema "SALES" \ --sourcetable "ORDERS" \ --directory "/data/export/orders" \ --fileoutput "orders.parquet" \ --parallelmethod DBPartition \ --paralleldegree 8 \ --merge false ``` --- # FASTBCP\_PERFORMANCE\_COLLECT ## Overview[​](#overview "Direct link to Overview") The `FASTBCP_PERFORMANCE_COLLECT` environment variable controls whether FastBCP collects performance information about the machine (CPU usage, memory usage, etc.) during the run. ## Syntax[​](#syntax "Direct link to Syntax") * Windows * Linux ``` $env:FASTBCP_PERFORMANCE_COLLECT = $True ``` ``` export FASTBCP_PERFORMANCE_COLLECT=True ``` ## Configuration[​](#configuration "Direct link to Configuration") | Property | Value | | ----------- | -------------------------- | | **Type** | Boolean (`True` / `False`) | | **Default** | `False` (disabled) | | **Since** | FastBCP 1.2 | ## Behavior[​](#behavior "Direct link to Behavior") ### When `False` (Default)[​](#when-false-default "Direct link to when-false-default") No performance information is collected during the run. ### When `True`[​](#when-true "Direct link to when-true") FastBCP collects performance information of the machine (CPU, memory usage, etc.) while the run is in progress. tip Use together with [`FASTBCP_SYSTEMINFO_COLLECT`](/1.5/documentation/environment-variables/fastbcp-systeminfo-collect.md) to also capture system information during the run. --- # FASTBCP\_RGSIZE ## Overview[​](#overview "Direct link to Overview") The `FASTBCP_RGSIZE` environment variable controls the row group size for Parquet file exports. Row groups are the primary unit for organizing data within a Parquet file and significantly impact query performance and compression efficiency. ## Syntax[​](#syntax "Direct link to Syntax") * Windows * Linux ``` $env:FASTBCP_RGSIZE = 500000 ``` ``` export FASTBCP_RGSIZE=500000 ``` ## Configuration[​](#configuration "Direct link to Configuration") | Property | Value | | -------------- | ------------------------------ | | **Type** | Integer (> 0) | | **Default** | `max(2^18/sqrt(degree),64000)` | | **Applies to** | Parquet file exports | | **Since** | FastBCP 0.30 | ## What is a Row Group?[​](#what-is-a-row-group "Direct link to What is a Row Group?") A **row group** is a horizontal partition of data in a Parquet file: * Parquet files are divided into one or more row groups * Each row group contains a subset of rows * Column data within a row group is compressed together * Query engines can skip entire row groups based on metadata ``` Parquet File Structure: ├── Row Group 1 (1M rows) │ ├── Column A (compressed) │ ├── Column B (compressed) │ └── Column C (compressed) ├── Row Group 2 (1M rows) │ ├── Column A (compressed) │ ├── Column B (compressed) │ └── Column C (compressed) └── Footer (metadata) ``` --- # FASTBCP\_SYSTEMINFO\_COLLECT ## Overview[​](#overview "Direct link to Overview") The `FASTBCP_SYSTEMINFO_COLLECT` environment variable controls whether FastBCP collects information about the machine it runs on (CPU, memory, OS, etc.) during the run. ## Syntax[​](#syntax "Direct link to Syntax") * Windows * Linux ``` $env:FASTBCP_SYSTEMINFO_COLLECT = $True ``` ``` export FASTBCP_SYSTEMINFO_COLLECT=True ``` ## Configuration[​](#configuration "Direct link to Configuration") | Property | Value | | ----------- | -------------------------- | | **Type** | Boolean (`True` / `False`) | | **Default** | `False` (disabled) | | **Since** | FastBCP 1.2 | ## Behavior[​](#behavior "Direct link to Behavior") ### When `False` (Default)[​](#when-false-default "Direct link to when-false-default") No system information is collected during the run. ### When `True`[​](#when-true "Direct link to when-true") FastBCP collects system information about the machine (CPU, memory, OS, etc.) while the run is in progress. tip Use together with [`FASTBCP_PERFORMANCE_COLLECT`](/1.5/documentation/environment-variables/fastbcp-performance-collect.md) to also capture performance metrics during the run. --- # FASTBCP\_TMPPATH ## Overview[​](#overview "Direct link to Overview") The `FASTBCP_TMPPATH` environment variable specifies the base directory where FastBCP creates temporary files during buffered cloud uploads. ## Syntax[​](#syntax "Direct link to Syntax") * Windows * Linux ``` $env:FASTBCP_TMPPATH = "D:\temp\fastbcp" ``` ``` export FASTBCP_TMPPATH=/tmp/fastbcp ``` ## Configuration[​](#configuration "Direct link to Configuration") | Property | Value | | -------------- | -------------------------------------------------------------------------------------------------------------------------- | | **Type** | Directory path (absolute or relative) | | **Default** | System temp directory (`%TEMP%` on Windows, `$TMPDIR` on Linux/macOS) | | **Applies to** | Cloud uploads when [`FASTBCP_CLOUD_ISBUFFERED=True`](/1.5/documentation/environment-variables/fastbcp-cloud-isbuffered.md) | | **Since** | FastBCP 1.0 | ## Behavior[​](#behavior "Direct link to Behavior") ### Default Behavior (Not Set)[​](#default-behavior-not-set "Direct link to Default Behavior (Not Set)") FastBCP uses the system's default temporary directory: * **Windows**: `%TEMP%` (typically `C:\Users\\AppData\Local\Temp`) * **Linux/macOS**: `$TMPDIR` (typically `/tmp`) ### Custom Path[​](#custom-path "Direct link to Custom Path") When set, FastBCP creates a unique subdirectory per process: ``` /fastbcp_/ ``` **Example:** ``` D:\temp\fastbcp\fastbcp_a1b2c3d4-e5f6-7890-abcd-ef1234567890\ ``` ### Automatic Cleanup[​](#automatic-cleanup "Direct link to Automatic Cleanup") * Subdirectories are created automatically * Temporary files are deleted after successful upload * In case of errors, files may remain and need manual cleanup --- # FASTBCP\_TTU\_PATH ## Overview[​](#overview "Direct link to Overview") The `FASTBCP_TTU_PATH` environment variable tells FastBCP where to find the customer's **Teradata Tools and Utilities (TTU)** for the [`adbc_teradata`](/1.5/documentation/cli/connection_parameters.md#adbc_teradata) connection type. The embedded ArpeTeradata driver needs TTU (CLIv2, `libcliv2.so`) only for the **legacy-port logon**: `sslmode=disable`, or the fallback of the default `sslmode=prefer` when the server has no TLS. The default TLS logon on the HTTPS port never uses TTU. Linux only The lookup only runs on Linux. On Windows, FastBCP passes nothing and the driver finds `wincli32.dll` itself (`ARPETERADATA_TTU_PATH`, its own directory, the registered TTU installation). ## Syntax[​](#syntax "Direct link to Syntax") ``` export FASTBCP_TTU_PATH=/opt/teradata/client/20.00 ``` ## Configuration[​](#configuration "Direct link to Configuration") | Property | Value | | -------------- | --------------------------- | | **Type** | Directory path | | **Default** | Not set | | **Applies to** | `-C adbc_teradata` on Linux | | **Since** | FastBCP 1.4 | ## Search Order[​](#search-order "Direct link to Search Order") FastBCP looks for TTU in this order and uses the first match: 1. The `FASTBCP_TTU_PATH` environment variable. If the directory does not exist or holds no `libcliv2.so`, FastBCP logs a warning and goes on. 2. A `ttu` directory next to the FastBCP binary. 3. A `TeradataToolsAndUtilitiesBase` directory next to the FastBCP binary (the folder of Teradata's Linux download). 4. Nothing found: no TTU path is passed, and the driver searches itself (`ARPETERADATA_TTU_PATH`, `/opt/teradata/client`, the system library path). The library directory found is passed to the driver as `adbc.arpeteradata.ttu_path` and logged: ``` TTU (adbc_teradata legacy-port logon): /opt/teradata/client/20.00/lib64 (from FASTBCP_TTU_PATH) ``` ## Accepted Layouts[​](#accepted-layouts "Direct link to Accepted Layouts") Give a **full TTU client directory**, not only `libcliv2.so`. Each location can hold: * the client directory itself, e.g. `/opt/teradata/client/20.00` (with its `lib64` directory); * the library directory itself, e.g. `/opt/teradata/client/20.00/lib64`; * a directory above the client directory laid out as `/`, `client//`, `teradata/client//` or `opt/teradata/client//` (the last one is what unpacking the TTU RPMs gives). When several versions are found, the newest wins. Keep the version folder name CLIv2 reaches its own files through `lib64/tdclientdir` (which holds `../..`) and appends its version, so the client directory must keep its version name (for example `20.00`). A copy of an installed TTU next to the binary must be `ttu/20.00`, not `ttu/` alone. ## Using Teradata's TTU Download Without Installing It[​](#using-teradatas-ttu-download-without-installing-it "Direct link to Using Teradata's TTU Download Without Installing It") Teradata's Linux download is a set of RPMs. To use it without installing it, run these commands next to the FastBCP binary. They unpack CLIv2 and its ICU libraries into `TeradataToolsAndUtilitiesBase/opt/teradata/client/20.00` and add the two things the TTU installer would add: `lib64/tdclientdir` and the ICU links. Adapt the file name to your TTU version. ``` tar xzf TeradataToolsAndUtilitiesBase__linux_x8664.20.00.39.00-1.tar.gz cd TeradataToolsAndUtilitiesBase for r in Linux/x8664/cliv2*.rpm Linux/x8664/tdicu*.rpm; do rpm2cpio "$r" | cpio -idm; done cd opt/teradata/client/20.00/lib64 printf '../..' > tdclientdir for f in libicu*td.so.*.*; do ln -sf "$f" "${f%.*}"; ln -sf "$f" "${f%.so.*}.so"; done ``` FastBCP finds this `TeradataToolsAndUtilitiesBase` folder by itself; `FASTBCP_TTU_PATH` is not needed. FastBCP warns at startup when the TTU folder it found lacks `tdclientdir` or the ICU links (`libicu*td.so.65` and `libicu*td.so`), or when the client directory is not named after its version. CLIv2 would otherwise fail at logon with `DBCHINI failed`. ## Example[​](#example "Direct link to Example") ``` export FASTBCP_TTU_PATH=/opt/teradata/client/20.00 ./FastBCP \ --connectiontype adbc_teradata \ --sourceconnectstring "Server=td-host;Port=1025;User Id=FastUser;Password=FastPassword;SSL Mode=disable" \ --sourceschema "TPCH" \ --sourcetable "ORDERS" \ --directory "/data/export/orders" \ --fileoutput "orders.parquet" \ --parallelmethod Ntile \ --distributekeycolumn "o_orderkey" \ --paralleldegree 8 ``` --- # FASTBCP\_UID\_STRING\_CASING ## Overview[​](#overview "Direct link to Overview") The `FASTBCP_UID_STRING_CASING` environment variable controls whether UID (UUID) values are converted to lowercase or uppercase strings in the output. The default is lowercase, which follows [RFC 4122](https://www.rfc-editor.org/rfc/rfc4122) standard formatting (e.g. `550e8400-e29b-41d4-a716-446655440000`). ## Syntax[​](#syntax "Direct link to Syntax") * Windows * Linux ``` $env:FASTBCP_UID_STRING_CASING = "upper" ``` ``` export FASTBCP_UID_STRING_CASING=upper ``` ## Configuration[​](#configuration "Direct link to Configuration") | Property | Value | | -------------- | -------------------------------------------------------- | | **Type** | `lower` / `upper` | | **Default** | `lower` | | **Applies to** | All output formats that serialize UID columns as strings | | **Since** | FastBCP 1.0 | ## Values[​](#values "Direct link to Values") | Value | Output example | | ----------------- | -------------------------------------- | | `lower` (default) | `550e8400-e29b-41d4-a716-446655440000` | | `upper` | `550E8400-E29B-41D4-A716-446655440000` | ## Examples[​](#examples "Direct link to Examples") ### Export with uppercase UIDs[​](#export-with-uppercase-uids "Direct link to Export with uppercase UIDs") * Windows * Linux ``` $env:FASTBCP_UID_STRING_CASING = "upper" fastbcp -S myserver.database.windows.net ` -d MyDatabase ` -T dbo.MyTable ` --fileoutput "output.csv" ``` ``` export FASTBCP_UID_STRING_CASING=upper fastbcp -S myserver.database.windows.net \ -d MyDatabase \ -T dbo.MyTable \ --fileoutput "output.csv" ``` ### Restore default lowercase (RFC 4122)[​](#restore-default-lowercase-rfc-4122 "Direct link to Restore default lowercase (RFC 4122)") * Windows * Linux ``` $env:FASTBCP_UID_STRING_CASING = "lower" ``` ``` export FASTBCP_UID_STRING_CASING=lower ``` --- # Environment Variables Overview FastBCP supports several environment variables to customize its behavior. This page provides a comprehensive overview of all available environment variables. ## Quick Reference Table[​](#quick-reference-table "Direct link to Quick Reference Table") | Variable | Type | Default | Category | Description | | ---------------------------------------------------------------------------------------------------------------------------------- | ----------------- | ---------------------------- | ------------ | ------------------------------------------------------------------------------------------- | | [`FASTBCP_CLOUD_ISBUFFERED`](/1.5/documentation/environment-variables/fastbcp-cloud-isbuffered.md) | `True` / `False` | `False` | Cloud Upload | Enables buffered cloud uploads for better performance | | [`FASTBCP_TMPPATH`](/1.5/documentation/environment-variables/fastbcp-tmppath.md) | Directory path | System temp | Cloud Upload | Base directory for temporary files during buffered uploads | | [`FASTBCP_CLOUD_MAXUPLOADTHREAD_PER_STREAM`](/1.5/documentation/environment-variables/fastbcp-cloud-maxuploadthread-per-stream.md) | Integer (> 0) | `8` or `2` | Cloud Upload | Maximum parallel upload threads per cloud stream | | [`FASTBCP_RGSIZE`](/1.5/documentation/environment-variables/fastbcp-rgsize.md) | Integer (> 0) | max(2^18/sqrt(degree),64000) | Parquet | Row group size for Parquet files | | [`FASTBCP_UID_STRING_CASING`](/1.5/documentation/environment-variables/fastbcp-uid-string-casing.md) | `lower` / `upper` | `lower` | Output | Casing for UID-to-string conversion (RFC 4122) | | [`FASTBCP_DATEFORMAT`](/1.5/documentation/environment-variables/fastbcp-dateformat.md) | Format string | `yyyy-MM-dd HH:mm:sszzz` | Output | Custom date format string for date-to-string conversion | | [`FASTBCP_ADBC_BATCHCELLS`](/1.5/documentation/environment-variables/fastbcp-adbc-batchcells.md) | Integer (> 0) | `500000` | ADBC | Arrow record batch size (in cells) for ADBC connectors | | [`FASTBCP_SYSTEMINFO_COLLECT`](/1.5/documentation/environment-variables/fastbcp-systeminfo-collect.md) | `True` / `False` | `False` | Diagnostics | Collects system information about the machine during the run | | [`FASTBCP_PERFORMANCE_COLLECT`](/1.5/documentation/environment-variables/fastbcp-performance-collect.md) | `True` / `False` | `False` | Diagnostics | Collects performance information about the machine during the run | | [`FASTBCP_DBPARTITION_TARGET_MODE`](/1.5/documentation/environment-variables/fastbcp-dbpartition-target-mode.md) | `CHUNK` / `HIVE` | `CHUNK` | Parallel | Output file layout of the `DBPartition` parallel method | | [`FASTBCP_TTU_PATH`](/1.5/documentation/environment-variables/fastbcp-ttu-path.md) | Directory path | Not set | ADBC | Teradata Tools and Utilities (TTU) folder for the `adbc_teradata` legacy-port logon (Linux) | --- # Advanced Scenarios Advanced use cases, partition functions, and troubleshooting examples. ## SQL Server Partition Functions[​](#sql-server-partition-functions "Direct link to SQL Server Partition Functions") Use SQL Server partition functions for efficient parallel exports. ### Using Partition Function with DataDriven[​](#using-partition-function-with-datadriven "Direct link to Using Partition Function with DataDriven") Leverage existing partition functions to distribute work: ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "tpch10_collation_bin2" ` --trusted ` --sourceschema "dbo" ` --sourcetable "orders_part" ` --directory "D:\temp" ` --fileoutput "orders_partitioned.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "DataDriven" ` --distributekeycolumn "`$partition.PF_DATE(o_orderdate)" ` --paralleldegree 10 ` --merge "False" ``` Partition Function Syntax Use `` `$partition.FunctionName(ColumnName) `` to reference a partition function. The backtick escapes the dollar sign in PowerShell. ### Date-based Partitioning[​](#date-based-partitioning "Direct link to Date-based Partitioning") #### Partition by date ranges for time-series data using database partitions:[​](#partition-by-date-ranges-for-time-series-data-using-database-partitions "Direct link to Partition by date ranges for time-series data using database partitions:") ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "TimeSeriesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "SensorReadings" ` --directory "C:\temp" ` --fileoutput "sensor_readings.parquet" ` --parallelmethod "DataDriven" ` --distributekeycolumn "`$partition.PF_Monthly(reading_date)" ` --paralleldegree 12 ` --merge "False" ``` #### Partition by date ranges for time-series data using Timepartition FastBCP parallelmethod :[​](#partition-by-date-ranges-for-time-series-data-using-timepartition-fastbcp-parallelmethod-- "Direct link to Partition by date ranges for time-series data using Timepartition FastBCP parallelmethod :") ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "TimeSeriesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "SensorReadings" ` --directory "s3://mycorpexportbucket/raw/TimeSeriesDB/SensorReadings/" ` --fileoutput "sensor_readings.parquet" ` --cloudprofile "mycorps3profile" ` --parallelmethod "Timepartition" ` --distributekeycolumn "(reading_date,year,month,day)" ` --paralleldegree 12 ` --merge "False" ``` This technic will produce one file per day inside a directory structure (local or cloud) as a Hive partitionning directory : /year=2026/month=11/day=11/sensor\_readings.parquet You can after a full export use a query to filter your data and overwrite files that was already generated on the overlaping period. ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "TimeSeriesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "SensorReadings_Part" ` --query "SELECT * FROM dbo.SensorReadings_Part WHERE reading_date >= CAST(GETDATE() - 10 AS DATE)" ` --directory "s3://mycorpexportbucket/raw/TimeSeriesDB/SensorReadings/" ` --fileoutput "sensor_readings.parquet" ` --cloudprofile "mycorps3profile" ` --parallelmethod "Timepartition" ` --distributekeycolumn "(reading_date,year,month,day)" ` --paralleldegree 10 ` --merge "False" ``` ## Complex Queries[​](#complex-queries "Direct link to Complex Queries") ### Multi-table Joins[​](#multi-table-joins "Direct link to Multi-table Joins") Export data with a query with joins: ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --query "SELECT o.order_id, o.order_date, c.customer_name, od.product_id, od.quantity, od.unit_price FROM orders o INNER JOIN customers c ON o.customer_id = c.customer_id INNER JOIN order_details od ON o.order_id = od.order_id WHERE o.order_date >= '2024-01-01'" ` --directory "C:\temp" ` --fileoutput "sales_detail.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Ntile" ` --distributekeycolumn "o.order_id" ` --paralleldegree 8 ` --merge "False" ``` ### Aggregated Data[​](#aggregated-data "Direct link to Aggregated Data") Export pre-aggregated data: ``` .\FastBCP.exe ` --connectiontype "pgsql" ` --server "localhost" ` --port "5432" ` --database "analytics" ` --user "postgres" ` --password "postgres" ` --query "SELECT date_trunc('day', order_date) as order_day, customer_region, COUNT(*) as order_count, SUM(total_amount) as total_sales FROM orders GROUP BY date_trunc('day', order_date), customer_region" ` --directory "C:\temp" ` --fileoutput "daily_sales_by_region.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd" ` --encoding "UTF-8" ` --parallelmethod "None" ``` ## Performance Tuning[​](#performance-tuning "Direct link to Performance Tuning") ### Optimal Parallel Degree[​](#optimal-parallel-degree "Direct link to Optimal Parallel Degree") * Auto-detect * Manual Use negative values to auto-calculate based on CPU cores: ``` # Use all cores minus 2 .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "LargeDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "BigTable" ` --directory "C:\temp" ` --fileoutput "bigtable.parquet" ` --parallelmethod "RangeId" ` --distributekeycolumn "id" ` --paralleldegree -2 ` --merge "False" ``` Specify exact thread count: ``` # Use exactly 16 threads .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "LargeDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "BigTable" ` --directory "C:\temp" ` --fileoutput "bigtable.parquet" ` --parallelmethod "RangeId" ` --distributekeycolumn "id" ` --paralleldegree 16 ` --merge "False" ``` ### Parquet RowGroup Size[​](#parquet-rowgroup-size "Direct link to Parquet RowGroup Size") To reduce memory pressure and, in many cases, improve export performance, you can configure the Parquet row group size by setting the `FASTBCP_RGSIZE` environment variable. A smaller `FASTBCP_RGSIZE` value reduces memory usage during export. However, this comes with a trade-off: smaller row groups may reduce Parquet compression efficiency and can sometimes increase the final file size. Recommended values range from `1000` to `1_000_000`. In practice, values between 32,000 and 64,000 often provide a good balance between memory usage, performance, and compression efficiency. * Windows * Linux ``` $Env:FASTBCP_RGSIZE=32000 .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "LargeDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "BigTable" ` --directory "C:\temp" ` --fileoutput "bigtable.parquet" ` --parallelmethod "RangeId" ` --distributekeycolumn "id" ` --paralleldegree -2 ` --merge "False" ``` Specify exact thread count: ``` export FASTBCP_RGSIZE=32000 .\FastBCP / --connectiontype "mssql" / --server "mssqlhost.domain.lan,1433" / --database "LargeDB" / --user "FastUSer" / --password "FastPassword" / --sourceschema "dbo" / --sourcetable "BigTable" / --directory "/data/export/bigtable/" / --fileoutput "bigtable.parquet" / --parallelmethod "RangeId" / --distributekeycolumn "id" / --paralleldegree 16 / --merge "False" ``` ### Merge vs No-Merge[​](#merge-vs-no-merge "Direct link to Merge vs No-Merge") * With Merge * Without Merge Combine parallel outputs into single file: ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "DataDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Data" ` --directory "C:\temp" ` --fileoutput "data_merged.parquet" ` --parallelmethod "RangeId" ` --distributekeycolumn "id" ` --paralleldegree 8 ` --merge "True" ``` **Result**: Single file `data_merged.parquet`, slower and only OnPremise. Keep separate files for parallel processing: ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "DataDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Data" ` --directory "C:\temp" ` --fileoutput "data_part.parquet" ` --parallelmethod "RangeId" ` --distributekeycolumn "id" ` --paralleldegree 8 ` --merge "False" ``` **Result**: Multiple files `data_part_Chunk000.parquet`, `data_part_Chunk001.parquet`, etc. ### Enable Debug Logging[​](#enable-debug-logging "Direct link to Enable Debug Logging") Get detailed execution information: ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "TestDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "TestTable" ` --directory "C:\temp" ` --fileoutput "debug_export.csv" ` --parallelmethod "Random" ` --distributekeycolumn "id" ` --paralleldegree 4 ` --merge "False" ` --loglevel "Debug" ` --runid "debug_test_run" ``` Debug Mode Use `--loglevel "Debug"` to see detailed execution steps, connection strings (without passwords), and query generation details. tip Build your command with the [Wizard](/latest/wizard.md) --- # Cloud Storage Examples Examples for exporting data directly to cloud storage platforms. ## AWS S3[​](#aws-s3 "Direct link to AWS S3") Export data directly to Amazon S3 buckets using date-based placeholders. ### S3 with Date Placeholders[​](#s3-with-date-placeholders "Direct link to S3 with Date Placeholders") Automatically organize files by date using placeholder tokens: ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "DailySales" ` --directory "s3://my-bucket/data/sales/full/" ` --fileoutput "sales.parquet" ` --parallelmethod "RangeId" ` --distributekeycolumn "sale_id" ` --paralleldegree 8 ` --runid "sales_to_s3_daily" ``` ### S3 with Nested Structure[​](#s3-with-nested-structure "Direct link to S3 with Nested Structure") Create hierarchical folder structures: ``` .\FastBCP.exe ` --connectiontype "pgsql" ` --server "localhost" ` --port "5432" ` --database "ecommerce" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "orders" ` --directory "s3://analytics-bucket/exports/orders/" ` --fileoutput "orders.parquet" ` --parallelmethod "DataDriven" ` --distributekeycolumn "o_orderdate" ` --paralleldegree 10 ` --merge "False" ``` ### S3 with CSV Format[​](#s3-with-csv-format "Direct link to S3 with CSV Format") Export CSV files to S3 with manual date partitioning: ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "LogsDB" ` --trusted ` --query "SELECT * FROM ApplicationLogs WHERE log_date = '2024-05-01'" ` --directory "s3://logs-bucket/app-logs/appdate=2024-05-01/" ` --fileoutput "app_logs.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ``` ## Azure Blob Storage[​](#azure-blob-storage "Direct link to Azure Blob Storage") Export data to Azure Blob Storage containers. ### Azure with Date Partitioning[​](#azure-with-date-partitioning "Direct link to Azure with Date Partitioning") ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "AnalyticsDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Events" ` --directory "abs://mystorageaccount.blob.core.windows.net/datacontainer/events/full/" ` --fileoutput "events.parquet" ` --parallelmethod "Timepartition" ` --distributekeycolumn "event_timestamp(year,month)" ` --paralleldegree 10 ``` ### Azure Data Lake Gen2[​](#azure-data-lake-gen2 "Direct link to Azure Data Lake Gen2") Export to Azure Data Lake Storage Gen2: ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "AnalyticsDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Events" ` --directory "abfss://mystorageaccount.dfs.core.windows.net/datacontainer/events/full/" ` --fileoutput "events.parquet" ` --parallelmethod "Timepartition" ` --distributekeycolumn "event_timestamp(year,month)" ` --paralleldegree 10 ``` ## Hourly Exports[​](#hourly-exports "Direct link to Hourly Exports") Create exports with hourly granularity. ### Hourly Data Partition by Sensor with an incremental time range drived from outside[​](#hourly-data-partition-by-sensor-with-an-incremental-time-range-drived-from-outside "Direct link to Hourly Data Partition by Sensor with an incremental time range drived from outside") ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "StreamingDB" ` --trusted ` --query "SELECT * FROM SensorData WHERE reading_time >= '2024-02-03 14:00:00' and reading_time < '2024-02-03 15:00:00'" ` --directory "s3://iot-bucket/sensor-data/" ` --fileoutput "sensors_20240203140000_20240203150000.parquet" ` --parallelmethod "DataDriven" ` --distributekeycolumn "sensor_id" ` --datadrivenquery "SELECT sensor_id From SensorList" ` --paralleldegree 8 ` --runid "hourly_sensor_export_20240203140000_20240203150000" ``` ## Best for Cloud Exports[​](#best-for-cloud-exports "Direct link to Best for Cloud Exports") ### Performance Tips[​](#performance-tips "Direct link to Performance Tips") Parquet **Use Parquet for cloud storage**: Better compression and query performance, reduce network traffic Parallelism **Enable parallel execution when needed**: * if you need to split data on a business criteria * if you have a lots of data to extract Dynamic Parallel Degree Use negativ value for `--paralleldegree` to automatically set threads to (CPU cores / abs(degree)), leaving resources for other processes. eg `--paralleldegree -2` will use half of the core of the machine from where FastBCP is launched DataDriven Query \*\*Use `--datadrivenquery` to : * speedup the retrieval of the elements list to extract. * as a technic for incremental extraction by using a where in the `--datadrivenquery` instead of the main `--query` warning Keep the degree safe for your source, to avoid a total saturation. ### Example with All Best Practices[​](#example-with-all-best-practices "Direct link to Example with All Best Practices") ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "DataWarehouse" ` --trusted ` --sourceschema "dbo" ` --sourcetable "FactSales" ` --directory "s3://analytics-bucket/warehouse/sales/{sourcetable}" ` --fileoutput "FactSales.parquet" ` --parallelmethod "DataDriven" ` --datadrivenquery "SELECT ref_date from calendar where ref_date > cast(getdate()-30 as date)" ` --distributekeycolumn "sale_date" ` --paralleldegree -2 ` --runid "daily_sales_to_s3" ` --loglevel "Information" ``` tip Build your command with the [Wizard](/latest/wizard.md) --- # DB2 Examples Comprehensive examples for exporting data from IBM DB2 using the generic `odbc` connection type. DB2 ODBC Driver DB2 is not a native connection type, so FastBCP connects to it through ODBC. Install the IBM DB2 ODBC driver, then provide either a DSN (`--dsn`) or a full connection string (`--sourceconnectstring`) as shown below. ## Connection String[​](#connection-string "Direct link to Connection String") **Single-threaded export:** ``` .\FastBCP.exe ` --connectiontype "odbc" ` --sourceconnectstring "Driver={IBM DB2 ODBC DRIVER};Database=SAMPLE;Hostname=db2server.company.corp;Port=25010;Protocol=TCPIP;Uid=db2user;Pwd=password;CurrentSchema=DB2ADMIN" ` --query "SELECT * FROM DB2ADMIN.ORDERS" ` --directory "C:\temp" ` --fileoutput "db2_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` **Parallel export with Ntile method:** ``` .\FastBCP.exe ` --connectiontype "odbc" ` --sourceconnectstring "Driver={IBM DB2 ODBC DRIVER};Database=SAMPLE;Hostname=db2server.company.corp;Port=25010;Protocol=TCPIP;Uid=db2user;Pwd=password;CurrentSchema=DB2ADMIN" ` --query "SELECT * FROM DB2ADMIN.ORDERS" ` --directory "C:\temp" ` --fileoutput "db2_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Ntile" ` --distributekeycolumn "ORDER_ID" ` --paralleldegree -2 ` --merge "False" ``` **Parallel export with Random method:** ``` .\FastBCP.exe ` --connectiontype "odbc" ` --sourceconnectstring "Driver={IBM DB2 ODBC DRIVER};Database=SAMPLE;Hostname=db2server.company.corp;Port=25010;Protocol=TCPIP;Uid=db2user;Pwd=password;CurrentSchema=DB2ADMIN" ` --query "SELECT * FROM DB2ADMIN.ORDERS" ` --directory "C:\temp" ` --fileoutput "db2_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "ORDER_ID" ` --paralleldegree 8 ` --merge "False" ``` ## DSN Connection[​](#dsn-connection "Direct link to DSN Connection") If a DSN is already configured on the machine, you can use `--dsn` instead of `--sourceconnectstring`. ``` .\FastBCP.exe ` --connectiontype "odbc" ` --dsn "DB2_DSN" ` --query "SELECT * FROM DB2ADMIN.ORDERS" ` --directory "C:\temp" ` --fileoutput "db2_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` Quoting special identifiers If your DB2 schema or table name contains special characters (e.g. `HCR_BI."APER@XPSAHISTO"`), keep the double quotes around the identifier inside your `--query` value so DB2 treats it as a delimited identifier. tip Build your command with the [Wizard](/latest/wizard.md) --- # MySQL Examples Examples for exporting data from MySQL databases. ## Single-threaded Export[​](#single-threaded-export "Direct link to Single-threaded Export") Simple export without parallelization. ``` .\FastBCP.exe ` --connectiontype "mysql" ` --server "localhost" ` --port "3306" ` --database "test" ` --user "root" ` --password "password" ` --query "SELECT * FROM test_table LIMIT 1000" ` --directory "C:\temp" ` --fileoutput "mysql_test.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` ## Parallel Export - Random Method[​](#parallel-export---random-method "Direct link to Parallel Export - Random Method") Export using Random distribution. ``` .\FastBCP.exe ` --connectiontype "mysql" ` --server "localhost" ` --port "3306" ` --database "test" ` --user "root" ` --password "password" ` --sourceschema "test" ` --sourcetable "orders" ` --directory "C:\temp" ` --fileoutput "mysql_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "order_id" ` --paralleldegree 8 ` --merge "False" ` --runid "mysql_to_csv_parallel8_random" ``` ## Parallel Export - DataDriven Method[​](#parallel-export---datadriven-method "Direct link to Parallel Export - DataDriven Method") Export using DataDriven distribution based on distinct column values. ``` .\FastBCP.exe ` --connectiontype "mysql" ` --server "localhost" ` --port "3306" ` --database "test" ` --user "root" ` --password "password" ` --sourceschema "test" ` --sourcetable "orders" ` --directory "C:\temp" ` --fileoutput "mysql_orders_dd.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "DataDriven" ` --distributekeycolumn "status" ` --paralleldegree 10 ` --merge "False" ` --runid "mysql_to_csv_parallel10_datadriven" ``` ## Export to Parquet[​](#export-to-parquet "Direct link to Export to Parquet") Export MySQL data to Parquet format. ``` .\FastBCP.exe ` --connectiontype "mysql" ` --server "localhost" ` --port "3306" ` --database "test" ` --user "root" ` --password "password" ` --sourceschema "test" ` --sourcetable "orders" ` --directory "C:\temp" ` --fileoutput "mysql_orders.parquet" ` --parallelmethod "Random" ` --distributekeycolumn "order_id" ` --paralleldegree 6 ` --merge "False" ``` tip Build your command with the [Wizard](/latest/wizard.md) --- # Oracle Examples Comprehensive examples for exporting data from Oracle databases. ## Connection Types[​](#connection-types "Direct link to Connection Types") Oracle exports support multiple connection types: * **oraodp**: Native Oracle Data Provider (recommended) * **oledb**: Using Oracle OLEDB Provider (OraOLEDB) * **odbc**: Using ODBC DSN * **adbc\_oracle**: ADBC FastDriver — ultra-fast, Parquet-only export (see [ADBC Examples](#adbc-examples)) ADBC Support The `adbc_oracle` connection type uses the Arpe.io ADBC FastDriver for ultra-fast, Arrow-native Parquet exports, and also supports the `Physical` parallel method (resolved to Rowid). Output is Parquet-only — see the [ADBC Examples](#adbc-examples) section below. ## Single-threaded Export[​](#single-threaded-export "Direct link to Single-threaded Export") Simple export without parallelization. * Oracle Data Provider * OLEDB Provider ``` .\FastBCP.exe ` --connectiontype "oraodp" ` --server "localhost:1521/ORCLPDB1" ` --user "system" ` --password "password" ` --query "SELECT * FROM customers WHERE ROWNUM <= 1000" ` --directory "C:\temp" ` --fileoutput "oracle_customers.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` ``` .\FastBCP.exe ` --connectiontype "oledb" ` --provider "OraOLEDB.Oracle" ` --server "localhost:1521/ORCLPDB1" ` --user "system" ` --password "password" ` --query "SELECT * FROM customers WHERE ROWNUM <= 1000" ` --directory "C:\temp" ` --fileoutput "oracle_customers.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` ## Parallel Export - Physical Method[​](#parallel-export---physical-method "Direct link to Parallel Export - Physical Method") Parallel export using the physical row identifier (ROWID). Physical on Oracle With an Oracle connection type (`oraodp`, `adbc_oracle`), the `Physical` method resolves to the Oracle ROWID strategy (formerly `--parallelmethod Rowid`, now deprecated). It is very efficient for full table exports and does not require a distribute key column. `--sourceschema` and `--sourcetable` are required. **Full table export:** ``` .\FastBCP.exe ` --connectiontype "oraodp" ` --server "localhost:1521/ORCLPDB1" ` --user "system" ` --password "password" ` --sourceschema "SYSTEM" ` --sourcetable "ORDERS" ` --directory "C:\temp" ` --fileoutput "oracle_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Physical" ` --paralleldegree 8 ` --merge "False" ` --runid "oraodp_to_csv_parallel8_physical" ``` **With query filter:** ``` .\FastBCP.exe ` --connectiontype "oraodp" ` --server "localhost:1521/ORCLPDB1" ` --user "system" ` --password "password" ` --sourceschema "SYSTEM" ` --sourcetable "ORDERS" ` --query "SELECT * FROM SYSTEM.ORDERS WHERE order_date >= TO_DATE('2024-01-01', 'YYYY-MM-DD')" ` --directory "C:\temp" ` --fileoutput "oracle_orders_2024.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Physical" ` --paralleldegree 8 ` --merge "False" ` --runid "oraodp_to_csv_parallel8_physical_filtered" ``` ## Parallel Export - Random Method[​](#parallel-export---random-method "Direct link to Parallel Export - Random Method") Export using Random distribution with modulo operation. ``` .\FastBCP.exe ` --connectiontype "oraodp" ` --server "localhost:1521/ORCLPDB1" ` --user "system" ` --password "password" ` --sourceschema "SYSTEM" ` --sourcetable "ORDERS" ` --directory "C:\temp" ` --fileoutput "oracle_orders_random.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "order_id" ` --paralleldegree 8 ` --merge "False" ` --runid "oraodp_to_csv_parallel8_random" ``` ## Parallel Export - DataDriven Method[​](#parallel-export---datadriven-method "Direct link to Parallel Export - DataDriven Method") Export using DataDriven distribution based on distinct column values. ``` .\FastBCP.exe ` --connectiontype "oraodp" ` --server "localhost:1521/ORCLPDB1" ` --user "system" ` --password "password" ` --sourceschema "SYSTEM" ` --sourcetable "ORDERS" ` --directory "C:\temp" ` --fileoutput "oracle_orders_dd.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "DataDriven" ` --distributekeycolumn "order_status" ` --paralleldegree 10 ` --merge "False" ` --runid "oraodp_to_csv_parallel10_datadriven" ``` ## Export to Parquet[​](#export-to-parquet "Direct link to Export to Parquet") Export Oracle data to Parquet format. **Single-threaded:** ``` .\FastBCP.exe ` --connectiontype "oraodp" ` --server "localhost:1521/ORCLPDB1" ` --user "system" ` --password "password" ` --sourceschema "SYSTEM" ` --sourcetable "ORDERS" ` --directory "C:\temp" ` --fileoutput "oracle_orders.parquet" ` --parallelmethod "None" ``` **Parallel with Physical (Rowid):** ``` .\FastBCP.exe ` --connectiontype "oraodp" ` --server "localhost:1521/ORCLPDB1" ` --user "system" ` --password "password" ` --sourceschema "SYSTEM" ` --sourcetable "ORDERS" ` --directory "C:\temp" ` --fileoutput "oracle_orders.parquet" ` --parallelmethod "Physical" ` --paralleldegree 10 ` --merge "False" ``` ## OLEDB Connection Examples[​](#oledb-connection-examples "Direct link to OLEDB Connection Examples") Using Oracle OLEDB Provider for connections. **Single-threaded:** ``` .\FastBCP.exe ` --connectiontype "oledb" ` --provider "OraOLEDB.Oracle" ` --server "localhost:1521/ORCLPDB1" ` --user "system" ` --password "password" ` --query "SELECT * FROM SYSTEM.ORDERS WHERE ROWNUM <= 10000" ` --directory "C:\temp" ` --fileoutput "oracle_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` **Parallel Random:** ``` .\FastBCP.exe ` --connectiontype "oledb" ` --provider "OraOLEDB.Oracle" ` --server "localhost:1521/ORCLPDB1" ` --user "system" ` --password "password" ` --query "SELECT * FROM SYSTEM.ORDERS" ` --directory "C:\temp" ` --fileoutput "oracle_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "order_id" ` --paralleldegree 6 ` --merge "False" ``` **Parallel DataDriven:** ``` .\FastBCP.exe ` --connectiontype "oledb" ` --provider "OraOLEDB.Oracle" ` --server "localhost:1521/ORCLPDB1" ` --user "system" ` --password "password" ` --query "SELECT * FROM SYSTEM.ORDERS" ` --directory "C:\temp" ` --fileoutput "oracle_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "DataDriven" ` --distributekeycolumn "order_status" ` --paralleldegree 6 ` --merge "False" ``` ## ADBC Examples[​](#adbc-examples "Direct link to ADBC Examples") The `adbc_oracle` connection type uses the Arpe.io ADBC FastDriver for ultra-fast, Arrow-native exports. **Output is Parquet-only**, and the `Physical` parallel method (resolved to Rowid) is also supported — see [Connection Parameters](/1.5/documentation/cli/connection_parameters.md#connection-type) and [Parallel Parameters](/1.5/documentation/cli/parallel_parameters.md#parallel-method) for details. ``` ./FastBCP \ --connectiontype "adbc_oracle" \ --server "localhost:1521/orclpdb1" \ --user "MIG_EXPRESS" \ --password "FastPassword" \ --sourceschema "TPCH10" \ --sourcetable "LINEITEM" \ --directory "./" \ --fileoutput "{sourcetable}.parquet" \ --method "None" ``` tip Build your command with the [Wizard](/latest/wizard.md) --- # Other Databases Examples for exporting data from Clickhouse, SAP HANA, Netezza and Teradata databases. ## Clickhouse[​](#clickhouse "Direct link to Clickhouse") Export data from Clickhouse database. **Single-threaded export:** ``` .\FastBCP.exe ` --connectiontype "clickhouse" ` --server "localhost" ` --port "9000" ` --database "default" ` --user "default" ` --password "password" ` --query "SELECT * FROM orders LIMIT 1000" ` --directory "C:\temp" ` --fileoutput "clickhouse_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` **Parallel export with Random method:** ``` .\FastBCP.exe ` --connectiontype "clickhouse" ` --server "localhost" ` --port "9000" ` --database "default" ` --user "default" ` --password "password" ` --sourceschema "default" ` --sourcetable "orders" ` --directory "C:\temp" ` --fileoutput "clickhouse_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "order_id" ` --paralleldegree 8 ` --merge "False" ``` ## SAP HANA[​](#sap-hana "Direct link to SAP HANA") Export data from SAP HANA database using two connection types. ### HANA Connection Type[​](#hana-connection-type "Direct link to HANA Connection Type") Standard HANA connection for general exports. **Single-threaded export:** ``` .\FastBCP.exe ` --connectiontype "hana" ` --server "hanaserver:30015" ` --user "SYSTEM" ` --password "password" ` --query "SELECT * FROM ORDERS WHERE ORDER_DATE >= '2024-01-01'" ` --directory "C:\temp" ` --fileoutput "hana_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` **Parallel export with Random method:** ``` .\FastBCP.exe ` --connectiontype "hana" ` --server "hanaserver:30015" ` --user "SYSTEM" ` --password "password" ` --sourceschema "SYSTEM" ` --sourcetable "ORDERS" ` --directory "C:\temp" ` --fileoutput "hana_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "ORDER_ID" ` --paralleldegree 8 ` --merge "False" ``` ### HANA Export Connection Type[​](#hana-export-connection-type "Direct link to HANA Export Connection Type") Optimized HANA connection using native EXPORT functionality for faster bulk exports. HANA Export The `hanaexport` connection type uses SAP HANA's native EXPORT statement for optimized bulk data transfer. This is recommended for large datasets. **Single-threaded export:** ``` .\FastBCP.exe ` --connectiontype "hanaexport" ` --server "hanaserver:30015" ` --user "SYSTEM" ` --password "password" ` --query "SELECT * FROM ORDERS WHERE ORDER_DATE >= '2024-01-01'" ` --directory "C:\temp" ` --fileoutput "hana_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` **Parallel export with Random method:** ``` .\FastBCP.exe ` --connectiontype "hanaexport" ` --server "hanaserver:30015" ` --user "SYSTEM" ` --password "password" ` --sourceschema "SYSTEM" ` --sourcetable "ORDERS" ` --directory "C:\temp" ` --fileoutput "hana_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "ORDER_ID" ` --paralleldegree 8 ` --merge "False" ``` ## Netezza[​](#netezza "Direct link to Netezza") Export data from Netezza database using OLEDB provider. **Single-threaded export:** ``` .\FastBCP.exe ` --connectiontype "oledb" ` --provider "NZOLEDB" ` --server "netezza_server" ` --database "SYSTEM" ` --user "admin" ` --password "password" ` --query "SELECT * FROM orders" ` --directory "C:\temp" ` --fileoutput "netezza_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` **Parallel export with Random method:** ``` .\FastBCP.exe ` --connectiontype "oledb" ` --provider "NZOLEDB" ` --server "netezza_server" ` --database "SYSTEM" ` --user "admin" ` --password "password" ` --query "SELECT * FROM orders" ` --directory "C:\temp" ` --fileoutput "netezza_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "order_id" ` --paralleldegree 6 ` --merge "False" ``` **Parallel export with DataDriven method:** ``` .\FastBCP.exe ` --connectiontype "oledb" ` --provider "NZOLEDB" ` --server "netezza_server" ` --database "SYSTEM" ` --user "admin" ` --password "password" ` --query "SELECT * FROM orders" ` --directory "C:\temp" ` --fileoutput "netezza_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "DataDriven" ` --distributekeycolumn "region" ` --paralleldegree 6 ` --merge "False" ``` **Parallel export with Physical method (native Netezza connection):** With a native Netezza connection type (`nzsql`, `nzcopy`, `nzoledb`, `adbc_netezza`), `--parallelmethod Physical` resolves to the Netezza data slices (formerly `NZDataSlice`, now deprecated). It does not work through the generic `oledb` connection type, because FastBCP cannot know which engine is behind the provider. ``` .\FastBCP.exe ` --connectiontype "nzsql" ` --server "netezza_server" ` --database "SYSTEM" ` --user "admin" ` --password "password" ` --sourceschema "ADMIN" ` --sourcetable "ORDERS" ` --directory "C:\temp" ` --fileoutput "netezza_orders.parquet" ` --parallelmethod "Physical" ` --paralleldegree 8 ` --merge "False" ``` ## Teradata[​](#teradata "Direct link to Teradata") Export data from Teradata with the embedded .NET provider (`teradata`) or the embedded ArpeTeradata ADBC driver (`adbc_teradata`, Parquet output only). note `--parallelmethod Physical` is not available for Teradata. Use `Ntile`, `RangeId`, `Random`, `DataDriven`, `Timepartition` or `DBPartition`. **Single-threaded export (`teradata`):** ``` .\FastBCP.exe ` --connectiontype "teradata" ` --server "td-host:443" ` --database "TPCH" ` --user "FastUser" ` --password "FastPassword" ` --query "SELECT * FROM TPCH.ORDERS" ` --directory "C:\temp\teradata" ` --fileoutput "teradata_orders.parquet" ` --parallelmethod "None" ``` **Parallel export with RangeId (`teradata`):** ``` .\FastBCP.exe ` --connectiontype "teradata" ` --server "td-host:1025" ` --database "TPCH" ` --user "FastUser" ` --password "FastPassword" ` --query "SELECT * FROM TPCH.ORDERS" ` --directory "C:\temp\teradata" ` --fileoutput "teradata_orders.parquet" ` --parallelmethod "RangeId" ` --distributekeycolumn "o_orderkey" ` --paralleldegree 16 ``` **Parallel export with Ntile (`adbc_teradata`):** ``` .\FastBCP.exe ` --connectiontype "adbc_teradata" ` --server "td-host" ` --database "TPCH" ` --user "FastUser" ` --password "FastPassword" ` --sourceschema "TPCH" ` --sourcetable "ORDERS" ` --directory "C:\temp\teradata" ` --fileoutput "teradata_orders.parquet" ` --parallelmethod "Ntile" ` --distributekeycolumn "o_orderkey" ` --paralleldegree 8 ``` The default `adbc_teradata` logon uses TLS and needs no Teradata client software. For the legacy-port logon (no TLS on the server, or `SSL Mode=disable`), see [FASTBCP\_TTU\_PATH](/1.5/documentation/environment-variables/fastbcp-ttu-path.md) and [Connection Parameters](/1.5/documentation/cli/connection_parameters.md#adbc_teradata). tip Build your command with the [Wizard](/latest/wizard.md) --- # Output Formats Examples demonstrating different output formats supported by FastBCP. ## CSV Format[​](#csv-format "Direct link to CSV Format") Standard comma/delimiter-separated values format. ### Basic CSV Export[​](#basic-csv-export "Direct link to Basic CSV Export") ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Sales" ` --directory "C:\temp" ` --fileoutput "sales.csv" ` --decimalseparator "." ` --delimiter "," ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` ### CSV with Custom Delimiter[​](#csv-with-custom-delimiter "Direct link to CSV with Custom Delimiter") Using pipe delimiter for better data separation: ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Sales" ` --directory "C:\temp" ` --fileoutput "sales.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "sale_id" ` --paralleldegree 8 ` --merge "False" ``` ### CSV with European Format[​](#csv-with-european-format "Direct link to CSV with European Format") Using comma as decimal separator (common in European countries): ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Sales" ` --directory "C:\temp" ` --fileoutput "sales_european.csv" ` --decimalseparator "," ` --delimiter ";" ` --dateformat "dd/MM/yyyy HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "sale_id" ` --paralleldegree 8 ` --merge "False" ``` ## Parquet Format[​](#parquet-format "Direct link to Parquet Format") Columnar storage format optimized for analytical queries. ### Basic Parquet Export[​](#basic-parquet-export "Direct link to Basic Parquet Export") ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Sales" ` --directory "C:\temp" ` --fileoutput "sales.parquet" ` --parallelmethod "None" ``` ### Parallel Parquet Export[​](#parallel-parquet-export "Direct link to Parallel Parquet Export") Maximize performance with parallel execution: ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Sales" ` --directory "C:\temp" ` --fileoutput "sales.parquet" ` --parallelmethod "RangeId" ` --distributekeycolumn "sale_id" ` --paralleldegree 12 ` --merge "False" ``` ### Parquet with PostgreSQL[​](#parquet-with-postgresql "Direct link to Parquet with PostgreSQL") ``` .\FastBCP.exe ` --connectiontype "pgcopy" ` --server "localhost" ` --port "5432" ` --database "salesdb" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "sales" ` --directory "C:\temp" ` --fileoutput "pg_sales.parquet" ` --parallelmethod "Physical" ` --paralleldegree 10 ` --merge "False" ``` ### Parquet with Oracle[​](#parquet-with-oracle "Direct link to Parquet with Oracle") ``` .\FastBCP.exe ` --connectiontype "oraodp" ` --server "localhost:1521/ORCLPDB1" ` --user "system" ` --password "password" ` --sourceschema "SYSTEM" ` --sourcetable "SALES" ` --directory "C:\temp" ` --fileoutput "oracle_sales.parquet" ` --parallelmethod "Physical" ` --paralleldegree 8 ` --merge "False" ``` ## Excel Format[​](#excel-format "Direct link to Excel Format") Export data to Microsoft Excel format (.xlsx). Excel Format Excel exports automatically format data for spreadsheet applications. Large datasets may be split across multiple sheets if they exceed Excel's row limits. ### Basic Excel Export[​](#basic-excel-export "Direct link to Basic Excel Export") ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Sales" ` --directory "C:\temp" ` --fileoutput "sales.xlsx" ` --parallelmethod "None" ``` ### Parallel Excel Export[​](#parallel-excel-export "Direct link to Parallel Excel Export") ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Sales" ` --directory "C:\temp" ` --fileoutput "sales.xlsx" ` --parallelmethod "RangeId" ` --distributekeycolumn "sale_id" ` --paralleldegree 6 ` --merge "False" ``` ### Excel with Custom Query[​](#excel-with-custom-query "Direct link to Excel with Custom Query") Export filtered data to Excel: ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --query "SELECT * FROM dbo.Sales WHERE sale_date >= '2024-01-01' AND sale_date < '2025-01-01'" ` --directory "C:\temp" ` --fileoutput "sales_2024.xlsx" ` --parallelmethod "Ntile" ` --distributekeycolumn "sale_id" ` --paralleldegree 4 ` --merge "False" ``` tip Build your command with the [Wizard](/latest/wizard.md) --- # PostgreSQL Examples Comprehensive examples for exporting data from PostgreSQL using native connectors (pgsql, pgcopy). ## Connection Types[​](#connection-types "Direct link to Connection Types") PostgreSQL exports support three connection types: * **pgsql**: Standard PostgreSQL protocol * **pgcopy**: PostgreSQL COPY protocol (fastest for bulk exports) * **adbc\_pgsql**: ADBC FastDriver — ultra-fast, Parquet-only export (see [ADBC Examples](#adbc-examples)) ADBC Support The `adbc_pgsql` connection type uses the Arpe.io ADBC FastDriver for ultra-fast, Arrow-native Parquet exports. Output is Parquet-only — see the [ADBC Examples](#adbc-examples) section below. ## Single-threaded Export[​](#single-threaded-export "Direct link to Single-threaded Export") Simple export without parallelization. * Standard Protocol * COPY Protocol ``` .\FastBCP.exe ` --connectiontype "pgsql" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --query "SELECT * FROM lineitem LIMIT 1000" ` --directory "C:\temp" ` --fileoutput "pg_lineitem.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` ``` .\FastBCP.exe ` --connectiontype "pgcopy" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --query "SELECT * FROM lineitem LIMIT 1000" ` --directory "C:\temp" ` --fileoutput "pg_lineitem.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` ## Parallel Export - Random Method[​](#parallel-export---random-method "Direct link to Parallel Export - Random Method") Export using Random distribution with modulo operation. * Standard Protocol * COPY Protocol ``` .\FastBCP.exe ` --connectiontype "pgsql" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --query "SELECT * FROM lineitem" ` --directory "C:\temp" ` --fileoutput "pg_lineitem_random.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "l_linenumber" ` --paralleldegree 8 ` --merge "False" ` --runid "pgsql_to_csv_parallel8_random" ``` ``` .\FastBCP.exe ` --connectiontype "pgcopy" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --query "SELECT * FROM lineitem" ` --directory "C:\temp" ` --fileoutput "pg_lineitem_random.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "l_linenumber" ` --paralleldegree 8 ` --merge "False" ` --runid "pgcopy_to_csv_parallel8_random" ``` ## Parallel Export - DataDriven Method[​](#parallel-export---datadriven-method "Direct link to Parallel Export - DataDriven Method") Export using DataDriven distribution based on distinct column values. * Standard Protocol * COPY Protocol ``` .\FastBCP.exe ` --connectiontype "pgsql" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "lineitem" ` --directory "C:\temp" ` --fileoutput "pg_lineitem_dd.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "DataDriven" ` --distributekeycolumn "l_shipmode" ` --paralleldegree 10 ` --merge "False" ` --runid "pgsql_to_csv_parallel10_datadriven" ``` ``` .\FastBCP.exe ` --connectiontype "pgcopy" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "lineitem" ` --directory "C:\temp" ` --fileoutput "pg_lineitem_dd.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "DataDriven" ` --distributekeycolumn "l_shipmode" ` --paralleldegree 10 ` --merge "False" ` --runid "pgcopy_to_csv_parallel10_datadriven" ``` ## Parallel Export - Ntile Method[​](#parallel-export---ntile-method "Direct link to Parallel Export - Ntile Method") Export using Ntile for evenly distributed chunks. * Standard Protocol * COPY Protocol **Full table:** ``` .\FastBCP.exe ` --connectiontype "pgsql" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "lineitem" ` --directory "C:\temp" ` --fileoutput "pg_lineitem_ntile.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Ntile" ` --distributekeycolumn "l_orderkey" ` --paralleldegree 12 ` --merge "False" ` --runid "pgsql_to_csv_parallel12_ntile" ``` **With query filter:** ``` .\FastBCP.exe ` --connectiontype "pgsql" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --query "SELECT * FROM lineitem WHERE l_shipdate BETWEEN '1995-01-01' AND '1995-12-31'" ` --directory "C:\temp" ` --fileoutput "pg_lineitem_ntile.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Ntile" ` --distributekeycolumn "l_orderkey" ` --paralleldegree 12 ` --merge "False" ` --runid "pgsql_to_csv_parallel12_ntile_filtered" ``` **Full table:** ``` .\FastBCP.exe ` --connectiontype "pgcopy" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "lineitem" ` --directory "C:\temp" ` --fileoutput "pg_lineitem_ntile.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Ntile" ` --distributekeycolumn "l_orderkey" ` --paralleldegree 12 ` --merge "False" ` --runid "pgcopy_to_csv_parallel12_ntile" ``` **With query filter:** ``` .\FastBCP.exe ` --connectiontype "pgcopy" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --query "SELECT * FROM lineitem WHERE l_shipdate BETWEEN '1995-01-01' AND '1995-12-31'" ` --directory "C:\temp" ` --fileoutput "pg_lineitem_ntile.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Ntile" ` --distributekeycolumn "l_orderkey" ` --paralleldegree 12 ` --merge "False" ` --runid "pgcopy_to_csv_parallel12_ntile_filtered" ``` ## Parallel Export - Physical Method[​](#parallel-export---physical-method "Direct link to Parallel Export - Physical Method") Parallel export using the physical row identifier (ctid). Physical on PostgreSQL With a PostgreSQL connection type (`pgsql`, `pgcopy`, `adbc_pgsql`), the `Physical` method resolves to the ctid strategy (formerly `--parallelmethod Ctid`, now deprecated). It is very efficient for full table exports and does not require a distribute key column. `--sourceschema` and `--sourcetable` are required. * Standard Protocol * COPY Protocol ``` .\FastBCP.exe ` --connectiontype "pgsql" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "lineitem" ` --directory "C:\temp" ` --fileoutput "pg_lineitem_physical.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Physical" ` --paralleldegree 8 ` --merge "False" ` --runid "pgsql_to_csv_parallel8_physical" ``` ``` .\FastBCP.exe ` --connectiontype "pgcopy" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "lineitem" ` --directory "C:\temp" ` --fileoutput "pg_lineitem_physical.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Physical" ` --paralleldegree 8 ` --merge "False" ` --runid "pgcopy_to_csv_parallel8_physical" ``` ## Export to Parquet[​](#export-to-parquet "Direct link to Export to Parquet") Export PostgreSQL data to Parquet format. * Standard Protocol * COPY Protocol **Single-threaded:** ``` .\FastBCP.exe ` --connectiontype "pgsql" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "lineitem" ` --directory "C:\temp" ` --fileoutput "pg_lineitem.parquet" ` --parallelmethod "None" ``` **Parallel with Physical (Ctid):** ``` .\FastBCP.exe ` --connectiontype "pgsql" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "lineitem" ` --directory "C:\temp" ` --fileoutput "pg_lineitem.parquet" ` --parallelmethod "Physical" ` --paralleldegree 10 ` --merge "False" ``` **Single-threaded:** ``` .\FastBCP.exe ` --connectiontype "pgcopy" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "lineitem" ` --directory "C:\temp" ` --fileoutput "pg_lineitem.parquet" ` --parallelmethod "None" ``` **Parallel with Physical (Ctid):** ``` .\FastBCP.exe ` --connectiontype "pgcopy" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "lineitem" ` --directory "C:\temp" ` --fileoutput "pg_lineitem.parquet" ` --parallelmethod "Physical" ` --paralleldegree 10 ` --merge "False" ``` ## ODBC Connection[​](#odbc-connection "Direct link to ODBC Connection") Using ODBC DSN for PostgreSQL connection. **Single-threaded:** ``` .\FastBCP.exe ` --connectiontype "odbc" ` --dsn "PostgreSQL_DSN" ` --directory "C:\temp" ` --fileoutput "pg_test.csv" ` --query "SELECT * FROM public.test_table" ` --parallelmethod "None" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ``` **Parallel Random:** ``` .\FastBCP.exe ` --connectiontype "odbc" ` --dsn "PostgreSQL_DSN" ` --directory "C:\temp" ` --fileoutput "pg_test.csv" ` --query "SELECT * FROM public.test_table" ` --parallelmethod "Random" ` --distributekeycolumn "id" ` --paralleldegree 6 ` --merge "False" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ``` **Parallel DataDriven:** ``` .\FastBCP.exe ` --connectiontype "odbc" ` --dsn "PostgreSQL_DSN" ` --directory "C:\temp" ` --fileoutput "pg_test.csv" ` --query "SELECT * FROM public.test_table" ` --parallelmethod "DataDriven" ` --distributekeycolumn "category" ` --paralleldegree 6 ` --merge "False" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ``` ## ADBC Examples[​](#adbc-examples "Direct link to ADBC Examples") The `adbc_pgsql` connection type uses the Arpe.io ADBC FastDriver for ultra-fast, Arrow-native exports. **Output is Parquet-only** — see [Connection Parameters](/1.5/documentation/cli/connection_parameters.md#connection-type) for details. ``` ./FastBCP \ --connectiontype "adbc_pgsql" \ --server "localhost:5432" \ --user "pytabextract_pguser" \ --password "FastPassword" \ --database "tpch" \ --sourceschema "tpch10" \ --sourcetable "lineitem" \ --directory "./" \ --fileoutput "{sourcetable}.parquet" \ --method "None" ``` tip Build your command with the [Wizard](/latest/wizard.md) --- # SQL Server Examples Comprehensive examples for exporting data from SQL Server (MSSQL, OLEDB, ODBC). ADBC Support SQL Server also supports the `adbc_mssql` connection type, powered by the Arpe.io ADBC FastDriver for ultra-fast, Arrow-native Parquet exports. Output is Parquet-only — see the [ADBC Examples](#adbc-examples) section below. ## Single-threaded Export[​](#single-threaded-export "Direct link to Single-threaded Export") Simple export without parallelization for smaller datasets. ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "FASTExportData" ` --trusted ` --query "SELECT top 1000 * FROM dbo.TEST_71_1M_12m" ` --directory "C:\temp" ` --fileoutput "TEST1000.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` ## Parallel Export - Random Method[​](#parallel-export---random-method "Direct link to Parallel Export - Random Method") Export using Random distribution based on modulo operation. * Windows Authentication * SQL Authentication ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "FASTExportData" ` --trusted ` --query "SELECT * FROM dbo.TEST_71_1M_12m" ` --directory "C:\temp" ` --fileoutput "TEST_71c_1Mr.csv" ` --decimalseparator "," ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "ID_ARTICLE" ` --paralleldegree 8 ` --merge "False" ` --runid "mssql_to_csv_parallel8_random" ``` ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "FASTExportData" ` --user "FastUser" ` --password "FastPassword" ` --query "SELECT * FROM dbo.TEST_71_1M_12m" ` --directory "C:\temp" ` --fileoutput "TEST_71c_1Mr.csv" ` --decimalseparator "," ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "ID_ARTICLE" ` --paralleldegree 8 ` --merge "False" ` --runid "mssql_to_csv_parallel8_random" ``` ## Parallel Export - Physical Method[​](#parallel-export---physical-method "Direct link to Parallel Export - Physical Method") Parallel export using the physical row location (`%%physloc%%`), without a distribute key column. Physical on SQL Server With a SQL Server connection type (`mssql`, `msoledbsql`, `adbc_mssql`), the `Physical` method resolves to the Physloc strategy (formerly `--parallelmethod Physloc`, now deprecated). `--sourceschema` and `--sourcetable` are required. On a clustered columnstore table, FastBCP detects it and splits on the columnstore row id. ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "tpch10_collation_bin2" ` --trusted ` --sourceschema "dbo" ` --sourcetable "orders" ` --directory "D:\temp" ` --fileoutput "mssql_orders.parquet" ` --parallelmethod "Physical" ` --paralleldegree -2 ` --merge "False" ` --runid "mssql_to_parquet_parallel-2_physical" ``` ## Parallel Export - RangeId Method[​](#parallel-export---rangeid-method "Direct link to Parallel Export - RangeId Method") Export using RangeId distribution for evenly distributed integer keys. **Using table name:** ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "tpch10_collation_bin2" ` --trusted ` --sourceschema "dbo" ` --sourcetable "orders" ` --directory "D:\temp" ` --fileoutput "mssql_orders.csv" ` --decimalseparator "," ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "RangeId" ` --distributekeycolumn "o_orderkey" ` --paralleldegree -2 ` --merge "False" ` --runid "mssql_to_csv_parallel-2_rangeid" ``` **Using query with filter:** ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "tpch10_collation_bin2" ` --trusted ` --query "select * from orders WHERE o_orderdate between '19950101' and '19951231'" ` --directory "D:\temp" ` --fileoutput "mssql_orders.csv" ` --decimalseparator "," ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "RangeId" ` --distributekeycolumn "o_orderkey" ` --paralleldegree -2 ` --merge "False" ` --runid "mssql_to_csv_parallel-2_rangeid_using_query" ``` ## Parallel Export - Ntile Method[​](#parallel-export---ntile-method "Direct link to Parallel Export - Ntile Method") Export using Ntile distribution for evenly distributed chunks. **Full table export:** ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "tpch10_collation_bin2" ` --trusted ` --sourceschema "dbo" ` --sourcetable "orders" ` --directory "D:\temp" ` --fileoutput "mssql_orders.csv" ` --decimalseparator "," ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Ntile" ` --distributekeycolumn "o_orderkey" ` --paralleldegree 12 ` --merge "False" ` --runid "mssql_to_csv_parallel12_Ntile" ``` **Filtered export with date column:** ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "tpch10_collation_bin2" ` --trusted ` --query "select * from orders WHERE o_orderdate between '19950101' and '19951231'" ` --directory "D:\temp" ` --fileoutput "mssql_orders.csv" ` --decimalseparator "," ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Ntile" ` --distributekeycolumn "o_orderdate" ` --paralleldegree 12 ` --merge "False" ` --runid "mssql_to_csv_parallel12_Ntile_using_query" ``` ## Parallel Export - DataDriven Method[​](#parallel-export---datadriven-method "Direct link to Parallel Export - DataDriven Method") Export using DataDriven distribution based on distinct values of a column. **Using partition function:** ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "tpch10_collation_bin2" ` --directory "D:\temp" ` --fileoutput "mssql_orders.csv" ` --trusted ` --sourceschema "dbo" ` --sourcetable "orders_part" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "DataDriven" ` --distributekeycolumn "`$partition.PF_DATE(o_orderdate)" ` --merge "False" ` --paralleldegree 10 ``` ## Export to Parquet[​](#export-to-parquet "Direct link to Export to Parquet") Export SQL Server data to Parquet format. **Single-threaded:** ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "faker" ` --trusted ` --sourceschema "dbo" ` --sourcetable "faker_s1000" ` --directory "D:\temp" ` --fileoutput "mssql_faker_s1000.parquet" ` --parallelmethod "None" ` --runid "mssql_to_parquet_NoParallel" ``` **Parallel with RangeId:** ``` .\FastBCP.exe ` --connectiontype "mssql" ` --trusted ` --server "localhost" ` --database "tpch10_collation_bin2" ` --directory "D:\temp" ` --fileoutput "mssql_orders.parquet" ` --parallelmethod "RangeId" ` --distributekeycolumn "o_orderkey" ` --paralleldegree 7 ` --sourceschema "dbo" ` --sourcetable "orders" ` --merge "False" ``` **Parallel with Ntile and query:** ``` .\FastBCP.exe ` --connectiontype "mssql" ` --trusted ` --server "localhost" ` --database "tpch10_collation_bin2" ` --directory "D:\temp" ` --fileoutput "mssql_orders_1995.parquet" ` --parallelmethod "Ntile" ` --distributekeycolumn "o_orderkey" ` --paralleldegree 7 ` --query "select * from dbo.orders where o_orderdate between '1995-01-01' and '1995-12-31'" ` --merge "False" ``` ## OLEDB Connection[​](#oledb-connection "Direct link to OLEDB Connection") Alternative connection method using OLEDB provider. **Single-threaded:** ``` $query="SELECT top 10000 * FROM FASTExportData.dbo.TEST_71_1M_12m" $target="localhost" .\FastBCP.exe ` --connectiontype "oledb" ` --provider "MSOLEDBSQL" ` --server $target ` --directory "C:\temp" ` --fileoutput "TEST.CSV" ` --paralleldegree 1 ` --trusted ` --query $query ` --parallelmethod "None" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ``` **Parallel Random with Windows Auth:** ``` .\FastBCP.exe ` --connectiontype "oledb" ` --provider "MSOLEDBSQL" ` --server $target ` --directory "C:\temp" ` --fileoutput "TEST.CSV" ` --paralleldegree 6 ` --trusted ` --query $query ` --parallelmethod "Random" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --distributekeycolumn "ID_ARTICLE" ` --merge "False" ``` **Parallel Random with SQL Auth:** ``` .\FastBCP.exe ` --connectiontype "oledb" ` --provider "MSOLEDBSQL" ` --server $target ` --directory "C:\temp" ` --fileoutput "TEST.CSV" ` --paralleldegree 6 ` --user "FastUser" ` --password "FastPassword" ` --query $query ` --parallelmethod "Random" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --distributekeycolumn "ID_ARTICLE" ` --merge "False" ``` **Parallel DataDriven:** ``` .\FastBCP.exe ` --connectiontype "oledb" ` --provider "MSOLEDBSQL" ` --server $target ` --directory "C:\temp" ` --fileoutput "TEST.CSV" ` --paralleldegree 6 ` --trusted ` --query $query ` --parallelmethod "DataDriven" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --distributekeycolumn "ID_DECOUPE_GEO" ` --merge "False" ``` ## ODBC Connection[​](#odbc-connection "Direct link to ODBC Connection") Using ODBC DSN for connection. **Single-threaded:** ``` .\FastBCP.exe ` --connectiontype "odbc" ` --dsn "DSN4FastBCP" ` --directory "C:\temp" ` --fileoutput "TEST.CSV" ` --paralleldegree 1 ` --trusted ` --query "SELECT * FROM [TEST_71_1M_12m]" ` --parallelmethod "None" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ``` **Parallel Random with Windows Auth:** ``` .\FastBCP.exe ` --connectiontype "odbc" ` --dsn "DSN4FastBCP" ` --directory "C:\temp" ` --fileoutput "TEST.CSV" ` --paralleldegree 6 ` --trusted ` --query "SELECT * FROM [TEST_71_1M_12m]" ` --parallelmethod "Random" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --distributekeycolumn "ID_ARTICLE" ` --merge "False" ``` **Parallel Random with SQL Auth:** ``` .\FastBCP.exe ` --connectiontype "odbc" ` --dsn "DSN4FastBCP" ` --directory "C:\temp" ` --fileoutput "TEST.CSV" ` --paralleldegree 6 ` --user "FastUser" ` --password "FastPassword" ` --query "SELECT * FROM [TEST_71_1M_12m]" ` --parallelmethod "Random" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --distributekeycolumn "ID_ARTICLE" ` --merge "False" ``` **Parallel DataDriven:** ``` .\FastBCP.exe ` --connectiontype "odbc" ` --dsn "DSN4FastBCP" ` --directory "C:\temp" ` --fileoutput "TEST.CSV" ` --paralleldegree 6 ` --trusted ` --query "SELECT * FROM [TEST_71_1M_12m]" ` --parallelmethod "DataDriven" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --distributekeycolumn "ID_GEO" ` --merge "False" ``` ## ADBC Examples[​](#adbc-examples "Direct link to ADBC Examples") The `adbc_mssql` connection type uses the Arpe.io ADBC FastDriver for ultra-fast, Arrow-native exports. **Output is Parquet-only** — see [Connection Parameters](/1.5/documentation/cli/connection_parameters.md#connection-type) for details. **Single-threaded export:** ``` ./FastBCP \ --connectiontype "adbc_mssql" \ --server "localhost,1433" \ --database "tpch" \ --user "migadmin" \ --password "FastPassword" \ --sourceschema "tpch10" \ --sourcetable "lineitem" \ --directory "./" \ --fileoutput "{sourcetable}.parquet" \ --method "None" ``` **Parallel export with RangeId and license file:** ``` .\FastBCP.exe ` --connectiontype "adbc_mssql" ` --server "localhost" ` --trusted ` --database "TPCH_SF100_NOBACKUP" ` --sourceschema "dbo" ` --sourcetable "lineitem_ci" ` --fileoutput "{sourcetable}.parquet" ` --directory "B:\export\{sourcetable}\" ` --parquetcompression "None" ` --parallelmethod "RangeId" ` --distributekeycolumn "l_orderkey" ` --degree 32 ` --runid "1.2.0" ` --licence "C:\Sources\FastBCP\FastBCP_AetP.lic" ``` ## SQL Server Backup Files (backup\_mssql)[​](#sql-server-backup-files-backup_mssql "Direct link to SQL Server Backup Files (backup_mssql)") The `backup_mssql` connection type reads a table straight from a SQL Server **full backup** (`.bak`), without restoring it and without a SQL Server instance. `--server` is the directory of the backups and `--database` the backup file. **Output is Parquet-only** — see [SQL Server backup files](/1.5/documentation/cli/connection_parameters.md#sql-server-backup-files-backup_mssql) for what is supported. **One backup file, parallel export (Physical resolves to Pages):** * Windows * Linux ``` .\FastBCP.exe ` --connectiontype "backup_mssql" ` --server "D:\Backups\MSSQL" ` --database "tpch_full.bak" ` --sourceschema "dbo" ` --sourcetable "orders" ` --directory "D:\export\{sourcetable}" ` --fileoutput "{sourcetable}.parquet" ` --parallelmethod "Physical" ` --paralleldegree 8 ``` ``` ./FastBCP \ --connectiontype "backup_mssql" \ --server "/var/opt/mssql/backup" \ --database "tpch_full.bak" \ --sourceschema "dbo" \ --sourcetable "orders" \ --directory "/export/{sourcetable}" \ --fileoutput "{sourcetable}.parquet" \ --parallelmethod "Physical" \ --paralleldegree 8 ``` **Striped backup** (`BACKUP DATABASE tpch TO DISK = 'tpch_1.bak', DISK = 'tpch_2.bak', DISK = 'tpch_3.bak'`): a pattern matching the stripes, or the stripes separated by `;`, in any order: ``` ./FastBCP \ --connectiontype "backup_mssql" \ --server "/var/opt/mssql/backup" \ --database "tpch_*.bak" \ --sourceschema "dbo" \ --sourcetable "lineitem" \ --directory "/export/lineitem" \ --fileoutput "lineitem.parquet" \ --parallelmethod "Physical" \ --paralleldegree 8 ``` ``` --database "tpch_1.bak;tpch_2.bak;tpch_3.bak" ``` **A query on one table** (column list, no filter: `SELECT * | columns FROM [schema.]table`): ``` .\FastBCP.exe ` --connectiontype "backup_mssql" ` --server "D:\Backups\MSSQL" ` --database "sales_full.bak" ` --query "SELECT OrderID, CustomerID, OrderDate FROM Sales.Orders" ` --directory "D:\export\orders" ` --fileoutput "orders.parquet" ``` note A file holding several backups (`WITH NOINIT`) is read at its **last full backup**. Backups of TDE databases and encrypted backups (`WITH ENCRYPTION`) are refused with a clear message. tip Build your command with the [Wizard](/latest/wizard.md) --- # Configuration Examples Here are sample configuration files for different logging scenarios: ## FastBCP\_Settings.json : Sinks on Console + Files (Windows path style) + MSSQL[​](#fastbcp_settingsjson---sinks-on-console--files-windows-path-style--mssql "Direct link to FastBCP_Settings.json : Sinks on Console + Files (Windows path style) + MSSQL") For logs with Console + Files stored on Windows machine + MSSQL sinks: ``` { "ConnectionStrings": { "MS_FastBCPLogs": "Server=localhost;Database=FastBCPLogs;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\\FastBCP_.json", "retainedFileCountLimit": 10, "rollingInterval": "Day", "rollOnFileSizeLimit": true } }, { "Name": "MSSqlServer", "Args": { "connectionString": "MS_FastBCPLogs", "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": "FastBCP" } } } ``` ## FastBCP\_Settings\_Linux\_Console\_Files.json[​](#fastbcp_settings_linux_console_filesjson "Direct link to FastBCP_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/FastBCP_.json", "retainedFileCountLimit": 10, "rollingInterval": "Day", "rollOnFileSizeLimit": true } } ], "Enrich": [ "FromLogContext", "WithMachineName", "WithProcessId", "WithThreadId" ], "Properties": { "Application": "FastBCP" } } } ``` ## FastBCP\_Settings\_Map\_for\_Windows.json[​](#fastbcp_settings_map_for_windowsjson "Direct link to FastBCP_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}\\FastBCP-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": "FastBCP" } } } ``` ## FastBCP\_Settings\_Map\_for\_Linux\_and\_Container.json[​](#fastbcp_settings_map_for_linux_and_containerjson "Direct link to FastBCP_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}/FastBCP-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": "FastBCP" } } } ``` ## FastBCP\_Settings\_Log\_to\_PGSQL.json : Console + PostgreSQL log database[​](#fastbcp_settings_log_to_pgsqljson--console--postgresql-log-database "Direct link to FastBCP_Settings_Log_to_PGSQL.json : Console + PostgreSQL log database") ``` { "ConnectionStrings": { "PG_FastBCPLogs": "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_FastBCPLogs", "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": "FastBCP" } } } ``` ## FastBCP\_Settings\_OpenTelemetry.json[​](#fastbcp_settings_opentelemetryjson "Direct link to FastBCP_Settings_OpenTelemetry.json") For Console with trace correlation and OpenTelemetry log export (e.g., to [Jaeger](https://www.jaegertracing.io/)): ``` { "Serilog": { "MinimumLevel": { "Default": "Debug", "Override": { "Microsoft": "Warning", "System": "Warning" } }, "Properties": { "LogDirectory": "logs" }, "Enrich": [ "FromLogContext", "WithEnvironmentUserName", "WithProcessId", "WithThreadId", "WithMachineName", "fulltargetname" ], "WriteTo": [ { "Name": "Console", "Args": { "restrictedToMinimumLevel": "Information", "outputTemplate": "{Timestamp:yyyy-MM-ddTHH:mm:ss.fff zzz} -|- {Application} -|- {Level:u12} -|- {fulltargetname} -|- TraceId={TraceId} SpanId={SpanId} -|- {Message}{NewLine}{Exception}", "theme": "Serilog.Sinks.SystemConsole.Themes.SystemConsoleTheme::Literate, Serilog.Sinks.Console" } }, { "Name": "OpenTelemetry", "Args": { "Endpoint": "http://localhost:4317", "Protocol": "Grpc", "ResourceAttributes": { "service.name": "FastBCP", "deployment.environment": "local-test" } } } ] } } ``` Usage with the `--traceparent` parameter to correlate with an upstream caller: ``` ./FastBCP \ --connectiontype mssql \ --server localhost \ --database "tpch10" \ --trusted \ --query "SELECT * FROM dbo.orders" \ --directory "/data/temp" \ --fileoutput "orders.csv" \ --traceparent "00-abcdef1234567890abcdef1234567890-1234567890abcdef-01" \ --settingsfile "/config/FastBCP_Settings_OpenTelemetry.json" ``` **Result in Jaeger UI:** ![FastBCP OpenTelemetry result in Jaeger UI](/assets/images/FastBCP_OpenTelemetry_result_sample-729a1de4f4ccde92a0856f3f4e8b9468.jpg) --- # Log Database FastBCP 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 `FastBCP_settings.json` * You can specify a custom settings file using the `--settingsfile` parameter Information **Log table is created automatically if not exists but it is not indexed.** Up to you to choose you indexed column(s) you prefer to index. We Advice you to index event\_timestamp column and run\_id Information No internal purge of the log table, it is up to you to decide when and how filter the log table Complete configuration examples for both MSSQL and PostgreSQL are available in the [Configuration Examples](/1.5/documentation/logging/examples.md#fastbcp_settingsjson-for-windows) page. Information **In case the database is not reachable, FastBCP will fail and will refuse to continue.** If you want to continue without logging in the database, you can rename the `FastBCP_settings.json` file to something else (like `FastBCP_settings.json.save`) and FastBCP 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 ***FastBCP\_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}/FastBCP-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**: [FastBCP\_Settings\_Map\_for\_Windows.json](/1.5/documentation/logging/examples.md#fastbcp_settings_map_for_windowsjson) * **Linux/Container**: [FastBCP\_Settings\_Map\_for\_Linux\_and\_Container.json](/1.5/documentation/logging/examples.md#fastbcp_settings_map_for_linux_and_containerjson) --- # Log Levels FastBCP 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 | | **Critical** | Severe errors causing termination | Fatal application errors | ## Configuration[​](#configuration "Direct link to Configuration") You can also configure the log level in the `FastBCP_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\\FastBCP_.json", "rollingInterval": "Day" } } ] } } ``` --- # OpenTelemetry FastBCP supports [OpenTelemetry](https://opentelemetry.io/) for distributed tracing and log correlation. This allows you to correlate FastBCP operations with upstream callers (orchestrators, APIs, pipelines) and export structured logs to any OpenTelemetry-compatible backend such as [Jaeger](https://www.jaegertracing.io/), [Zipkin](https://zipkin.io/), or [Grafana Tempo](https://grafana.com/oss/tempo/). ## The `--traceparent` Parameter[​](#the---traceparent-parameter "Direct link to the---traceparent-parameter") The `--traceparent` parameter accepts a [W3C Trace Context](https://www.w3.org/TR/trace-context/) traceparent identifier. When provided, FastBCP uses this trace context to link its internal spans and logs to the calling system's trace, enabling end-to-end distributed tracing. **Syntax:** * Long form only: `--traceparent ""` **Format:** The traceparent value follows the W3C Trace Context specification: ``` {version}-{trace-id}-{parent-id}-{trace-flags} ``` | Field | Format | Description | | --------------- | ------------- | --------------------------------------------- | | **version** | 2 hex digits | Version of the trace context (currently `00`) | | **trace-id** | 32 hex digits | Globally unique trace identifier | | **parent-id** | 16 hex digits | Identifier of the calling span | | **trace-flags** | 2 hex digits | Trace flags (e.g., `01` for sampled) | **Example:** * Windows * Linux ``` .\FastBCP.exe ` ... --traceparent "00-abcdef1234567890abcdef1234567890-1234567890abcdef-01" ` ... ``` ``` ./FastBCP \ ... --traceparent "00-abcdef1234567890abcdef1234567890-1234567890abcdef-01" \ ... ``` Tips Pass the traceparent from your orchestrator (Airflow, Kestra, CI/CD pipeline, or any OpenTelemetry-instrumented caller) so that FastBCP operations appear as child spans in your distributed traces. ## Configuring the OpenTelemetry Endpoint[​](#configuring-the-opentelemetry-endpoint "Direct link to Configuring the OpenTelemetry Endpoint") FastBCP uses the Serilog OpenTelemetry sink to export logs. You can configure the endpoint using either **environment variables** or a **`FastBCP_Settings.json`** file. ### Using Environment Variables[​](#using-environment-variables "Direct link to Using Environment Variables") Set the `OTEL_EXPORTER_OTLP_ENDPOINT` environment variable to point to your OpenTelemetry collector: * Windows * Linux ``` $env:OTEL_EXPORTER_OTLP_ENDPOINT = "http://localhost:4317" ``` ``` export OTEL_EXPORTER_OTLP_ENDPOINT="http://localhost:4317" ``` ### Using `FastBCP_Settings.json`[​](#using-fastbcp_settingsjson "Direct link to using-fastbcp_settingsjson") Add the OpenTelemetry sink to the `WriteTo` section of your `FastBCP_Settings.json` file. This gives you full control over the protocol, endpoint, and resource attributes. ``` { "Serilog": { "MinimumLevel": { "Default": "Debug", "Override": { "Microsoft": "Warning", "System": "Warning" } }, "Properties": { "LogDirectory": "logs" }, "Enrich": [ "FromLogContext", "WithEnvironmentUserName", "WithProcessId", "WithThreadId", "WithMachineName", "fulltargetname" ], "WriteTo": [ { "Name": "Console", "Args": { "restrictedToMinimumLevel": "Information", "outputTemplate": "{Timestamp:yyyy-MM-ddTHH:mm:ss.fff zzz} -|- {Application} -|- {Level:u12} -|- {fulltargetname} -|- TraceId={TraceId} SpanId={SpanId} -|- {Message}{NewLine}{Exception}", "theme": "Serilog.Sinks.SystemConsole.Themes.SystemConsoleTheme::Literate, Serilog.Sinks.Console" } }, { "Name": "OpenTelemetry", "Args": { "Endpoint": "http://localhost:4317", "Protocol": "Grpc", "ResourceAttributes": { "service.name": "FastBCP", "deployment.environment": "local-test" } } } ] } } ``` **Key settings in the OpenTelemetry sink:** | Setting | Description | | ---------------------- | ----------------------------------------------------------------------------- | | **Endpoint** | URL of your OpenTelemetry collector (default: `http://localhost:4317`) | | **Protocol** | Transport protocol: `Grpc` (default) or `HttpProtobuf` | | **ResourceAttributes** | Key-value pairs attached to every log entry (e.g., service name, environment) | Information The `TraceId` and `SpanId` fields in the console output template allow you to see trace correlation directly in the console logs, even without an OpenTelemetry backend. note When both an environment variable and a `FastBCP_Settings.json` configuration are present, the settings file takes precedence for the OpenTelemetry sink configuration. --- # Logging Overview ## Parameter Logs targets using FastBCP\_settings.json[​](#parameter-logs-targets-using-fastbcp_settingsjson "Direct link to Parameter Logs targets using FastBCP_settings.json") In FastBCP can log informations in 3 modes : * **[Console](/1.5/documentation/logging/logs-level.md)** * **[Database (MSSQL and PostgreSQL Only)](/1.5/documentation/logging/log-database.md)** * **[File (or Map)](/1.5/documentation/logging/log-files-names-mapping-using-variables.md)** FastBCP also supports **[OpenTelemetry](/1.5/documentation/logging/OpenTelemetry.md)** for distributed tracing and log export to any OpenTelemetry-compatible backend. Tips You can use several targets (sinks) at the same time. You can adapt what and where you want to log using the `FastBCP_settings.json` file. By default if no custom path is provided, FastBCP looks for the settings file in : * the current directory (the working directory) * the same directory where the FastBCP executable is located (the executable directory). If this file is not present, FastBCP will use the console log only. You can specify a custom path to the settings file using the `-f` or `--settingsfile` parameter. * Windows * Linux ``` .\FastBCP.exe ` --connectiontype mssql ` --server localhost ` --database "tpch10_collation_bin2" ` --trusted ` --query "SELECT * FROM dbo.orders" ` --directory "D:\temp" ` --fileoutput "mssql_orders.csv" ` --parallelmethod Ntile ` --distributekeycolumn "o_orderkey" ` --paralleldegree 7 ` --settingsfile "D:\logs\config\FastBCP_settings.json" ``` ``` ./FastBCP \ --connectiontype mssql \ --server localhost \ --database "tpch10_collation_bin2" \ --trusted \ --query "SELECT * FROM dbo.orders" \ --directory "/data/temp" \ --fileoutput "mssql_orders.csv" \ --parallelmethod Ntile \ --distributekeycolumn "o_orderkey" \ --paralleldegree 7 \ --settingsfile "/etc/fastbcp/FastBCP_settings.json" ``` Some settings files samples can be found in the [Configuration Examples](/1.5/documentation/logging/examples.md) page. --- # Installation ## Instructions[​](#instructions "Direct link to Instructions") * Windows * Linux * Docker/MacOS To start using FastBCP, first **[request a trial](https://arpe.io/get-trial?product=FastBCP)** to download the latest version. Once downloaded, unzip FastBCP to a directory of your choice. ``` Expand-Archive -Path .\FastBCP.zip -DestinationPath .\FastBCP ``` You can verify the installation by checking the version: ``` .\FastBCP.exe --version ``` To start using FastBCP, first **[request a trial](https://arpe.io/get-trial?product=FastBCP)** to download the latest version. Once downloaded, unzip FastBCP to a directory of your choice. ``` unzip FastBCP.zip -d FastBCP ``` On **Linux**, you need to give execution rights to the FastBCP binary: ``` chmod +x FastBCP ```
You can verify the installation by checking the version: ``` ./FastBCP --version ``` FastBCP is available as a Docker image on **[Docker Hub](https://hub.docker.com/repository/docker/arpeio/fastbcp/general)**. Pull the latest version: ``` docker pull arpeio/fastbcp ``` Or pull a specific version: ``` docker pull arpeio/fastbcp:v0.0.0 ``` You can verify the installation by checking the version: ``` docker run --rm arpeio/fastbcp:latest --version ```
**You are now ready to run FastBCP.** License Information After the trial period you will need a valid license. By default, FastBCP will try to find a `FastBCP.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 FastBCP : | 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 in order to use it with ODBC or OLEDB connection type. --- # Apache Airflow [Apache Airflow](https://airflow.apache.org/) is a powerful open-source platform for developing, scheduling, and monitoring batch-oriented workflows. FastBCP 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") FastBCP provides an official Docker image available on Docker Hub: **Image:** `arpeio/fastbcp:latest`
**Repository:** ## Prerequisites[​](#prerequisites "Direct link to Prerequisites") ### Install Docker Provider[​](#install-docker-provider "Direct link to Install Docker Provider") To use FastBCP 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. FastBCP integration requires connections for your source database and cloud storage. ### 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:** `host.docker.internal` (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) AWS Connection (for S3 Export)[​](#b-aws-connection-for-s3-export "Direct link to B) AWS Connection (for S3 Export)") Create an AWS connection to pass cloud credentials to the container: 1. Navigate to **Admin** → **Connections** in the Airflow UI 2. Click **+** to create a new connection 3. In the **Connection Type** dropdown, select **Amazon Web Services** 4. Configure the connection: **Connection Settings:** * **Connection Id:** `aws_fastbcp` (or your preferred name) * **Connection Type:** `Amazon Web Services` (select this from the dropdown) * **AWS Access Key ID:** Your AWS access key (in the Login field) * **AWS Secret Access Key:** Your AWS secret key (in the Password field) * **Extra:** `{"region_name":"eu-west-1"}` (or your preferred region) tip Airflow AWS providers commonly use `region_name` in Extra JSON. Alternatively, you can use `{"region":"eu-west-1"}` or `{"aws_default_region":"eu-west-1"}`. ## 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 FastBCP 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., `fastbcp_orders_mssql_to_s3.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 _mssql_parts(conn_id: str): """ Extract MSSQL connection details from Airflow connection. Expected Airflow connection (using ODBC): - Conn Id: mssql_tpch10 (conn_type: odbc) - Host: host.docker.internal - Port: 11433 - Login/Password: FastLogin / FastPassword - Extra JSON: {"database":"tpch10"} """ c = BaseHook.get_connection(conn_id) host = c.host port = c.port user = c.login pwd = c.password # For ODBC MSSQL, the database is typically stored in Extra JSON # (because the UI may not expose a dedicated "Database" field). db = c.extra_dejson.get("database") or c.schema if not db: raise ValueError( f"Connection '{conn_id}': missing database. Put it in Extra JSON " f'{{"database":"tpch10"}} (recommended for ODBC).' ) return host, port, user, pwd, db def _aws_env(conn_id: str): """ Extract AWS credentials from Airflow connection and map to container env vars. Expected Airflow AWS connection: - Conn Id: aws_fastbcp - Conn Type: Amazon Web Services - Login -> AWS_ACCESS_KEY_ID - Password -> AWS_SECRET_ACCESS_KEY - Extra -> {"region_name":"eu-west-1"} (or your region) Returns a dictionary with: - AWS_ACCESS_KEY_ID - AWS_SECRET_ACCESS_KEY - AWS_DEFAULT_REGION """ c = BaseHook.get_connection(conn_id) # Keys can be in login/password or in Extra JSON access_key = c.login or c.extra_dejson.get("aws_access_key_id") secret_key = c.password or c.extra_dejson.get("aws_secret_access_key") # Airflow AWS providers commonly use "region_name" in Extra JSON region = ( c.extra_dejson.get("region_name") or c.extra_dejson.get("region") or c.extra_dejson.get("aws_default_region") ) missing = [ k for k, v in { "AWS_ACCESS_KEY_ID": access_key, "AWS_SECRET_ACCESS_KEY": secret_key, "AWS_DEFAULT_REGION": region, }.items() if not v ] if missing: raise ValueError( f"Connection '{conn_id}': missing AWS fields: {missing}. " f"Set login/password and add Extra.region_name (or region)." ) return { "AWS_ACCESS_KEY_ID": access_key, "AWS_SECRET_ACCESS_KEY": secret_key, "AWS_DEFAULT_REGION": region, } with DAG( dag_id="fastbcp_export_orders_parquet_to_s3", start_date=datetime(2025, 1, 1), schedule=None, catchup=False, tags=["fastbcp", "mssql", "s3", "docker"], ) as dag: mssql_host, mssql_port, mssql_user, mssql_pwd, mssql_db = _mssql_parts("mssql_tpch10") aws_env = _aws_env("aws_fastbcp") DockerOperator( task_id="export_orders_parquet_to_s3", image="arpeio/fastbcp: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, environment=aws_env, command=[ "--connectiontype", "mssql", "--server", f"{mssql_host},{mssql_port}", "--user", mssql_user, "--password", mssql_pwd, "--database", mssql_db, "--sourceschema", "dbo", "--sourcetable", "orders", "--fileoutput", "orders.parquet", "--directory", "s3://fastbcp-export/orders/parquet", "--parallelmethod", "Ntile", "--paralleldegree", "12", "--distributekeycolumn", "o_orderkey", "--merge", "false", "--nobanner", ], network_mode="bridge", ) ``` **Key Parameters:** * `image`: Specifies the FastBCP Docker image * `docker_url`: Docker daemon endpoint * `environment`: Dictionary of environment variables (AWS credentials in this case) * `command`: List of FastBCP CLI arguments * `auto_remove`: Automatically remove the container after successful execution ### Helper Functions Explained[​](#helper-functions-explained "Direct link to Helper Functions Explained") The DAG includes two utility functions: #### `_mssql_parts(conn_id)`[​](#_mssql_partsconn_id "Direct link to _mssql_partsconn_id") Extracts connection details from an Airflow ODBC connection. This function: * Retrieves host, port, username, and password * Extracts the database name from the Extra JSON field * Returns all components needed to build the FastBCP connection string #### `_aws_env(conn_id)`[​](#_aws_envconn_id "Direct link to _aws_envconn_id") Extracts AWS credentials from an Airflow AWS connection and maps them to the environment variables expected by FastBCP: * `AWS_ACCESS_KEY_ID` * `AWS_SECRET_ACCESS_KEY` * `AWS_DEFAULT_REGION` This function supports multiple Extra JSON formats for flexibility. ## Logging[​](#logging "Direct link to Logging") All FastBCP 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., `fastbcp_export_orders_parquet_to_s3`) 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: * FastBCP 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 16:15:37] INFO - Settings file not found in the working directory nor in the executable directory [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.882 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- The "FastBCP_Settings.json" file does not exist. Using default settings. Console Only with loglevel=Information [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.892 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- FastBCP Trial – will expires on "2026‑03‑27" (24 day(s) left). [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.892 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Starting [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- FastBCP Version : "0.29.2.0" Architecture : "X64" - Framework : ".NET 8.0.24" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Internal Trace ID : "5ccea857-1538-4a28-8b1c-cfe5c51fbd43" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Internal Run ID : "5ccea857-1538-4a28-8b1c-cfe5c51fbd43" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- OS : "Debian GNU/Linux 13 (trixie)" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Connection Type : "mssql" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Source SqlInstance : "sql22,1433" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Source Database : "tpch" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Source Schema : "tpch10" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Source Table : "orders" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Trusted Connection : False [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- User : "migadmin" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Output File : "orders.parquet" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Output Directory : /data/parquet [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Degree : 12 [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Distribute Method : "Ntile" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Distribute Column : "o_orderkey" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Decimal Separator : "," [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Delimiter : "|" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Use quotes : False [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Date format: "yyyy-MM-dd" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Encoding : "UTF-8" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- No Header : False [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Timestamped : False [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Boolean Format : "automatic" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Cloud Profile : "" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Application Intent : "ReadOnly" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.906 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- file extension is ".parquet" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.909 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Encoding used : Unicode (UTF-8) - 65001 - utf-8 [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.965 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- 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=FastBCP;Application Intent=ReadOnly" [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.086 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- 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 16:15:38] INFO - 2026-03-02T15:15:38.110 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Get DataTypes with header end : Elapsed=6 ms [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Data Segments Computation Completed in 260 ms [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Distribute Column Type : "Int32" [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 0 : 1 : 1 - 5000001 or "o_orderkey" is null [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 1 : 2 : 5000002 - 10000002 [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 2 : 3 : 10000003 - 15000003 [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 3 : 4 : 15000004 - 20000004 [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 4 : 5 : 20000005 - 25000005 [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 5 : 6 : 25000006 - 30000006 [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 6 : 7 : 30000007 - 35000007 [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 7 : 8 : 35000032 - 40000032 [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 8 : 9 : 40000033 - 45000033 [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 9 : 10 : 45000034 - 50000034 [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 10 : 11 : 50000035 - 55000035 [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 11 : 12 : 55000036 - 60000000 [2026-03-02 16:15:46] INFO - 2026-03-02T15:15:46.611 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 002 for o_orderkey between 10000003 and 15000003 into /data/parquet/orders_chunk_002.parquet : 1250001 rows x 9 columns in 8234ms [2026-03-02 16:15:46] INFO - 2026-03-02T15:15:46.611 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 011 for o_orderkey between 55000036 and 60000000 into /data/parquet/orders_chunk_011.parquet : 1249989 rows x 9 columns in 8234ms [2026-03-02 16:15:46] INFO - 2026-03-02T15:15:46.790 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 003 for o_orderkey between 15000004 and 20000004 into /data/parquet/orders_chunk_003.parquet : 1250001 rows x 9 columns in 8413ms [2026-03-02 16:15:46] INFO - 2026-03-02T15:15:46.797 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 005 for o_orderkey between 25000006 and 30000006 into /data/parquet/orders_chunk_005.parquet : 1250001 rows x 9 columns in 8420ms [2026-03-02 16:15:46] INFO - 2026-03-02T15:15:46.936 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 008 for o_orderkey between 40000033 and 45000033 into /data/parquet/orders_chunk_008.parquet : 1250001 rows x 9 columns in 8559ms [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.139 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 010 for o_orderkey between 50000035 and 55000035 into /data/parquet/orders_chunk_010.parquet : 1250001 rows x 9 columns in 8763ms [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.154 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 000 for o_orderkey between 1 and 5000001 into /data/parquet/orders_chunk_000.parquet : 1250001 rows x 9 columns in 8777ms [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.247 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 009 for o_orderkey between 45000034 and 50000034 into /data/parquet/orders_chunk_009.parquet : 1250001 rows x 9 columns in 8870ms [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.308 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 006 for o_orderkey between 30000007 and 35000007 into /data/parquet/orders_chunk_006.parquet : 1250001 rows x 9 columns in 8931ms [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.309 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 001 for o_orderkey between 5000002 and 10000002 into /data/parquet/orders_chunk_001.parquet : 1250001 rows x 9 columns in 8932ms [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.363 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 007 for o_orderkey between 35000032 and 40000032 into /data/parquet/orders_chunk_007.parquet : 1250001 rows x 9 columns in 8986ms [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.366 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 004 for o_orderkey between 20000005 and 25000005 into /data/parquet/orders_chunk_004.parquet : 1250001 rows x 9 columns in 8989ms [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- files generation end : Elapsed=9257 ms - maxdop=12 [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total data rows : 15000000 [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total data columns : 9 [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total cells : 135000000 [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Throughput rows : 1568531 rows/s [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Throughput cells : 14116787 cells/s [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total time : Elapsed=9563 ms [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total data rows : 15000000 [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total data columns : 9 [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total cells : 135000000 [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Final Throughput rows : 1568482 rows/s [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Final Throughput cells : 14116346 cells/s [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Completed Load [2026-03-02 16:15:47] INFO - Task instance in success state [2026-03-02 16:15:47] INFO - Previous state of the Task instance: TaskInstanceState.RUNNING [2026-03-02 16:15:47] INFO - Task operator: ``` --- # Docker Minimal, production-ready container image to run FastBCP, a high-performance bulk copy 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/FastBCP` * **Repository**: [FastBCP-Image on GitHub](https://github.com/arpe-io/FastBCP-Image) * **DockerHub**: [arpeio/fastbcp](https://hub.docker.com/repository/docker/arpeio/fastbcp/general) * Published automatically via GitHub Actions for each new release and weekly security updates ## Prerequisites[​](#prerequisites "Direct link to Prerequisites") * Docker 24+ (or Podman) * FastBCP Linux x64 ≥ 0.28.0 binary (for build only) * Optional: `FastBCP_Settings.json` to mount/copy into `/config` for custom logging settings ## Using the Prebuilt Image from DockerHub[​](#using-the-prebuilt-image-from-dockerhub "Direct link to Using the Prebuilt Image from DockerHub") You can use a prebuilt image from DockerHub that already includes the FastBCP binary. You must provide your own license at runtime. ### Available Tags[​](#available-tags "Direct link to Available Tags") * **Version-specific tags** are aligned with FastBCP releases (e.g., `v0.28.3`) * **`latest` tag** always points to the most recent FastBCP version ### Automatic Updates[​](#automatic-updates "Direct link to Automatic Updates") * **New releases**: Images are automatically built when new FastBCP versions are released * **Security updates**: The latest version of each minor branch (e.g., latest v0.27.x, v0.28.x, v0.29.x) is automatically rebuilt weekly (every Monday) with the latest base image and security patches * This ensures that all actively used versions remain secure without breaking compatibility * Example: If you use `v0.28.8` (latest of 0.28.x branch), it gets security updates even after `v0.29.0` is released ### Pull the Image[​](#pull-the-image "Direct link to Pull the Image") ``` # Latest version docker pull arpeio/fastbcp:latest # Specific version docker pull arpeio/fastbcp:v0.28.3 ``` ### Basic Commands[​](#basic-commands "Direct link to Basic Commands") ``` # Get command line help docker run --rm arpeio/fastbcp:latest # Check version docker run --rm arpeio/fastbcp:latest --version ``` ### License Requirement[​](#license-requirement "Direct link to License Requirement") Since version 0.28.0, pass the license content directly via `--license "…"`. ``` export licenseContent=$(cat ./FastBCP.lic) # Use $licenseContent in your docker run commands docker run --rm arpeio/fastbcp: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. ## Usage Examples[​](#usage-examples "Direct link to Usage Examples") The Docker image uses the FastBCP binary as its entrypoint, so you can run it directly with parameters as defined in the [FastBCP documentation](/latest/.md). ### Example 1: SQL Server → Parquet on S3[​](#example-1-sql-server--parquet-on-s3 "Direct link to Example 1: SQL Server → Parquet on S3") ``` export licenseContent=$(cat ./FastBCP.lic) docker run --rm \ -e AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID} \ -e AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY} \ -e AWS_REGION=${AWS_REGION} \ arpeio/fastbcp:latest \ --connectiontype "mssql" \ --server "host.docker.internal,1433" \ --user "FastUser" \ --password "FastPassword" \ --database "tpch_test" \ --query "SELECT * FROM dbo.orders WHERE year(o_orderdate)=1998" \ --fileoutput "orders.parquet" \ --directory "s3://arpeioftoutput/dockertest/" \ --paralleldegree 12 \ --parallelmethod "Ntile" \ --distributekeycolumn "o_orderkey" \ --merge false \ --license "$licenseContent" ``` ### Example 2: SQL Server → CSV with Custom Logging[​](#example-2-sql-server--csv-with-custom-logging "Direct link to Example 2: SQL Server → CSV with Custom Logging") ``` export licenseContent=$(cat ./FastBCP.lic) docker run --rm \ -v fastbcp-config:/config \ -v fastbcp-data:/data \ -v fastbcp-logs:/logs \ arpeio/fastbcp:latest \ --settingsfile "/config/FastBCP_Settings_Logs_To_Files.json" \ --connectiontype "mssql" \ --server "host.docker.internal,1433" \ --user "FastUser" \ --password "FastPassword" \ --database "tpch_test" \ --query "SELECT * FROM dbo.orders WHERE year(o_orderdate)=1998" \ --fileoutput "orders.csv" \ --directory "/data/orders/csv" \ --delimiter "|" \ --decimalseparator "." \ --dateformat "yyyy-MM-dd HH:mm:ss" \ --paralleldegree 12 \ --parallelmethod "Ntile" \ --distributekeycolumn "o_orderkey" \ --merge false \ --license "$licenseContent" ``` ### Example 3: PostgreSQL → Parquet on Azure Data Lake Storage (ADLS)[​](#example-3-postgresql--parquet-on-azure-data-lake-storage-adls "Direct link to Example 3: PostgreSQL → Parquet on Azure Data Lake Storage (ADLS)") ``` export licenseContent=$(cat ./FastBCP.lic) export adlscontainer="arpeioadlseu" docker run --rm \ -e AZURE_CLIENT_ID=${AZURE_CLIENT_ID} \ -e AZURE_TENANT_ID=${AZURE_TENANT_ID} \ -e AZURE_CLIENT_SECRET=${AZURE_CLIENT_SECRET} \ arpeio/fastbcp:latest \ --connectiontype "pgcopy" \ --server "host.docker.internal:15432" \ --user "FastUser" \ --password "FastPassword" \ --database "tpch" \ --sourceschema "tpch_10" \ --sourcetable "orders" \ --query "SELECT * FROM tpch_10.orders WHERE o_orderdate >= '1998-01-01' AND o_orderdate < '1999-01-01'" \ --fileoutput "orders.parquet" \ --directory "abfss://${adlscontainer}.dfs.core.windows.net/fastbcpoutput/testdfs/orders" \ --paralleldegree -2 \ --parallelmethod "Physical" \ --license "$licenseContent" ``` ### Example 4: Oracle → Parquet on Google Cloud Storage (GCS)[​](#example-4-oracle--parquet-on-google-cloud-storage-gcs "Direct link to Example 4: Oracle → Parquet on Google Cloud Storage (GCS)") ``` export licenseContent=$(cat ./FastBCP.lic) export gcsbucket="arpeio-gcs-bucket" export GOOGLE_APPLICATION_CREDENTIALS_JSON=$(cat ./gcp-credentials.json) docker run --rm \ -e GOOGLE_APPLICATION_CREDENTIALS="${GOOGLE_APPLICATION_CREDENTIALS_JSON}" \ arpeio/fastbcp:latest \ --connectiontype "oraodp" \ --server "host.docker.internal:1521/FREEPDB1" \ --user "TPCH_IN" \ --password "TPCH_IN" \ --database "FREEPDB1" \ --sourceschema "TPCH_IN" \ --sourcetable "ORDERS" \ --fileoutput "orders.parquet" \ --directory "gs://${gcsbucket}/fastbcpoutput/testgs/orders" \ --parallelmethod "Physical" \ --paralleldegree -2 \ --license "$licenseContent" ``` ## Volumes[​](#volumes "Direct link to Volumes") The Docker image declares several volumes to organize data and configuration: ``` VOLUME ["/config", "/data", "/work", "/logs"] ``` ### Volume Configuration and Access Modes[​](#volume-configuration-and-access-modes "Direct link to Volume Configuration and Access Modes") | **Volume** | **Purpose** | **Access Mode** | **Notes** | | ---------- | ------------------------------------------------------------------- | --------------------- | ----------------------------------------------- | | `/config` | Contains user-provided configuration files (e.g., Serilog settings) | Read-only / Read-many | Shared across multiple containers; not modified | | `/data` | Input/output data directory | 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 FastBCP Logging[​](#configuring-fastbcp-logging "Direct link to Configuring FastBCP Logging") info Available starting from version v0.28.3 FastBCP supports custom logging configuration through an external Serilog settings file in JSON format. This allows you to control how and where logs are written — to the console, to files, or dynamically per run. You can download an example logging settings file directly from GitHub: [FastBCP\_Settings\_Logs\_To\_Files.json](https://raw.githubusercontent.com/aetperf/FastBCP-Image/main/FastBCP_Settings_Logs_To_Files.json) Custom settings files must be mounted into the container under the `/config` directory. ### 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") The following configuration is recommended for most production or Airflow environments. It writes: * Logs to the console for real-time visibility * Run summary logs to `/airflow/xcom/return.json` for Airflow integration * Per-run logs under `/logs`, automatically named with `{LogTimestamp}` and `{TraceId}` ``` { "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": "FastBCP" } } } ``` Important Notes * If a target directory (such as `/logs` or `/airflow/xcom`) does not exist, FastBCP 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") You can use the following placeholders to dynamically generate log file names or directories: | **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") Your Serilog configuration file (for example, `FastBCP_Settings_Logs_To_Files.json`) must be placed in `/config`, either by mounting a local directory or by using a Docker named volume. Example with named volumes: ``` # First, copy your config file to a volume location cp ~/FastBCP_Settings_Logs_To_Files.json /volumes/fastbcp-config/ # Then run FastBCP with mounted volumes docker run --rm \ -v fastbcp-config:/config \ -v fastbcp-data:/data \ -v fastbcp-logs:/logs \ arpeio/fastbcp:latest \ --settingsfile "/config/FastBCP_Settings_Logs_To_Files.json" \ --connectiontype "mssql" \ --server "host.docker.internal,1433" \ --user "FastUser" \ --password "FastPassword" \ --database "tpch_test" \ --query "SELECT * FROM dbo.orders" \ --fileoutput "orders.csv" \ --directory "/data" \ --paralleldegree 12 \ --parallelmethod "Ntile" \ --distributekeycolumn "o_orderkey" \ --merge false \ --license "$licenseContent" ``` If the `--settingsfile` argument is not provided, FastBCP will use its built-in default logging configuration. --- # Kestra [Kestra](https://kestra.io/) is a powerful open-source orchestration platform that can be used to automate and schedule FastBCP data export workflows. FastBCP can be seamlessly integrated into Kestra flows using its Docker image. ## Docker Image[​](#docker-image "Direct link to Docker Image") FastBCP provides an official Docker image available on Docker Hub: **Image:** `arpeio/fastbcp:latest`
**Repository:** ## Integration with Docker Run Plugin[​](#integration-with-docker-run-plugin "Direct link to Integration with Docker Run Plugin") The [`io.kestra.plugin.docker.Run`](https://kestra.io/plugins/plugin-docker/io.kestra.plugin.docker.run) plugin provides a direct way to execute FastBCP commands in a Docker container. This is the recommended method for integrating FastBCP with Kestra. ### Basic Example[​](#basic-example "Direct link to Basic Example") ``` id: fastbcp_export_orders namespace: arpe.io tasks: - id: export_orders_parquet type: io.kestra.plugin.docker.Run containerImage: arpeio/fastbcp:latest host: "tcp://host.docker.internal:2375" commands: - --connectiontype - mssql - --server - "host.docker.internal,11433" - --user - FastLogin - --password - FastPassword - --database - tpch10 - --sourceschema - dbo - --sourcetable - orders - --fileoutput - orders.parquet - --directory - /data/export - --parallelmethod - Ntile - --paralleldegree - "12" - --distributekeycolumn - o_orderkey - --nobanner ``` **Key Parameters:** * `containerImage`: Specifies the FastBCP Docker image * `host`: Docker daemon endpoint (required for Docker Run plugin) * `commands`: Array of FastBCP CLI arguments ## Environment Variables for Cloud Storage[​](#environment-variables-for-cloud-storage "Direct link to Environment Variables for Cloud Storage") When exporting data to cloud storage (AWS S3, Azure Blob, Google Cloud Storage), you can pass cloud credentials using environment variables (see [Cloud Connectivity](/1.5/documentation/cloud-connectivity/overview.md) for more details). ### Example with AWS S3[​](#example-with-aws-s3 "Direct link to Example with AWS S3") ``` id: fastbcp_export_to_s3 namespace: arpe.io tasks: - id: export_orders_to_s3 type: io.kestra.plugin.docker.Run containerImage: arpeio/fastbcp:latest host: "tcp://host.docker.internal:2375" env: AWS_ACCESS_KEY_ID: "AKIAIOSFODNN7EXAMPLE" AWS_SECRET_ACCESS_KEY: "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY" AWS_DEFAULT_REGION: "us-east-1" commands: - --connectiontype - mssql - --server - "host.docker.internal,11433" - --user - FastLogin - --password - FastPassword - --database - tpch10 - --sourceschema - dbo - --sourcetable - orders - --fileoutput - orders.parquet - --directory - s3://my-bucket/exports/orders - --parallelmethod - Ntile - --paralleldegree - "12" - --distributekeycolumn - o_orderkey - --merge - "false" - --nobanner ``` ## 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, connection strings, and cloud credentials, 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: * `FASTBCP_MSSQL_USER` * `FASTBCP_MSSQL_PASSWORD` * `FASTBCP_AWS_ACCESS_KEY_ID` * `FASTBCP_AWS_SECRET_ACCESS_KEY` * `FASTBCP_AWS_DEFAULT_REGION` ### Example with Secrets[​](#example-with-secrets "Direct link to Example with Secrets") ``` id: fastbcp_export_orders_s3_secret namespace: arpe.io tasks: - id: export_orders_parquet_to_s3 type: io.kestra.plugin.docker.Run containerImage: arpeio/fastbcp:latest host: "tcp://host.docker.internal:2375" env: AWS_ACCESS_KEY_ID: "{{ secret('FASTBCP_AWS_ACCESS_KEY_ID') }}" AWS_SECRET_ACCESS_KEY: "{{ secret('FASTBCP_AWS_SECRET_ACCESS_KEY') }}" AWS_DEFAULT_REGION: "{{ secret('FASTBCP_AWS_DEFAULT_REGION') }}" commands: - --connectiontype - mssql - --server - "host.docker.internal,11433" - --user - "{{ secret('FASTBCP_MSSQL_USER') }}" - --password - "{{ secret('FASTBCP_MSSQL_PASSWORD') }}" - --database - tpch10 - --sourceschema - dbo - --sourcetable - orders - --fileoutput - orders.parquet - --directory - s3://fastbcp-export/orders/parquet - --parallelmethod - Ntile - --paralleldegree - "12" - --distributekeycolumn - o_orderkey - --merge - "false" - --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 FastBCP 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 export process, including configuration parameters, connection details, data export progress, and performance metrics. ### Example Log Output[​](#example-log-output "Direct link to Example Log Output") ``` 2026-03-02T15:15:37.882 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- The "FastBCP_Settings.json" file does not exist. Using default settings. Console Only with loglevel=Information 2026-03-02 16:15:37.8922026-03-02T15:15:37.892 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- FastBCP Trial – will expires on "2026‑03‑27" (24 day(s) left). 2026-03-02 16:15:37.8922026-03-02T15:15:37.892 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Starting 2026-03-02 16:15:37.8932026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- FastBCP Version : "0.29.2.0" Architecture : "X64" - Framework : ".NET 8.0.24" 2026-03-02 16:15:37.8932026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Internal Trace ID : "5ccea857-1538-4a28-8b1c-cfe5c51fbd43" 2026-03-02 16:15:37.8932026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Internal Run ID : "5ccea857-1538-4a28-8b1c-cfe5c51fbd43" 2026-03-02 16:15:37.8932026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- OS : "Debian GNU/Linux 13 (trixie)" 2026-03-02 16:15:37.8932026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Connection Type : "mssql" 2026-03-02 16:15:37.8932026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Source SqlInstance : "sql22,1433" 2026-03-02 16:15:37.8932026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Source Database : "tpch" 2026-03-02 16:15:37.8932026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Source Schema : "tpch10" 2026-03-02 16:15:37.8932026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Source Table : "orders" 2026-03-02 16:15:37.8932026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Trusted Connection : False 2026-03-02 16:15:37.8932026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- User : "migadmin" 2026-03-02 16:15:37.8932026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Output File : "orders.parquet" 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Output Directory : /data/parquet 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Degree : 12 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Distribute Method : "Ntile" 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Distribute Column : "o_orderkey" 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Decimal Separator : "," 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Delimiter : "|" 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Use quotes : False 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Date format: "yyyy-MM-dd" 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Encoding : "UTF-8" 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- No Header : False 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Timestamped : False 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Boolean Format : "automatic" 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Cloud Profile : "" 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Application Intent : "ReadOnly" 2026-03-02 16:15:37.9062026-03-02T15:15:37.906 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- file extension is ".parquet" 2026-03-02 16:15:37.9092026-03-02T15:15:37.909 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Encoding used : Unicode (UTF-8) - 65001 - utf-8 2026-03-02 16:15:37.9652026-03-02T15:15:37.965 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- 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=FastBCP;Application Intent=ReadOnly" 2026-03-02 16:15:38.0862026-03-02T15:15:38.086 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- 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 16:15:38.1102026-03-02T15:15:38.110 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Get DataTypes with header end : Elapsed=6 ms 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Data Segments Computation Completed in 260 ms 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Distribute Column Type : "Int32" 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 0 : 1 : 1 - 5000001 or "o_orderkey" is null 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 1 : 2 : 5000002 - 10000002 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 2 : 3 : 10000003 - 15000003 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 3 : 4 : 15000004 - 20000004 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 4 : 5 : 20000005 - 25000005 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 5 : 6 : 25000006 - 30000006 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 6 : 7 : 30000007 - 35000007 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 7 : 8 : 35000032 - 40000032 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 8 : 9 : 40000033 - 45000033 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 9 : 10 : 45000034 - 50000034 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 10 : 11 : 50000035 - 55000035 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 11 : 12 : 55000036 - 60000000 2026-03-02 16:15:46.6112026-03-02T15:15:46.611 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 002 for o_orderkey between 10000003 and 15000003 into /data/parquet/orders_chunk_002.parquet : 1250001 rows x 9 columns in 8234ms 2026-03-02 16:15:46.6112026-03-02T15:15:46.611 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 011 for o_orderkey between 55000036 and 60000000 into /data/parquet/orders_chunk_011.parquet : 1249989 rows x 9 columns in 8234ms 2026-03-02 16:15:46.7902026-03-02T15:15:46.790 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 003 for o_orderkey between 15000004 and 20000004 into /data/parquet/orders_chunk_003.parquet : 1250001 rows x 9 columns in 8413ms 2026-03-02 16:15:46.7972026-03-02T15:15:46.797 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 005 for o_orderkey between 25000006 and 30000006 into /data/parquet/orders_chunk_005.parquet : 1250001 rows x 9 columns in 8420ms 2026-03-02 16:15:46.9362026-03-02T15:15:46.936 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 008 for o_orderkey between 40000033 and 45000033 into /data/parquet/orders_chunk_008.parquet : 1250001 rows x 9 columns in 8559ms 2026-03-02 16:15:47.1392026-03-02T15:15:47.139 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 010 for o_orderkey between 50000035 and 55000035 into /data/parquet/orders_chunk_010.parquet : 1250001 rows x 9 columns in 8763ms 2026-03-02 16:15:47.1542026-03-02T15:15:47.154 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 000 for o_orderkey between 1 and 5000001 into /data/parquet/orders_chunk_000.parquet : 1250001 rows x 9 columns in 8777ms 2026-03-02 16:15:47.2472026-03-02T15:15:47.247 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 009 for o_orderkey between 45000034 and 50000034 into /data/parquet/orders_chunk_009.parquet : 1250001 rows x 9 columns in 8870ms 2026-03-02 16:15:47.3082026-03-02T15:15:47.308 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 006 for o_orderkey between 30000007 and 35000007 into /data/parquet/orders_chunk_006.parquet : 1250001 rows x 9 columns in 8931ms 2026-03-02 16:15:47.3092026-03-02T15:15:47.309 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 001 for o_orderkey between 5000002 and 10000002 into /data/parquet/orders_chunk_001.parquet : 1250001 rows x 9 columns in 8932ms 2026-03-02 16:15:47.3632026-03-02T15:15:47.363 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 007 for o_orderkey between 35000032 and 40000032 into /data/parquet/orders_chunk_007.parquet : 1250001 rows x 9 columns in 8986ms 2026-03-02 16:15:47.3662026-03-02T15:15:47.366 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 004 for o_orderkey between 20000005 and 25000005 into /data/parquet/orders_chunk_004.parquet : 1250001 rows x 9 columns in 8989ms 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- files generation end : Elapsed=9257 ms - maxdop=12 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total data rows : 15000000 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total data columns : 9 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total cells : 135000000 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Throughput rows : 1568531 rows/s 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Throughput cells : 14116787 cells/s 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total time : Elapsed=9563 ms 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total data rows : 15000000 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total data columns : 9 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total cells : 135000000 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Final Throughput rows : 1568482 rows/s 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Final Throughput cells : 14116346 cells/s 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Completed Load ``` --- # PostgreSQL The **pg\_fastbcp** extension allows you to run the FastBCP tool directly from an SQL function, enabling fast data export from databases to various formats (CSV, Parquet) and cloud storage directly from PostgreSQL. ## Extension Overview[​](#extension-overview "Direct link to Extension Overview") * **Repository**: [arpe-io/pg\_fastbcp](https://github.com/arpe-io/pg_fastbcp) * **License**: MIT * **Latest version**: v0.30.0 * **Platforms**: Linux (Debian/Ubuntu) and Windows ![pg\_fastbcp Demo](/assets/images/pg_fastbcp-e5e0b5519f8de77a14a8f8cba33d251c.gif) ## Features[​](#features "Direct link to Features") * **Native PostgreSQL Integration**: Execute FastBCP commands directly from SQL * **Secure Password Management**: Built-in encryption for sensitive credentials * **Detailed Result Return**: Get export statistics and performance metrics as SQL results * **Cross-Platform**: Available for both Linux and Windows environments * **Flexible Configuration**: Support for all FastBCP parameters * **Multiple Output Formats**: Export to CSV, Parquet, or directly to cloud storage (AWS S3, Azure Blob, Google Cloud Storage, OneLake) ## Prerequisites[​](#prerequisites "Direct link to Prerequisites") * PostgreSQL 15, 16, 17, or 18 * Sudo/Administrator privileges to install the extension * Valid FastBCP license (request a [trial license](https://arpe.io/get-trial?product=FastBCP)) * FastBCP 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 `FastBCP` 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\_fastbcp releases page](https://github.com/arpe-io/pg_fastbcp/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_fastbcp.so` * `pg_fastbcp.control` * `pg_fastbcp--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_fastbcp.so /usr/lib/postgresql//lib/ sudo cp pg_fastbcp.control pg_fastbcp--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 FastBCP binary sudo chmod +x /path/to/FastBCP sudo chown postgres:postgres /path/to/FastBCP sudo chmod 750 /path/to/FastBCP # 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_fastbcp.dll` * `pg_fastbcp.control` * `pg_fastbcp--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_fastbcp.dll` file into the `lib` folder 4. Copy the `pg_fastbcp.control` and `pg_fastbcp--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 `FastBCP.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_fastbcp CASCADE; ``` ### Create the extension[​](#create-the-extension "Direct link to Create the extension") ``` CREATE EXTENSION pg_fastbcp CASCADE; ``` ## Functions[​](#functions "Direct link to Functions") ### pg\_fastbcp\_encrypt[​](#pg_fastbcp_encrypt "Direct link to pg_fastbcp_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_RunFastBcp_secure` function will automatically decrypt any values passed to its `password` argument. **Syntax:** ``` pg_fastbcp_encrypt(text_to_encrypt text) RETURNS text ``` **Example:** ``` SELECT pg_fastbcp_encrypt('MySecurePassword'); -- Returns: A base64-encoded encrypted string, e.g., "PgP...base64encodedstring==" ``` ### xp\_RunFastBcp\_secure[​](#xp_runfastbcp_secure "Direct link to xp_RunFastBcp_secure") This is the main function to execute the FastBCP tool. It takes various parameters to configure the data export operation. Password arguments (`password`) will be automatically decrypted. **Syntax:** ``` xp_RunFastBcp_secure( connectiontype text DEFAULT NULL, sourceconnectstring text DEFAULT NULL, dsn text DEFAULT NULL, provider text DEFAULT NULL, server text DEFAULT NULL, user_ text DEFAULT NULL, password text DEFAULT NULL, trusted boolean DEFAULT NULL, database_name text DEFAULT NULL, applicationintent text DEFAULT NULL, fileinput text DEFAULT NULL, query text DEFAULT NULL, sourceschema text DEFAULT NULL, sourcetable text DEFAULT NULL, fileoutput text DEFAULT NULL, directory text DEFAULT NULL, timestamped boolean DEFAULT NULL, encoding text DEFAULT NULL, delimiter text DEFAULT NULL, usequotes boolean DEFAULT NULL, dateformat text DEFAULT NULL, decimalseparator text DEFAULT NULL, boolformat text DEFAULT NULL, noheader boolean DEFAULT NULL, parquetcompression text DEFAULT NULL, cloudprofile text DEFAULT NULL, parallelmethod text DEFAULT NULL, paralleldegree integer DEFAULT NULL, distributekeycolumn text DEFAULT NULL, datadrivenquery text DEFAULT NULL, merge boolean DEFAULT NULL, loglevel text DEFAULT NULL, runid text DEFAULT NULL, settingsfile text DEFAULT NULL, config text DEFAULT NULL, nobanner boolean DEFAULT NULL, license text DEFAULT NULL, fastbcp_path text DEFAULT NULL ) RETURNS TABLE ( exit_code integer, output text, total_rows bigint, total_columns integer, total_time bigint ) ``` ## Usage Examples[​](#usage-examples "Direct link to Usage Examples") ### Linux Example - PostgreSQL to CSV[​](#linux-example---postgresql-to-csv "Direct link to Linux Example - PostgreSQL to CSV") Export data from PostgreSQL to CSV files: ``` SELECT * FROM xp_RunFastBcp_secure( connectiontype := 'pgsql', server := 'localhost:5432', user_ := 'postgres', password := pg_fastbcp_encrypt('MyActualPassword'), database_name := 'tpch', sourceschema := 'tpch_1', sourcetable := 'orders', fileoutput := 'orders.csv', directory := '/tmp/export', paralleldegree := 4, parallelmethod := 'Ntile', distributekeycolumn := 'o_orderkey', noheader := false, delimiter := ',', license := '/tmp/FastBCP_linux-x64_v0.30.0/FastBCP.lic', loglevel := 'information', nobanner := false, fastbcp_path := '/tmp/FastBCP_linux-x64_v0.30.0' ); ``` ## 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 FastBCP process. | | `output` | text | The full log output from the FastBCP tool. | | `total_rows` | bigint | The total number of rows transferred. | | `total_columns` | integer | The total number of columns transferred. | | `total_time` | bigint | The total execution time in milliseconds. | ## Output[​](#output "Direct link to Output") You can view the full FastBCP output using the `output` column returned by the function. ## Resources[​](#resources "Direct link to Resources") * [pg\_fastbcp GitHub Repository](https://github.com/arpe-io/pg_fastbcp) * [FastBCP Documentation](https://fastbcp-docs.arpe.io/1.2/integration/postgresql-integration) * [Get a Trial License](https://arpe.io/get-trial?product=FastBCP) * [Report Issues](https://github.com/arpe-io/pg_fastbcp/issues) --- # Release Notes 0.32 ## New Features[​](#new-features "Direct link to New Features") ### OpenTelemetry Support[​](#opentelemetry-support "Direct link to OpenTelemetry Support") FastBCP now supports [OpenTelemetry](https://opentelemetry.io/) for distributed tracing and log correlation. **New parameter:** * `--traceparent`: Accept a [W3C Trace Context](https://www.w3.org/TR/trace-context/) traceparent identifier from an external caller, enabling end-to-end trace correlation across distributed systems. **OpenTelemetry log export:** * Logs can be exported to any OpenTelemetry-compatible collector (e.g., Jaeger, Zipkin, Grafana Tempo) via the Serilog OpenTelemetry sink. * Configuration through environment variables or the `FastBCP_Settings.json` file. See the [OpenTelemetry logging documentation](/1.5/documentation/logging/OpenTelemetry.md) for setup details and examples. ### Gzip Compression[​](#gzip-compression "Direct link to Gzip Compression") **Streamed gzip compression** is now possible by adding `.gz` to file extension. For csv, tsv and json only. * use `--fileoutput file.csv.gz` ### BREAKING CHANGE[​](#breaking-change "Direct link to BREAKING CHANGE") * `--merge` default is Switched from `true` to `false` ### Others[​](#others "Direct link to Others") * Better datatypes coverage for csv and json --- # Release Notes 1.0 ## What's Changed[​](#whats-changed "Direct link to What's Changed") ### ADBC Parquet Export - 2x Faster Performance[​](#adbc-parquet-export---2x-faster-performance "Direct link to ADBC Parquet Export - 2x Faster Performance") FastBCP now supports ADBC (Arrow Database Connectivity) for Parquet exports via the `--connectiontype adbc_mssql` connector, powered by ArrowTDS. **Performance improvements:** * 2x faster Parquet generation compared to traditional methods * Native columnar data format (Arrow) eliminates conversion overhead * Optimized for SQL Server data types **Usage:** ``` fastbcp --server myserver.database.windows.net \ --database MyDatabase \ --query "SELECT * FROM Sales.Orders" \ --connectiontype adbc_mssql \ --fileoutput "orders.parquet" ``` See [Connection Parameters documentation](/1.5/documentation/cli/connection_parameters.md#connection-type) for more details. ### Buffered Cloud Uploads[​](#buffered-cloud-uploads "Direct link to Buffered Cloud Uploads") New environment variables enable buffered cloud uploads for significantly improved Azure Data Lake Storage and OneLake performance. **New environment variables:** * `FASTBCP_CLOUD_ISBUFFERED`: When `True`, ADLS/OneLake writes are buffered to a local temp file, then uploaded in parallel. When `False`, data is streamed directly to the cloud. * `FASTBCP_TMPPATH`: Base directory for temporary files created during buffered cloud uploads. Default: System temp (`%TEMP%` / `$TMPDIR`). * `FASTBCP_CLOUD_MAXUPLOADTHREAD_PER_STREAM`: Maximum number of parallel upload threads per cloud stream. Default: `8` if `parallelmethod=None`, `2` otherwise. * `FASTBCP_UID_STRING_CASING`: Controls UID-to-string casing. Values: `lower` or `upper`. Default: `lower` (RFC 4122). **Example — Buffered cloud uploads:** ``` # Enable buffered uploads for Azure $env:FASTBCP_CLOUD_ISBUFFERED = "True" $env:FASTBCP_TMPPATH = "D:\temp\fastbcp" fastbcp --server myserver --database MyDB --sourceschema Sales --sourcetable Orders ` --fileoutput "abfss://container@storage.dfs.core.windows.net/orders.parquet" ``` **Example — UID string casing (PowerShell):** ``` # Output UIDs in uppercase $env:FASTBCP_UID_STRING_CASING = "upper" fastbcp --server myserver --database MyDB --sourcetable MyTable --fileoutput "output.parquet" ``` **Example — UID string casing (Linux):** ``` # Output UIDs in uppercase export FASTBCP_UID_STRING_CASING=upper fastbcp --server myserver --database MyDB --sourcetable MyTable --fileoutput "output.parquet" ``` See the [Environment Variables](/1.5/documentation/environment-variables/overview.md) documentation for detailed configuration. ### Move to .NET 10[​](#move-to-net-10 "Direct link to Move to .NET 10") FastBCP now runs on .NET 10: * Performance improvements in runtime and GC * Enhanced security and stability * Continued long-term support * Compatibility: Windows, Linux, macOS (x64, ARM64) ### Improved SBOM Generation[​](#improved-sbom-generation "Direct link to Improved SBOM Generation") Enhanced Software Bill of Materials (SBOM) generation for better supply chain security and compliance. ### SLSA Build Provenance[​](#slsa-build-provenance "Direct link to SLSA Build Provenance") Added SLSA (Supply-chain Levels for Software Artifacts) build provenance in CI for enhanced supply chain security and compliance. ### Early Cleanup of Temp Files[​](#early-cleanup-of-temp-files "Direct link to Early Cleanup of Temp Files") When uploading to cloud storage, temporary files are now cleaned up earlier in the process to reduce disk space requirements. ## ArrowTDS ARPE.IO Driver[​](#arrowtds-arpeio-driver "Direct link to ArrowTDS ARPE.IO Driver") FastBCP 1.0 includes the ArrowTDS ARPE.IO driver for high-performance ADBC connectivity. **Key features:** * TDS 7.4 protocol compatibility * Native Arrow columnar format support * Optimized for SQL Server 2012 and later --- # Release Notes 1.1 ## What's Changed[​](#whats-changed "Direct link to What's Changed") ### ADBC PostgreSQL — Arpe.io ADBC FastDriver[​](#adbc-postgresql--arpeio-adbc-fastdriver "Direct link to ADBC PostgreSQL — Arpe.io ADBC FastDriver") FastBCP now supports ADBC for PostgreSQL via the `--connectiontype adbc_pgsql` connector, powered by the new ADBC Arrow\_FEBE drivers (Arpe.io ADBC FastDriver). **Key highlights:** * Ultra-fast Parquet exports from PostgreSQL * Native Arrow columnar format eliminates conversion overhead * Same high-performance ADBC approach as the existing `adbc_mssql` connector **Usage:** ``` fastbcp --server pg-server:5432 \ --database MyDatabase \ --query "SELECT * FROM public.orders" \ --connectiontype adbc_pgsql \ --fileoutput "orders.parquet" ``` See [Connection Parameters documentation](/1.5/documentation/cli/connection_parameters.md#connection-type) for more details. ### \[Breaking] New Default Date Format[​](#breaking-new-default-date-format "Direct link to \[Breaking] New Default Date Format") The default `--dateformat` value for CSV, JSON, and XLSX outputs has changed from `yyyy-MM-dd` to `yyyy-MM-dd HH:mm:sszzz`. **Auto-adaptive behavior:** The format automatically adapts based on the column type: * **Date-only** columns remain formatted as `yyyy-MM-dd` * **Timestamp/DateTime** columns are formatted as `yyyy-MM-dd HH:mm:ss` even if a timezone token (`zzz`) is in the format string * **DateTimeOffset** columns include the full timezone offset This change also fixes date-only format handling and adds timezone support for CSV date formatting. **Migration:** If your pipeline depends on the previous default (`yyyy-MM-dd`), explicitly set `--dateformat "yyyy-MM-dd"` in your command. ### New Boolean Format Values[​](#new-boolean-format-values "Direct link to New Boolean Format Values") The `--boolformat` parameter now supports additional formats: | Format | Example output | | ------------ | --------------- | | `True/False` | `True`, `False` | | `yes/no` | `yes`, `no` | | `y/n` | `y`, `n` | These are in addition to the existing `true/false`, `t/f`, and `1/0` formats. **Example:** ``` fastbcp --server myserver \ --database MyDatabase \ --query "SELECT * FROM products" \ --fileoutput "products.csv" \ --boolformat "True/False" ``` ### Environment Variables Guardrails[​](#environment-variables-guardrails "Direct link to Environment Variables Guardrails") Security hardening of environment variable handling (internal improvement), with no user-facing impact. --- # Release Notes 1.2 ## What's Changed[​](#whats-changed "Direct link to What's Changed") ### ADBC Oracle — Arpe.io ADBC FastDriver[​](#adbc-oracle--arpeio-adbc-fastdriver "Direct link to ADBC Oracle — Arpe.io ADBC FastDriver") FastBCP now supports ADBC for Oracle via the `--connectiontype adbc_oracle` connector, powered by the new ADBC Arrow\_TTC driver (Arpe.io ADBC FastDriver). It speaks Oracle's TNS/TTC wire protocol natively — no Oracle Client / Instant Client required. **Key highlights:** * Ultra-fast Parquet exports from Oracle * Native Arrow columnar format eliminates conversion overhead * Same high-performance ADBC approach as the existing `adbc_mssql` and `adbc_pgsql` connectors * EZConnect source syntax (`host[:port]/service`) * Supports the `Rowid` parallel method for parallel extraction, in addition to `oraodp` * Parquet is the only supported output format for this connector See [Connection Parameters documentation](/1.5/documentation/cli/connection_parameters.md#connection-type) for more details. ### New Environment Variables[​](#new-environment-variables "Direct link to New Environment Variables") Added three new environment variables: * `FASTBCP_ADBC_BATCHCELLS`: controls the size (in cells, i.e. rows × columns) of the Arrow record batches fetched by the ADBC connectors (`adbc_mssql`, `adbc_pgsql`). **Default:** `500000` (500,000 cells). Sizing by cell count keeps batch memory usage predictable across tables of different widths. See the [FASTBCP\_ADBC\_BATCHCELLS documentation](/1.5/documentation/environment-variables/fastbcp-adbc-batchcells.md) for details. * `FASTBCP_SYSTEMINFO_COLLECT`: collects system information (CPU, memory, OS, etc.) while a run is in progress. **Disabled by default.** See the [FASTBCP\_SYSTEMINFO\_COLLECT documentation](/1.5/documentation/environment-variables/fastbcp-systeminfo-collect.md) for details. * `FASTBCP_PERFORMANCE_COLLECT`: collects performance information (CPU usage, memory usage, etc.) while a run is in progress. **Disabled by default.** See the [FASTBCP\_PERFORMANCE\_COLLECT documentation](/1.5/documentation/environment-variables/fastbcp-performance-collect.md) for details. To enable system and performance diagnostics collection: * Windows * Linux ``` $env:FASTBCP_SYSTEMINFO_COLLECT = $True $env:FASTBCP_PERFORMANCE_COLLECT = $True ``` ``` export FASTBCP_SYSTEMINFO_COLLECT=True export FASTBCP_PERFORMANCE_COLLECT=True ``` ## Bug Fixes[​](#bug-fixes "Direct link to Bug Fixes") ### ODBC with DSN — Login/Password Authentication[​](#odbc-with-dsn--loginpassword-authentication "Direct link to ODBC with DSN — Login/Password Authentication") Fixed an issue where the `odbc` connection type with a DSN (`--dsn`) only worked with integrated (Windows/trusted) authentication. Providing explicit `--user` / `--password` credentials had no effect and the connection silently fell back to integrated authentication. DSN connections now correctly authenticate with the supplied login/password. ### ADBC MSSQL — Column Limit Raised[​](#adbc-mssql--column-limit-raised "Direct link to ADBC MSSQL — Column Limit Raised") Fixed a limitation in the `adbc_mssql` connector that restricted exports to tables with fewer than 256 columns. The limit has been raised to support standard tables with up to 1024 columns. --- # Release Notes 1.3 ## New Features[​](#new-features "Direct link to New Features") ### ADBC Netezza — `--connectiontype adbc_netezza`[​](#adbc-netezza----connectiontype-adbc_netezza "Direct link to adbc-netezza----connectiontype-adbc_netezza") FastBCP now supports Netezza / IBM NPS through the embedded **ArpeNetezza** ADBC driver, via the new `--connectiontype adbc_netezza` connection type. The driver is used for both the metadata step and the data step. **Key highlights:** * No NZdotNET installation needed * Works with **IBM Cloud NPS** * Parquet output only, like the other `adbc_*` connection types * Supported parallel methods: `None`, `NZDataSlice`, `Ntile`, `Random`, `RangeId` and `DataDriven` * `Application Name` defaults to `FastBCP` * NPS 7.x: TLS 1.0/1.1 supported (`tls_min_version=1.0`, ArpeNetezza 0.3.2) **Connection string keys:** `--sourceconnectstring` keys no longer need the `adbc.arpenz.` prefix. The following are all accepted: * Friendly / ADO.NET keys: `Server`, `Host`, `host:port`, `Port`, `Database`, `User ID`, `Password`, `SSL Mode`, `Application Name`, … * Plain driver keys: `sslmode`, `tls_min_version`, `char_encoding`, `login_timeout`, … * `uri` and `connection_string` Keys the driver does not support (e.g. `propagate`, `Pooling`) are ignored, with a single warning. * Windows * Linux ``` .\FastBCP.exe ` --connectiontype adbc_netezza ` --sourceconnectstring "Server=nps-host;Port=5480;Database=SALES;User ID=admin;Password=FastPassword" ` --sourceschema "ADMIN" ` --sourcetable "ORDERS" ` --directory "D:\export\orders" ` --fileoutput "orders.parquet" ` --parallelmethod NZDataSlice ` --paralleldegree 8 ``` ``` ./FastBCP \ --connectiontype adbc_netezza \ --sourceconnectstring "Server=nps-host;Port=5480;Database=SALES;User ID=admin;Password=FastPassword" \ --sourceschema "ADMIN" \ --sourcetable "ORDERS" \ --directory "/data/export/orders" \ --fileoutput "orders.parquet" \ --parallelmethod NZDataSlice \ --paralleldegree 8 ``` NPS 7 pre-releases Files exported from NPS 7 with the pre-releases `v1.3.0-netezza.1` / `v1.3.0-netezza.2` may contain wrong values in `NUMERIC` columns. This is fixed in ArpeNetezza 0.3.3, shipped with FastBCP 1.3. Re-export the affected tables. See [Connection Parameters](/1.5/documentation/cli/connection_parameters.md#connection-type) for more details. ### New Parallel Method — `DBPartition`[​](#new-parallel-method--dbpartition "Direct link to new-parallel-method--dbpartition") The new `--parallelmethod DBPartition` parallel method runs one extraction per native partition / subpartition of the source table. **Supported sources:** | Source | Partitioning used | | ---------- | --------------------------------------------- | | SQL Server | `$PARTITION` | | PostgreSQL | Leaf tables | | Oracle | `PARTITION (...)` | | MySQL | `PARTITION (...)` | | Teradata | Row partitioning, single- and multi-level PPI | The `adbc_*` counterparts are supported too. * Requires `--sourceschema` and `--sourcetable`. * Falls back to `None`, with a warning, when the table is not partitioned, has a single partition, or the source is not supported. * Optimised partition scheduling (internal improvement). * `FASTBCP_DOP_EQUERY` also applies to `DBPartition`. The output layout is controlled by the new [`FASTBCP_DBPARTITION_TARGET_MODE`](/1.5/documentation/environment-variables/fastbcp-dbpartition-target-mode.md) environment variable: | Value | Output layout | | ----------------- | --------------------------------------------------------------------------------------------------------------------- | | `CHUNK` (default) | `_chunk_NNN.` | | `HIVE` | `partition=

/[subpartition=/].` (SQL Server uses `bounds=_`, Teradata `L1=/L2=`) | `--merge` works in both modes. See [Parallel Parameters](/1.5/documentation/cli/parallel_parameters.md#available-methods) for more details. ### Azure Blob Storage — Authentication and Container Access[​](#azure-blob-storage--authentication-and-container-access "Direct link to Azure Blob Storage — Authentication and Container Access") For direct commit to Azure Blob Storage: * **Authentication:** besides `DefaultAzureCredential` (still the fallback), FastBCP now accepts `AZURE_STORAGE_CONNECTION_STRING` or `AZURE_STORAGE_SAS_URL`. The selected authentication method is logged. * **Container access:** a missing *create* permission on the container (HTTP 403/409) is tolerated when the container already exists. 403 errors now give a clearer message (firewall, RBAC or SAS permissions). See [Azure Configuration](/1.5/documentation/cloud-connectivity/azure.md#authentication-methods) for more details. ### ADBC Connectors Improvements[​](#adbc-connectors-improvements "Direct link to ADBC Connectors Improvements") * **`--applicationintent` with `--connectiontype adbc_mssql`:** `--applicationintent` (default `ReadOnly`) and an `ApplicationIntent` key in `--sourceconnectstring` now reach the ArpeMSSQL driver. An Availability Group listener with read-only routing sends the export to a readable secondary, as with `--connectiontype mssql`. * **`--connectiontype adbc_pgsql` honours the libpq environment:** `PGUSER`, `PGPASSWORD`, `PGPASSFILE` / `~/.pgpass` and `PGSSLROOTCERT` are used when `--user` / `--password` / `--sourceconnectstring` do not provide them, like `--connectiontype pgsql` (ArpePGSQL 0.4.5). * **`--connectiontype adbc_oracle` resolves TNS aliases** through `tnsnames.ora` (`TNS_ADMIN`, `$ORACLE_HOME/network/admin`), like `--connectiontype oraodp` (ArpeOracle 0.3.11). ## Behaviour Changes[​](#behaviour-changes "Direct link to Behaviour Changes") ### `adbc_mssql` / `adbc_pgsql` / `adbc_oracle` Run Fully on ADBC[​](#adbc_mssql--adbc_pgsql--adbc_oracle-run-fully-on-adbc "Direct link to adbc_mssql--adbc_pgsql--adbc_oracle-run-fully-on-adbc") The metadata and planning step (row counts, column types, `Ntile`, `Random`, `Timepartition`, `DBPartition`, …) now runs on the ADBC driver instead of SqlClient, Npgsql or ODP.NET. A single connection string is used for both steps. * `--sourceconnectstring` accepts the native syntax, explicit `adbc.*` / `arpeio.*` keys (they win over translated keys), or a whole-connection `uri` / `adbc..connection_string`. * Native keys with no driver equivalent (e.g. `Pooling=false`) are dropped with a warning. With a whole-connection `uri` / `connection_string`, native keys are dropped with a warning saying to put them inside the URI / connection string. * A `Driver=` path in `--sourceconnectstring` is used by both steps. ### Oracle Network Encryption with `--connectiontype adbc_oracle`[​](#oracle-network-encryption-with---connectiontype-adbc_oracle "Direct link to oracle-network-encryption-with---connectiontype-adbc_oracle") FastBCP now sends `encryption=accepted` and `data_integrity=accepted`, so the server decides, as with `--connectiontype oraodp`. `FASTBCP_ADBC_ENCRYPTION` / `FASTBCP_ADBC_DATA_INTEGRITY` or explicit keys still override this. ### `--connectiontype adbc_pgsql` NUMERIC NaN[​](#--connectiontype-adbc_pgsql-numeric-nan "Direct link to --connectiontype-adbc_pgsql-numeric-nan") A `NaN` in a decimal column now fails the read instead of becoming `NULL`. Set `adbc.arpepgsql.numeric_special=null` in `--sourceconnectstring` to keep the previous behaviour (ArpePGSQL 0.4.2+). ### `adbc_oracle` DataDriven Keys[​](#adbc_oracle-datadriven-keys "Direct link to adbc_oracle-datadriven-keys") A scale-0 `NUMBER(<=18)` key is now treated as an integer, as with `--connectiontype oraodp`, so predicates and Hive paths are identical between both connection types. ### `NZDataSlice` Scheduling[​](#nzdataslice-scheduling "Direct link to nzdataslice-scheduling") Faster on uneven slices (internal improvement). After the first failure, no new slice starts. Output files are unchanged. ## Bug Fixes[​](#bug-fixes "Direct link to Bug Fixes") * **Ntile lost rows** (pre-existing): rows could be missing from the export in some cases; on Oracle, string keys failed. Fixed (internal improvement). * **Passwords in logs:** quoted passwords containing `;` (e.g. `Password="p;w=1"`) are now fully masked in logs and telemetry, for every connection type. * **`--connectiontype adbc_mssql` with a named instance:** `host\INSTANCE` connected to the instance on port 1433 instead of resolving the named instance through the SQL Server Browser. * **Oracle TNS alias with `--user` / `--password`:** `--connectiontype oraodp --server ALIAS --user u --password p` failed with `ORA-50008: 'USERNAME' is an invalid connection string attribute` (same for `adbc_oracle`). * **`--connectiontype nzoledb`** connection type fixed (internal improvement). * **`--connectiontype nzcopy --parallelmethod Timepartition`** generated invalid SQL for Netezza. Fixed (internal improvement). * **`NZDataSlice` with `--timestamped`:** all chunks of one export now share the same timestamp prefix (long exports were split across several prefixes). * **`NZDataSlice`** log message fix. ## Documentation[​](#documentation "Direct link to Documentation") * [AWS S3](/1.5/documentation/cloud-connectivity/aws-s3.md#required-permissions): IAM roles / policies needed by FastBCP and SSE-KMS support. * [FASTBCP\_DBPARTITION\_TARGET\_MODE](/1.5/documentation/environment-variables/fastbcp-dbpartition-target-mode.md): new environment variable. * [Connection Parameters](/1.5/documentation/cli/connection_parameters.md#connection-type): `adbc_netezza` connection type. --- # Release Notes 1.4 **One parallel method to rule them all.** FastBCP 1.4 picks the fastest physical split for your engine on its own, brings Teradata to the high-performance ADBC family, and makes SQL Server parallel exports up to 2.6× faster. 1 parallel method, 4 engines `Physical` resolves to Ctid, Rowid, Physloc or NZDataSlice from the connection type. 2.6× faster Physloc exports At degree 8 on a 60M-row SQL Server heap, the export went from 126 s to 48 s. 0 Teradata client software The ADBC Teradata driver logs on over TLS by default, with no TTU to install. ## What's New: At a Glance[​](#whats-new-at-a-glance "Direct link to What's New: At a Glance") | | | | | - | ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ | | | **New parallel method** | [`--parallelmethod Physical`](#physical-one-parallel-method-for-every-engine): FastBCP picks the physical split of the source engine | | | **New source** | [`--connectiontype adbc_teradata`](#adbc-teradata----connectiontype-adbc_teradata): Teradata to Parquet through the embedded ArpeTeradata driver | | | **Faster exports** | `Physloc` 1.6× to 2.6× faster, better load balancing for `Timepartition` | | | **Data correctness** | Fixes for rows skipped or duplicated by `Ntile`, `Timepartition` and filters with `OR` — [see the fixes](#bug-fixes) | | | **Deprecations** | `Ctid`, `Rowid`, `Physloc` and `NZDataSlice` will be removed in 2.0 — [use `Physical`](#deprecations) | ## Physical: One Parallel Method for Every Engine[​](#physical-one-parallel-method-for-every-engine "Direct link to Physical: One Parallel Method for Every Engine") No more remembering which engine-specific method applies to which database. With `--parallelmethod Physical`, FastBCP splits the table on the physical row location of the source and picks the right strategy from the connection type. | Source | Connection types | Resolved strategy | | ---------- | -------------------------------------------- | ----------------- | | PostgreSQL | `pgsql`, `pgcopy`, `adbc_pgsql` | `Ctid` | | Oracle | `oraodp`, `adbc_oracle` | `Rowid` | | SQL Server | `mssql`, `msoledbsql`, `adbc_mssql` | `Physloc` | | Netezza | `nzsql`, `nzcopy`, `nzoledb`, `adbc_netezza` | `NZDataSlice` | * Windows * Linux ``` .\FastBCP.exe ` --connectiontype pgsql ` --server "localhost:5432" ` --database "tpch" ` --user "FastUser" ` --password "FastPassword" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --directory "D:\export\orders" ` --fileoutput "orders.parquet" ` --parallelmethod Physical ` --paralleldegree 8 ``` ``` ./FastBCP \ --connectiontype pgsql \ --server "localhost:5432" \ --database "tpch" \ --user "FastUser" \ --password "FastPassword" \ --sourceschema "tpch_10" \ --sourcetable "orders" \ --directory "/data/export/orders" \ --fileoutput "orders.parquet" \ --parallelmethod Physical \ --paralleldegree 8 ``` The resolved strategy is logged, and OpenTelemetry spans carry it in `fastbcp.method` (with `Physical` in the new `fastbcp.method.requested` tag): ``` Distribute Method : Physical (Ctid) ``` Good to know * `--sourceschema` and `--sourcetable` are required. `--query` can be added to filter the table (simple query with a `WHERE` clause). `--distributekeycolumn` is not used. * Any other source (`odbc`, `oledb`, `mysql`, `clickhouse`, `hana`, `teradata`, `adbc_teradata`) stops with an explicit error. With `odbc` and `oledb`, the error asks for a native connection type, because FastBCP cannot know which engine is behind the driver. **See also:** [Parallel Parameters](/1.5/documentation/cli/parallel_parameters.md#physical-method) ## ADBC Teradata — `--connectiontype adbc_teradata`[​](#adbc-teradata----connectiontype-adbc_teradata "Direct link to adbc-teradata----connectiontype-adbc_teradata") Teradata joins the high-performance ADBC family. The embedded **ArpeTeradata** driver handles both the metadata and the data steps with the Teradata SQL dialect — and by default it needs **no Teradata client software at all**. | | | Supported | | - | ----------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | **Platforms** | Windows x64 and Linux x64, **Parquet output only** (like every `adbc_*` connection type) | | | **Parallel methods** | Every method of `--connectiontype teradata`: `Random`, `Ntile`, `DataDriven`, `RangeId`, `Timepartition`, and `DBPartition` on PPI tables | | | **Connection** | `--server host[:port]` (legacy port, default `1025`), `--user`, `--password`, optional `--database` — or a `--sourceconnectstring` in the Teradata provider spelling (`Server`, `Port`, `Database`, `User Id`, `Password`, `SSL Mode`, `HTTPS Port`, `TMODE`, `TTU Path`, …). Explicit `adbc.arpeteradata.*` keys win | | | **TLS logon (default)** | `sslmode=prefer` uses TLS on the HTTPS port (443): **no Teradata client software needed** | | | **Legacy port** | When the server has no TLS, or with `SSL Mode=disable`, the driver uses the legacy port through your Teradata Tools and Utilities (TTU), on Linux and Windows | | | **Logon mechanisms** | `LDAP`, `JWT`, `KRB5` and `TDNEGO` (ArpeTeradata 0.3.4). `JWT` and Kerberos work over TLS, without TTU | Good to know * Trusted authentication (`--trusted`) is not supported. * **Finding TTU for the legacy port on Linux:** FastBCP looks in the new [`FASTBCP_TTU_PATH`](/1.5/documentation/environment-variables/fastbcp-ttu-path.md) environment variable, then in a `ttu` or `TeradataToolsAndUtilitiesBase` directory next to the FastBCP binary; otherwise the driver searches `ARPETERADATA_TTU_PATH`, `/opt/teradata/client` and the system library path. Teradata's TTU download can be [unpacked next to the binary without installing it](/1.5/documentation/environment-variables/fastbcp-ttu-path.md#using-teradatas-ttu-download-without-installing-it). FastBCP warns at startup when the TTU folder lacks `tdclientdir` or the ICU links, or when the client directory is not named after its version. * **On Windows**, the driver finds `wincli32.dll` itself (`ARPETERADATA_TTU_PATH`, its own directory, the registered TTU installation). - Windows - Linux ``` .\FastBCP.exe ` --connectiontype adbc_teradata ` --server "td-host" ` --database "TPCH" ` --user "FastUser" ` --password "FastPassword" ` --sourceschema "TPCH" ` --sourcetable "ORDERS" ` --directory "D:\export\orders" ` --fileoutput "orders.parquet" ` --parallelmethod Ntile ` --distributekeycolumn "o_orderkey" ` --paralleldegree 8 ``` ``` export FASTBCP_TTU_PATH=/opt/teradata/client/20.00 ./FastBCP \ --connectiontype adbc_teradata \ --server "td-host" \ --database "TPCH" \ --user "FastUser" \ --password "FastPassword" \ --sourceschema "TPCH" \ --sourcetable "ORDERS" \ --directory "/data/export/orders" \ --fileoutput "orders.parquet" \ --parallelmethod Ntile \ --distributekeycolumn "o_orderkey" \ --paralleldegree 8 ``` **See also:** [Connection Parameters](/1.5/documentation/cli/connection_parameters.md#adbc_teradata) ## Performance[​](#performance "Direct link to Performance") | | Before | 1.4 | | -------------------------------------------- | ------ | -------- | | `Physloc`, degree 8, 60M-row SQL Server heap | 126 s | **48 s** | * **`Physloc` is 1.6× to 2.6× faster at even degrees of parallelism**, thanks to the new [`Physloc` distribution](#physloc-distribution). * **`Timepartition` load balancing:** internal improvement. * **`Timepartition` with quoted or case-sensitive date columns:** columns such as `"OrderDate"` or `[OrderDate]` now work. ## Deprecations[​](#deprecations "Direct link to Deprecations") `Ctid`, `Rowid`, `Physloc` and `NZDataSlice` will be removed in FastBCP 2.0 Use `--parallelmethod Physical` instead: it resolves to the same strategy from the connection type. The old values are still accepted — FastBCP runs the export as before and logs a warning: ``` Parallel method Ctid is deprecated and will be removed in 2.0 ==> use --parallelmethod Physical ``` ## Behaviour Changes[​](#behaviour-changes "Direct link to Behaviour Changes") ### `Physloc` and `Rowid` Require `--sourceschema` and `--sourcetable`[​](#physloc-and-rowid-require---sourceschema-and---sourcetable "Direct link to physloc-and-rowid-require---sourceschema-and---sourcetable") Like `Ctid`, the `Physloc` and `Rowid` methods, used directly or through `Physical`, now require `--sourceschema` and `--sourcetable`. Without them, FastBCP stops at the parameter check: ``` ERROR in command line parameters : With Physical (Physloc) Method you must define source schema (--sourceschema) and source table (--sourcetable) ==> With Physical (Physloc) Method --sourceschema and --sourcetable are both mandatory ``` Before 1.4, `Rowid` crashed when they were missing. A `Physloc` export based on `--query` alone must now also give the schema and table. ### `Physloc` Distribution[​](#physloc-distribution "Direct link to physloc-distribution") `Physloc` now splits both rowstore and clustered columnstore tables into even chunks, whatever the degree of parallelism (internal improvement). A clustered columnstore is logged as `Physloc : .

is a clustered columnstore, splitting on the columnstore row id`. ### ArpeOracle 0.4.1 Security Defaults (`--connectiontype adbc_oracle`)[​](#arpeoracle-041-security-defaults---connectiontype-adbc_oracle "Direct link to arpeoracle-041-security-defaults---connectiontype-adbc_oracle") * TCPS now verifies the server certificate by default. * Kerberos no longer forwards the TGT unless `krb5_forward=true` is set, and requires mutual authentication. * Token and OAuth2 logons require TCPS. ### `--help`[​](#--help "Direct link to --help") * `-?, --help` is now listed in the usage. * `--help`, `/?` and `/help` now behave like `-?`: they print the usage only, without the banner, and exit with code `0`. Before, they printed the usage, then the banner and four `ERROR in command line parameters` lines, and exited with code `1`. ## Bug Fixes[​](#bug-fixes "Direct link to Bug Fixes") * **`Physloc` only parallelised with an odd `--paralleldegree`:** with a degree of 2, 4, 8 or 16, one chunk held every row and the other workers exported nothing; with 6 or 12, only three chunks got rows. Fixed by the new [`Physloc` distribution](#physloc-distribution): on rowstore tables, the chunks stay within 3% of even up to degree 192. * **`Random` and `Physloc` row counts:** the per-chunk log lines and the final `Total data rows` were wrong. Fixed (internal improvement). * **`Ntile` dropped rows with sub-millisecond timestamp keys:** this affected SQL Server `datetime2(4..7)`, PostgreSQL `timestamp` and Oracle `TIMESTAMP(4..9)`. Rows could be silently skipped; every row is now exported exactly once whatever its precision (internal improvement). A bucket whose minimum is `NULL` no longer throws, and numeric bounds no longer depend on the regional settings (no more `1,5` with `fr-FR`). * **Source filter with `OR`:** rows outside the source filter could be exported when the filter contained an `OR`, with every parallel method that rewrites the `WHERE` clause. Fixed (internal improvement). * **`Timepartition` skipped rows with a `NULL` date:** they are now exported to a `=NULL` directory. * **`Timepartition` with week granularity duplicated rows:** fixed on every engine (SQL Server, PostgreSQL, Netezza, MySQL, Oracle, SAP HANA, Teradata, ClickHouse) (internal improvement). * **`Performance Output Files Size` and `Disk Write Throughput` showed `unknown`** with `DataDriven`, `Timepartition` and `DBPartition`. The size now covers every file written by the run, and still ignores unrelated files already in the directory. ## Driver Improvements[​](#driver-improvements "Direct link to Driver Improvements") * **ArpeMSSQL 0.7.6** — reads `sql_variant` and the SQL Server 2025 `JSON` type; an unreadable column no longer drops the connection. * **ArpeTeradata 0.3.4** — new driver behind `--connectiontype adbc_teradata`. * **ArpeOracle 0.4.1** — stricter security defaults, see [above](#arpeoracle-041-security-defaults---connectiontype-adbc_oracle). ## Dependencies[​](#dependencies "Direct link to Dependencies") | Component | Version | | ---------------------------- | ----------------------------------------------------------------------------------------- | | .NET packages | 10.0.13 | | Microsoft.Data.SqlClient | 7.1.1 | | SAP HANA .NET driver | 2.30.27 (`Sap.Data.Hana.Net.v10.0`, native client libraries from SAP HANA Client 2.30.27) | | ArpeMSSQL ADBC driver | 0.7.6 | | ArpePGSQL ADBC driver | 0.4.7 | | ArpeOracle ADBC driver | 0.4.1 | | ArpeNetezza ADBC driver | 0.3.7 | | ArpeTeradata ADBC driver | 0.3.4 **(new)** | | AdbcFileExport | 0.5.4 | | AWSSDK.S3 | 4.0.104.4 | | Azure.Storage.Files.DataLake | 12.28.0 | ## Documentation[​](#documentation "Direct link to Documentation") * [Parallel Parameters](/1.5/documentation/cli/parallel_parameters.md#physical-method): `Physical` method, deprecation of `Ctid`, `Rowid`, `Physloc` and `NZDataSlice`. * [Connection Parameters](/1.5/documentation/cli/connection_parameters.md#adbc_teradata): `adbc_teradata` connection type. * [FASTBCP\_TTU\_PATH](/1.5/documentation/environment-variables/fastbcp-ttu-path.md): new environment variable. * [Examples](/1.5/documentation/examples/sql-server.md): the parallel examples use `Physical` for PostgreSQL, Oracle, SQL Server and Netezza; new Teradata examples in [Other Databases](/1.5/documentation/examples/other-databases.md#teradata). --- # Release Notes 1.5 **Your SQL Server backups are now a data source.** FastBCP 1.5 reads tables straight from `.bak` files and exports them to Parquet — no restore, no SQL Server instance, no extra disk space. 0 SQL Server instance needed Point FastBCP at a backup directory. No server to provision, no credentials, no restore window. 5 M rows/s from an uncompressed backup Faster than reading the live database: 1.5× `adbc_mssql`, 3.6× `mssql`. 128–256 MB per thread The backup is read in place, out of core, and never loaded in memory. ## What's New: At a Glance[​](#whats-new-at-a-glance "Direct link to What's New: At a Glance") | | | | | - | ------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | **New source** | [`--connectiontype backup_mssql`](#sql-server-backup-files----connectiontype-backup_mssql): export tables from SQL Server full backups (`.bak`), striped or not, compressed or not | | | **Doc Wizard** | `backup_mssql` in the ADBC connectors, and **→** to accept a suggested value | | | **Licence** | A licence file is now always required, the 30-day trial included — [see what changes](#licence) | | | **Faster drivers** | ArpeMSSQL 4-way parallel reads up to **2× faster**, faster Oracle `NUMBER` reads | ## SQL Server Backup Files — `--connectiontype backup_mssql`[​](#sql-server-backup-files----connectiontype-backup_mssql "Direct link to sql-server-backup-files----connectiontype-backup_mssql") Need the data of a production database for analytics, an audit or a migration, but don't want to touch the production server — or restore a multi-terabyte backup first? FastBCP now reads **full backups** directly through the embedded **ArpeMSBackup** ADBC driver. * **`--server`** is the **directory** holding the backups. * **`--database`** is the **backup file**, or a pattern matching it. * That's it: no user, no password, no SQL Server. - Windows - Linux ``` .\FastBCP.exe ` --connectiontype backup_mssql ` --server "D:\Backups\MSSQL" ` --database "tpch_full.bak" ` --sourceschema "dbo" ` --sourcetable "orders" ` --directory "D:\export\orders" ` --fileoutput "orders.parquet" ` --parallelmethod Physical ` --paralleldegree 8 ``` ``` ./FastBCP \ --connectiontype backup_mssql \ --server "/var/opt/mssql/backup" \ --database "tpch_*.bak" \ --sourceschema "dbo" \ --sourcetable "orders" \ --directory "/export/orders" \ --fileoutput "orders.parquet" \ --parallelmethod Physical \ --paralleldegree 8 ``` ### Faster Than the Live Database[​](#faster-than-the-live-database "Direct link to Faster Than the Live Database") FastBCP to Parquet, degree 8, TPC-H. | Table | Source | Throughput | | | -------------------------------------------- | ---------------------------------------- | ------------------ | - | | `orders` (15 M rows) | **`backup_mssql`**, uncompressed backup | **≈ 5 M rows/s** | | | | `backup_mssql`, MS\_XPRESS / ZSTD backup | 2.1 – 2.6 M rows/s | | | | `adbc_mssql` on the live database | 3.3 M rows/s | | | | `mssql` on the live database | 1.4 M rows/s | | | `lineitem` clustered columnstore (60 M rows) | **`backup_mssql`** | **2.8 M rows/s** | | | | `adbc_mssql` on the live database | 2.4 M rows/s | | ### What It Reads[​](#what-it-reads "Direct link to What It Reads") | | | Supported | | - | ------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | **SQL Server versions** | 2017, 2019, 2022 and 2025, on Windows or Linux | | | **Backup types** | Full and copy-only full backups, uncompressed or compressed with **MS\_XPRESS** or **ZSTD**, any `BLOCKSIZE` / `MAXTRANSFERSIZE` | | | **Striped backups** | `TO DISK = a, DISK = b, …`: a pattern (`--database "tpch_*.bak"`) or a `;`-separated list, in any order | | | **Several backups in one file** | `WITH NOINIT`: the last full backup of the file is read | | | **Database layout** | Several data files and filegroups | | | **Rowstore tables** | Heaps, clustered indexes, partitions, ROW / PAGE compression | | | **Columnstore tables** | Clustered columnstore, archive compression and open delta store included | | | **Data types** | Every SQL Server type: LOBs and row-overflow, `xml`, sparse columns, persisted computed columns, `sql_variant` (as text) — see the [datatypes mapping](/1.5/datatypes-conversion/mssql/backup-parquet.md) | Good to know * **Parquet output only**, on Windows x64 and Linux x64. * `--parallelmethod` accepts `None` and `Physical` (which resolves to the new **Pages** method). * `--query` accepts `SELECT * | col1, col2, … FROM [schema.]table`. * **Refused with a clear message:** TDE databases and encrypted backups (`WITH ENCRYPTION`), which cannot be read without the server certificate; files without a full backup; incomplete stripe sets or stripes from different backups. **See also:** [SQL Server backup files](/1.5/documentation/cli/connection_parameters.md#sql-server-backup-files-backup_mssql) · [Examples](/1.5/documentation/examples/sql-server.md#sql-server-backup-files-backup_mssql) ## Doc Wizard[​](#doc-wizard "Direct link to Doc Wizard") * The [Doc Wizard](/1.5/wizard.md) offers `backup_mssql` in the **ADBC (High Performance)** connectors. The server field becomes the backup directory (Windows or Linux path, following the chosen platform), the database field the backup file, and only `None` and `Physical` are offered as parallel methods. * **Type less:** in an empty field, the **→** (right arrow) key takes the suggested value. ## Licence[​](#licence "Direct link to Licence") Action required for trial users A licence file is now **always required**, including for the **free 30-day trial**: request your trial licence at [arpe.io](https://www.arpe.io). The build-date trial and the trial token embedded for the ADBC drivers are gone. `--help` and `--version` still run without a licence. * **Lookup order:** the default `FastBCP.lic` is searched in the **current directory**, then **next to the executable**. * **One file for everything:** a licence file can hold several blocks (FastBCP, ADBC drivers, other products) in any order. * **ADBC drivers:** the licence is passed to the drivers automatically (internal improvement). A driver licence of your own (`--sourceconnectstring`, `ARPEIO_ADBC_LICENCE` / `ARPEIO_ADBC_LICENCE_FILE`) wins, and a damaged ADBC block is reported as such. * **Exit code 99:** an `adbc_*` or `backup_mssql` run with no ADBC driver block (and no `ARPEIO_ADBC_LICENCE` / `ARPEIO_ADBC_LICENCE_FILE`) now stops with exit code **99** instead of falling back to a trial token. See [License](/1.5/documentation/cli/license.md). ## Driver Improvements[​](#driver-improvements "Direct link to Driver Improvements") * **ArpeMSSQL 0.7.8 — up to 2× faster parallel reads** on 4-way parallel exports (internal improvement). Also fixes a crash when the thread that loaded the driver exits. * **ArpeOracle 0.4.3** — faster `NUMBER` to float64 reads, and choice of the Native Network Encryption integrity algorithm with `adbc.arpeoracle.data_integrity_types`. * **ArpeTeradata 0.3.5** — `uri` and ADO.NET `connection_string` are parsed, like the other drivers. ## Dependencies[​](#dependencies "Direct link to Dependencies") | Component | Version | | ------------------------ | ------------------------------------- | | ArpeMSBackup ADBC driver | 0.1.6 **(new)** | | ArpeMSSQL ADBC driver | 0.7.8 | | ArpeOracle ADBC driver | 0.4.3 | | ArpeNetezza ADBC driver | 0.3.8 (no driver code change) | | ArpeTeradata ADBC driver | 0.3.5 | | AdbcFileExport | 0.5.5 (`arpemsbackup` driver profile) | The other components are unchanged since [1.4](/1.5/release-notes/release-notes-1.4.md#dependencies). ## Documentation[​](#documentation "Direct link to Documentation") * [Connection Parameters](/1.5/documentation/cli/connection_parameters.md#sql-server-backup-files-backup_mssql): `backup_mssql` connection type. * [Parallel Parameters](/1.5/documentation/cli/parallel_parameters.md#physical-method): `Physical` resolves to `Pages` on SQL Server backup files. * [Datatypes conversion](/1.5/datatypes-conversion/mssql/backup-parquet.md): SQL Server backup files → Parquet. * [Examples](/1.5/documentation/examples/sql-server.md#sql-server-backup-files-backup_mssql): exports from backup files, striped backups. * [License](/1.5/documentation/cli/license.md): lookup order, trial licence, exit codes. --- # Sitemap ## [Installation](/1.5/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](/1.5/.md) * CLI Reference * [Authentication](/1.5/documentation/cli/authentication.md) * [Connection Parameters](/1.5/documentation/cli/connection_parameters.md) * [Source Info](/1.5/documentation/cli/source_info.md) * [Output Info](/1.5/documentation/cli/output_info.md) * [CSV Formatting](/1.5/documentation/cli/csv_formatting.md) * [Parquet Formatting](/1.5/documentation/cli/parquet_formatting.md) * [Cloud Options](/1.5/documentation/cli/cloud_options.md) * [Parallel Parameters](/1.5/documentation/cli/parallel_parameters.md) * [Advanced Parameters](/1.5/documentation/cli/advanced_parameters.md) * [License](/1.5/documentation/cli/license.md) * Environment Variables * [Overview](/1.5/documentation/environment-variables/overview.md) * [FASTBCP\_CLOUD\_ISBUFFERED](/1.5/documentation/environment-variables/fastbcp-cloud-isbuffered.md) * [FASTBCP\_TMPPATH](/1.5/documentation/environment-variables/fastbcp-tmppath.md) * [FASTBCP\_CLOUD\_MAXUPLOADTHREAD\_PER\_STREAM](/1.5/documentation/environment-variables/fastbcp-cloud-maxuploadthread-per-stream.md) * [FASTBCP\_RGSIZE](/1.5/documentation/environment-variables/fastbcp-rgsize.md) * [FASTBCP\_UID\_STRING\_CASING](/1.5/documentation/environment-variables/fastbcp-uid-string-casing.md) * [FASTBCP\_DATEFORMAT](/1.5/documentation/environment-variables/fastbcp-dateformat.md) * [FASTBCP\_ADBC\_BATCHCELLS](/1.5/documentation/environment-variables/fastbcp-adbc-batchcells.md) * [FASTBCP\_SYSTEMINFO\_COLLECT](/1.5/documentation/environment-variables/fastbcp-systeminfo-collect.md) * [FASTBCP\_PERFORMANCE\_COLLECT](/1.5/documentation/environment-variables/fastbcp-performance-collect.md) * [FASTBCP\_DBPARTITION\_TARGET\_MODE](/1.5/documentation/environment-variables/fastbcp-dbpartition-target-mode.md) * [FASTBCP\_TTU\_PATH](/1.5/documentation/environment-variables/fastbcp-ttu-path.md) * Cloud Connectivity * [Overview](/1.5/documentation/cloud-connectivity/overview.md) * [AWS S3](/1.5/documentation/cloud-connectivity/aws-s3.md) * [Azure](/1.5/documentation/cloud-connectivity/azure.md) * [Google Cloud Storage](/1.5/documentation/cloud-connectivity/google-cloud.md) * [OneLake](/1.5/documentation/cloud-connectivity/onelake.md) * Logging * [Overview](/1.5/documentation/logging/Overview.md) * [Logs Level](/1.5/documentation/logging/logs-level.md) * [Log Database](/1.5/documentation/logging/log-database.md) * [Log Files Names Mapping using variables](/1.5/documentation/logging/log-files-names-mapping-using-variables.md) * [OpenTelemetry](/1.5/documentation/logging/OpenTelemetry.md) * [Examples](/1.5/documentation/logging/examples.md) * Examples * [SQL Server Examples](/1.5/documentation/examples/sql-server.md) * [PostgreSQL Examples](/1.5/documentation/examples/postgresql.md) * [MySQL Examples](/1.5/documentation/examples/mysql.md) * [Oracle Examples](/1.5/documentation/examples/oracle.md) * [DB2 Examples](/1.5/documentation/examples/db2.md) * [Other Databases](/1.5/documentation/examples/other-databases.md) * [Output Formats](/1.5/documentation/examples/output-formats.md) * [Cloud Storage](/1.5/documentation/examples/cloud-storage.md) * [Advanced Scenarios](/1.5/documentation/examples/advanced-scenarios.md) * Compatibility * [Sources & Platforms](/1.5/documentation/compatibility/sources_platforms.md) * [Operating Systems](/1.5/documentation/compatibility/operating_systems.md) ## Datatypes Conversion[​](#datatypes-conversion "Direct link to Datatypes Conversion") * [Overview](/1.5/datatypes-conversion/overview.md) * SQL Server * [mssql](/1.5/datatypes-conversion/mssql/parquet.md) * [adbc\_mssql](/1.5/datatypes-conversion/mssql/adbc-parquet.md) * [backup\_mssql](/1.5/datatypes-conversion/mssql/backup-parquet.md) * MySQL * [mysql](/1.5/datatypes-conversion/mysql/parquet.md) * Oracle * [oraodp](/1.5/datatypes-conversion/oracle/parquet.md) * [adbc\_oraodp](/1.5/datatypes-conversion/oracle/adbc-parquet.md) * PostgreSQL * [pgsql](/1.5/datatypes-conversion/postgresql/parquet.md) * [pgcopy](/1.5/datatypes-conversion/postgresql-copy/parquet.md) * [adbc\_pgsql](/1.5/datatypes-conversion/postgresql/adbc-parquet.md) * SAP HANA * [hana](/1.5/datatypes-conversion/saphana/parquet.md) * Teradata * [teradata](/1.5/datatypes-conversion/teradata/parquet.md) ## Integration[​](#integration "Direct link to Integration") * [Docker](/1.5/integration/docker-integration.md) * [Kestra](/1.5/integration/kestra-integration.md) * [Airflow](/1.5/integration/airflow-integration.md) * [PostgreSQL](/1.5/integration/postgresql-integration.md) ## Release Notes[​](#release-notes "Direct link to Release Notes") * [Release Notes 1.5](/1.5/release-notes/release-notes-1.5.md) * [Release Notes 1.4](/1.5/release-notes/release-notes-1.4.md) * [Release Notes 1.3](/1.5/release-notes/release-notes-1.3.md) * [Release Notes 1.2](/1.5/release-notes/release-notes-1.2.md) * [Release Notes 1.1](/1.5/release-notes/release-notes-1.1.md) * [Release Notes 1.0](/1.5/release-notes/release-notes-1.0.md) * [Release Notes 0.32](/1.5/release-notes/release-notes-0.32.md) ## AI Integrations[​](#ai-integrations "Direct link to AI Integrations") * [FastBCP Agent Skill](/1.5/ai/agent-skills.md) * [FastBCP MCP Server](/1.5/ai/mcp-server.md) ## [Sitemap](/1.5/sitemap.md)[​](#sitemap-1 "Direct link to sitemap-1") --- # FastBCP Command Wizard Tip: in an empty field, press `→` to take the suggested value. Expand All\[ ] ### PlatformWindows Windows ![Linux](/img/tux.svg)Linux ### Connection ParametersMS SQL Server Connection Type? : ADBC (High Performance) MS SQL Server (Arpe.io ADBC FastDriver) PostgreSQL (Arpe.io ADBC FastDriver) Oracle (Arpe.io ADBC FastDriver) Netezza (Arpe.io ADBC FastDriver) Teradata (Arpe.io ADBC FastDriver) SQL Server backups .bak (Arpe.io ADBC FastDriver) Standard Drivers ClickHouse MS SQL Server MySQL Netezza ODBC OLEDB Oracle (ODP) PostgreSQL (pgcopy) PostgreSQL (pgsql) SAP HANA Teradata | Provider? : | SQLOLEDB | | ------------------------ | ----------------------------- | | Server? : | mss-server,1433 | | Source Connect String? : | Server=myserver;Database=mydb | | DSN? : | MyDSN | | Trusted? : | \[ ] | | User? : | username | | Password? : | password | | Database? : | mydb | | Application Intent? : | ReadOnlyReadWrite | ### Source Query / Table ### Output Options ### Format Options ### Parquet Options ### Cloud Options ### Parallel Parameters ### Advanced Parameters ### License ### Generated Command Multi-line\[x] generate config sharecopy ``` ``` --- # Getting Started with FastBCP FastBCP is a high-performance bulk copy tool that exports SQL Server, PostgreSQL, MySQL, Oracle and other databases to CSV, Parquet, JSON and cloud storage (S3, Azure, GCS, OneLake). ## Your first export in three steps[​](#your-first-export-in-three-steps "Direct link to Your first export in three steps") 1. 1InstallDownload and unzip FastBCP, or pull the Docker image: see [Installation](/1.6/installation.md) 2. 2Build your commandPick your source, output and options in the interactive [Doc Wizard](/latest/wizard.md) 3. 3RunPaste the generated `./FastBCP` command in your terminal ## The CLI at a glance[​](#the-cli-at-a-glance "Direct link to The CLI at a glance") A FastBCP command is built in four stages. Each box opens the matching page of the CLI reference. ## Watch the tutorial[​](#watch-the-tutorial "Direct link to Watch the tutorial") [FastBCP Tutorial](https://www.youtube.com/embed/Tpmc6NrTtuM) ## 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.6/documentation/examples/sql-server.md) * [![](/img/logos/postgresql.svg)PostgreSQL](/1.6/documentation/examples/postgresql.md) * [![](/img/logos/mysql.svg)MySQL](/1.6/documentation/examples/mysql.md) * [![](/img/logos/oracle.svg)Oracle](/1.6/documentation/examples/oracle.md) * [DB2](/1.6/documentation/examples/db2.md) * [Other databases](/1.6/documentation/examples/other-databases.md) Reference Parameters, settings and behaviour * [CLI parameters](/1.6/documentation/cli/connection_parameters.md)connection, source, output, formatting and parallelism * [Cloud connectivity](/1.6/documentation/cloud-connectivity/overview.md)export straight to S3, Azure, GCS or OneLake * [Environment variables](/1.6/documentation/environment-variables/overview.md)fine-tune buffering, temp paths and more * [Logging](/1.6/documentation/logging/Overview.md)log levels, log database and OpenTelemetry * [Data type conversion](/1.6/datatypes-conversion/overview.md)how source types map to Parquet --- # FastBCP Agent Skill arpe.io publishes official agent skills in the [arpe-io/arpeio-skills](https://github.com/arpe-io/arpeio-skills) GitHub repository. The [`fastbcp`](https://github.com/arpe-io/arpeio-skills/tree/main/plugins/fastbcp/skills/fastbcp) skill teaches your AI agent how to build, explain and troubleshoot FastBCP commands: which parameters exist, which options fit together, which parallel method to choose, and which mistakes to avoid. The same repository also has skills for FastTransfer, MigratorXpress, LakeXpress and the arpe.io ADBC drivers. Skill or MCP server? The skill is a set of instructions: it teaches the agent how FastBCP works, and the agent writes the command. The [arpe.io MCP server](/1.6/ai/mcp-server.md) gives the agent tools that build, validate and, if you allow it, run FastBCP 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 fastbcp --marketplace arpe-io/arpeio-skills ``` Or in two steps: ``` /plugin marketplace add arpe-io/arpeio-skills /plugin install fastbcp@arpe-io ``` Then just ask, for example: *"Export dbo.Orders from SQL Server to Parquet on S3 with FastBCP, in parallel"*. To get the latest version of the skill later: ``` /plugin marketplace update arpe-io /plugin update fastbcp@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/fastbcp/skills/fastbcp / ``` For agents without skill support, paste the content of [`SKILL.md`](https://github.com/arpe-io/arpeio-skills/blob/main/plugins/fastbcp/skills/fastbcp/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 FastBCP version its facts were checked against. Before building a command, it asks the agent to check the installed version (`FastBCP --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 FastBCP version, the prompt you gave, and the command the agent produced (with passwords and licence text removed). --- # FastBCP 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 FastBCP, the assistant can ask the server to validate a set of parameters and render the exact FastBCP command, look up what FastBCP supports, read the release notes and search this documentation. If FastBCP is installed on your machine, it can also run the command. The server runs in one of two modes: * Command builder (default)The tools build, validate and explain commands; no FastBCP binary is needed. The hosted server works this way, so it never connects to your databases. * ExecutionWhen you install the server on your own machine and point it at your FastBCP 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.6/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 FastBCP from the assistant[​](#run-fastbcp-from-the-assistant "Direct link to Run FastBCP from the assistant") To let the assistant run FastBCP, install the server on the machine where FastBCP 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 FASTBCP_PATH=/path/to/FastBCP arpeio -- arpeio-mcp ``` In Claude Desktop, and in other clients that use the `mcpServers` format: ``` { "mcpServers": { "arpeio": { "command": "arpeio-mcp", "env": { "FASTBCP_PATH": "/path/to/FastBCP" } } } } ``` | Variable | Description | | ----------------- | ------------------------------------------------------------------------ | | `FASTBCP_PATH` | Path to the FastBCP binary. Without it, the server only builds commands. | | `FASTBCP_TIMEOUT` | Execution timeout, in seconds. Optional. | | `FASTBCP_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 | | ------------------------ | ------------------------------------------------------------------------------------------------------------------- | | `fastbcp_info` | Reference information, picked with `action`: supported formats, parallel methods, workflow tips, version detection. | | `fastbcp_preview_export` | Validates the parameters and renders the FastBCP command. When no parallel method is given, it suggests one. | | `fastbcp_execute_export` | Runs the previewed command. Needs a local FastBCP 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. 1DescribeYou describe what you want, for example: *"Export the Sales.Orders table from PostgreSQL to Parquet files in an S3 bucket, split in 8 parallel parts"*. 2. 2PreviewThe assistant calls `fastbcp_preview_export`. The tool checks the parameters and returns the FastBCP command, an explanation, and warnings when an option does not exist in the FastBCP version you run. 3. 3ReviewYou review the command. Passwords are masked in the displayed version. 4. 4RunIf execution is enabled, the assistant calls `fastbcp_execute_export`. 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: `export-table` for FastBCP, and `troubleshoot` to explain a failed run from its error message. The server also exposes the FastBCP capability matrix as the MCP resource `arpeio://capabilities/fastbcp-formats`. ## 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). --- # SQL Server (ADBC) → Parquet Datatypes conversion mapping when exporting from **SQL Server** using the ADBC connector (`--connectiontype adbc_mssql`) to **Parquet** format. Platform availability The ADBC FastDriver connectors (`adbc_mssql`, `adbc_pgsql`) are available on **Windows x64** and **Linux x64** only. They are **not** supported on **Linux ARM64**. info The ADBC connector does not map every type the way the standard [`mssql`](/1.6/datatypes-conversion/mssql/parquet.md) driver does. Compare both pages before switching. | | | | --------------- | --------------------------------------------------------- | | **Source** | SQL Server (adbc\_mssql) | | **Format** | Parquet | | **FastBCP** | 1.5.0.0 (ArpeMSSQL 0.7.8), SQL Server 2025 types: 1.6.4.0 | | **Test Status** | OK (33/33 Nullable) | Since FastBCP 1.5 * `sql_variant` is exported (as text); it failed in 1.4. * `time(7)`, `datetime2(7)` and `datetimeoffset(7)` are written with a **microsecond** unit by default (the 7th digit is dropped), so that older readers (Spark before 3.x) can read the files. Add `adbc.arpemssql.timestamp_precision=nanosecond` to `--sourceconnectstring` to keep the 100 ns resolution (nanosecond unit). * `geography` and `geometry` are converted to **WKB** with GeoParquet metadata (`geo` key: WKB encoding, spherical edges for `geography`), so Parquet readers see them as geometries. `adbc.arpemssql.geospatial=wkb` gives plain WKB without the metadata, `varbinary` the SQL Server serialization. ## Parquet Schema: testdatatypes\_nullable[​](#parquet-schema-testdatatypes_nullable "Direct link to Parquet Schema: testdatatypes_nullable") | name | physical\_type | converted\_type | logical\_type | | --------------------- | ----------------------- | ----------------- | --------------------------------------------------- | | col\_bigint | INT64 | — | — | | col\_int | INT32 | — | — | | col\_smallint | INT32 | INT\_16 | IntType(bitWidth=16, isSigned=1) | | col\_tinyint | INT32 | UINT\_8 | IntType(bitWidth=8, isSigned=0) | | col\_bit | BOOLEAN | — | — | | col\_decimal | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=2, precision=18) | | col\_numeric | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=2, precision=18) | | col\_money | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=4, precision=19) | | col\_smallmoney | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=4, precision=10) | | col\_float | DOUBLE | — | — | | col\_real | FLOAT | — | — | | col\_date | INT32 | DATE | DateType() | | col\_time | INT64 | — | TimeType(isAdjustedToUTC=0, unit=MICROS) | | col\_datetime | INT64 | TIMESTAMP\_MILLIS | TimestampType(isAdjustedToUTC=0, unit=MILLIS) | | col\_datetime2 | INT64 | TIMESTAMP\_MICROS | TimestampType(isAdjustedToUTC=0, unit=MICROS) | | col\_datetimeoffset | INT64 | TIMESTAMP\_MICROS | TimestampType(isAdjustedToUTC=1, unit=MICROS) | | col\_smalldatetime | INT64 | TIMESTAMP\_MILLIS | TimestampType(isAdjustedToUTC=0, unit=MILLIS) | | col\_char | BYTE\_ARRAY | UTF8 | StringType() | | col\_varchar | BYTE\_ARRAY | UTF8 | StringType() | | col\_nchar | BYTE\_ARRAY | UTF8 | StringType() | | col\_nvarchar | BYTE\_ARRAY | UTF8 | StringType() | | col\_text | BYTE\_ARRAY | UTF8 | StringType() | | col\_ntext | BYTE\_ARRAY | UTF8 | StringType() | | col\_binary | BYTE\_ARRAY | — | — | | col\_varbinary | BYTE\_ARRAY | — | — | | col\_image | BYTE\_ARRAY | — | — | | col\_uniqueidentifier | BYTE\_ARRAY | UTF8 | StringType() | | col\_xml | BYTE\_ARRAY | UTF8 | StringType() | | col\_geography | BYTE\_ARRAY | — | — (WKB, GeoParquet `geo` metadata, spherical edges) | | col\_geometry | BYTE\_ARRAY | — | — (WKB, GeoParquet `geo` metadata) | | col\_sql\_variant | BYTE\_ARRAY | UTF8 | StringType() | | col\_json | BYTE\_ARRAY | JSON | JsonType() | | col\_vector | FLOAT (repeated) | LIST | ListType() | `col_json` (`json`) and `col_vector` (`vector(3)`) are SQL Server 2025 types, tested with FastBCP 1.6.4.0. * `json` is exported with the Parquet `JSON` logical type. * `vector(n)` is exported as a list of `n` 32-bit floats (`[0.5, 1.5, 2.5]`). --- # SQL Server backup files → Parquet Datatypes conversion mapping when exporting a table from **SQL Server backups** (`.bak`, full and differential) using the ArpeMSBackup ADBC driver (`--connectiontype backup_mssql`) to **Parquet** format. Platform availability `backup_mssql` is available on **Windows x64** and **Linux x64** only. It is **not** supported on **Linux ARM64**. Compared with `adbc_mssql` Since FastBCP 1.6.5, the mapping and the values are those of [`adbc_mssql`](/1.6/datatypes-conversion/mssql/adbc-parquet.md), so a backup and a live export of the same table give the same Parquet. The exception is `json` and `vector(n, float16)` (SQL Server 2025): `backup_mssql` refuses them. Changed in FastBCP 1.6.5 * `time(7)`: **microsecond** unit, instead of nanosecond. * `geography`, `geometry`: **WKB** with GeoParquet metadata, instead of the SQL Server binary serialization. * `vector(n)`: **list of 32-bit floats**, instead of the SQL Server binary serialization. * `sql_variant`: values are written as with `adbc_mssql`. | | | | --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | **Source** | SQL Server backup file (backup\_mssql) | | **Format** | Parquet | | **FastBCP** | 1.6.4.0; `time`, `geography`, `geometry`, `uniqueidentifier`, `json` and `vector`: 1.6.5.0 | | **Test Status** | PARTIAL (32/33 Nullable) — `json` refused. SQL Server 2022 and 2025 backups: uncompressed, striped, `MS_XPRESS` and `ZSTD` compression, `--parallelmethod Physical` | ## Parquet Schema: testdatatypes\_nullable[​](#parquet-schema-testdatatypes_nullable "Direct link to Parquet Schema: testdatatypes_nullable") | name | physical\_type | converted\_type | logical\_type | | --------------------- | ----------------------- | ----------------- | --------------------------------------------------- | | col\_bigint | INT64 | — | — | | col\_int | INT32 | — | — | | col\_smallint | INT32 | INT\_16 | IntType(bitWidth=16, isSigned=1) | | col\_tinyint | INT32 | UINT\_8 | IntType(bitWidth=8, isSigned=0) | | col\_bit | BOOLEAN | — | — | | col\_decimal | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=2, precision=18) | | col\_numeric | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=2, precision=18) | | col\_money | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=4, precision=19) | | col\_smallmoney | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=4, precision=10) | | col\_float | DOUBLE | — | — | | col\_real | FLOAT | — | — | | col\_date | INT32 | DATE | DateType() | | col\_time | INT64 | — | TimeType(isAdjustedToUTC=0, unit=MICROS) | | col\_datetime | INT64 | TIMESTAMP\_MILLIS | TimestampType(isAdjustedToUTC=0, unit=MILLIS) | | col\_datetime2 | INT64 | TIMESTAMP\_MICROS | TimestampType(isAdjustedToUTC=0, unit=MICROS) | | col\_datetimeoffset | INT64 | TIMESTAMP\_MICROS | TimestampType(isAdjustedToUTC=1, unit=MICROS) | | col\_smalldatetime | INT64 | TIMESTAMP\_MILLIS | TimestampType(isAdjustedToUTC=0, unit=MILLIS) | | col\_char | BYTE\_ARRAY | UTF8 | StringType() | | col\_varchar | BYTE\_ARRAY | UTF8 | StringType() | | col\_nchar | BYTE\_ARRAY | UTF8 | StringType() | | col\_nvarchar | BYTE\_ARRAY | UTF8 | StringType() | | col\_text | BYTE\_ARRAY | UTF8 | StringType() | | col\_ntext | BYTE\_ARRAY | UTF8 | StringType() | | col\_binary | BYTE\_ARRAY | — | — | | col\_varbinary | BYTE\_ARRAY | — | — | | col\_image | BYTE\_ARRAY | — | — | | col\_uniqueidentifier | BYTE\_ARRAY | UTF8 | StringType() | | col\_xml | BYTE\_ARRAY | UTF8 | StringType() | | col\_geography | BYTE\_ARRAY | — | — (WKB, GeoParquet `geo` metadata, spherical edges) | | col\_geometry | BYTE\_ARRAY | — | — (WKB, GeoParquet `geo` metadata) | | col\_sql\_variant | BYTE\_ARRAY | UTF8 | StringType() | | col\_json | — | — | Refused | | col\_vector | FLOAT (repeated) | LIST | ListType() | `col_json` (`json`) and `col_vector` (`vector(3)`) are SQL Server 2025 types, tested with FastBCP 1.6.5.0. * `vector(n)` is exported as a list of `n` 32-bit floats (`[1.0, -2.5, 3.25]`). * `geography` and `geometry` keep their coordinate system: the GeoParquet metadata carries the CRS from the column's SRID. * `uniqueidentifier` is written in lowercase by default. Since FastBCP 1.6.5, [`FASTBCP_UID_STRING_CASING`](/1.6/documentation/environment-variables/fastbcp-uid-string-casing.md) applies to `backup_mssql` too. To get `geography` and `geometry` another way, give the connection as a connection string: `adbc.arpemsbackup.geospatial=wkb` writes plain WKB without the metadata, and `varbinary` writes the SQL Server binary serialization, as before 1.6.5. ``` --sourceconnectstring "adbc.arpemsbackup.path=D:\Backups\MSSQL;adbc.arpemsbackup.file=mydb.bak;adbc.arpemsbackup.geospatial=varbinary" ``` `json` and `vector(n, float16)` columns are refused A table with such a column is refused with a message naming the column (`column j: json (SQL Server 2025) is not supported`). Export the other columns by listing them in `--query`, or export the table with [`adbc_mssql`](/1.6/datatypes-conversion/mssql/adbc-parquet.md). --- # SQL Server → Parquet Datatypes conversion mapping when exporting from **SQL Server** (`--connectiontype mssql`) to **Parquet** format. | | | | --------------- | ------------------------------------------------- | | **Source** | SQL Server (mssql) | | **Format** | Parquet | | **FastBCP** | 1.4.0.0 (SQL Server 2025 types: 1.6.4.0) | | **Test Status** | PARTIAL (32/33 Nullable) — `vector` not supported | ## Parquet Schema: testdatatypes\_nullable[​](#parquet-schema-testdatatypes_nullable "Direct link to Parquet Schema: testdatatypes_nullable") | name | physical\_type | converted\_type | logical\_type | | --------------------- | ----------------------- | ----------------- | ---------------------------------------- | | col\_bigint | INT64 | INT\_64 | IntType(bitWidth=64, isSigned=1) | | col\_int | INT32 | INT\_32 | IntType(bitWidth=32, isSigned=1) | | col\_smallint | INT32 | INT\_16 | IntType(bitWidth=16, isSigned=1) | | col\_tinyint | INT32 | UINT\_8 | IntType(bitWidth=8, isSigned=0) | | col\_bit | BOOLEAN | — | — | | col\_decimal | INT64 | DECIMAL | DecimalType(scale=2, precision=18) | | col\_numeric | INT64 | DECIMAL | DecimalType(scale=2, precision=18) | | col\_money | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=4, precision=19) | | col\_smallmoney | INT64 | DECIMAL | DecimalType(scale=4, precision=10) | | col\_float | DOUBLE | — | — | | col\_real | FLOAT | — | — | | col\_date | INT32 | DATE | — | | col\_time | INT64 | — | TimeType(isAdjustedToUTC=0, unit=MICROS) | | col\_datetime | INT64 | TIMESTAMP\_MILLIS | — | | col\_datetime2 | INT64 | TIMESTAMP\_MILLIS | — | | col\_datetimeoffset | BYTE\_ARRAY | UTF8 | StringType() | | col\_smalldatetime | INT64 | TIMESTAMP\_MILLIS | — | | col\_char | BYTE\_ARRAY | UTF8 | StringType() | | col\_varchar | BYTE\_ARRAY | UTF8 | StringType() | | col\_nchar | BYTE\_ARRAY | UTF8 | StringType() | | col\_nvarchar | BYTE\_ARRAY | UTF8 | StringType() | | col\_text | BYTE\_ARRAY | UTF8 | StringType() | | col\_ntext | BYTE\_ARRAY | UTF8 | StringType() | | col\_binary | BYTE\_ARRAY | — | — | | col\_varbinary | BYTE\_ARRAY | — | — | | col\_image | BYTE\_ARRAY | — | — | | col\_uniqueidentifier | BYTE\_ARRAY | UTF8 | StringType() | | col\_xml | BYTE\_ARRAY | UTF8 | StringType() | | col\_sql\_variant | BYTE\_ARRAY | UTF8 | StringType() | | col\_geography | BYTE\_ARRAY | UTF8 | StringType() | | col\_geometry | BYTE\_ARRAY | UTF8 | StringType() | | col\_json | BYTE\_ARRAY | UTF8 | StringType() | | col\_vector | BYTE\_ARRAY | UTF8 | StringType() | `col_json` (`json`) and `col_vector` (`vector(3)`) are SQL Server 2025 types, tested with FastBCP 1.6.4.0. * `json` is exported as text: the JSON document. `vector` is not supported by `mssql` The export succeeds, but every `vector` value is written as the text ``Microsoft.Data.SqlTypes.SqlVector`1[System.Single]`` instead of the data. Use [`adbc_mssql`](/1.6/datatypes-conversion/mssql/adbc-parquet.md), which exports a list of floats, or convert the column in `--query`: `CAST(col_vector AS json)` gives the JSON array (`[0.5000000000,1.5000000000,2.5000000000]`). SQL Server refuses `CAST(col_vector AS nvarchar(max))` (error 42211); `nvarchar(4000)` and `varchar(8000)` work. --- # MySQL → Parquet Datatypes conversion mapping when exporting from **MySQL** (`--connectiontype mysql`) to **Parquet** format. | | | | --------------- | --------------- | | **Source** | MySQL (mysql) | | **Format** | Parquet | | **FastBCP** | 1.4.0.0 | | **Test Status** | PASS (Nullable) | ## Parquet Schema: testdatatypes\_nullable[​](#parquet-schema-testdatatypes_nullable "Direct link to Parquet Schema: testdatatypes_nullable") | name | physical\_type | converted\_type | logical\_type | | --------------- | -------------- | ----------------- | ---------------------------------- | | col\_bigint | INT64 | INT\_64 | IntType(bitWidth=64, isSigned=1) | | col\_int | INT32 | INT\_32 | IntType(bitWidth=32, isSigned=1) | | col\_mediumint | INT32 | INT\_32 | IntType(bitWidth=32, isSigned=1) | | col\_smallint | INT32 | INT\_16 | IntType(bitWidth=16, isSigned=1) | | col\_tinyint | BYTE\_ARRAY | UTF8 | StringType() | | col\_bit | BYTE\_ARRAY | UTF8 | StringType() | | col\_decimal | INT64 | DECIMAL | DecimalType(scale=2, precision=18) | | col\_float | FLOAT | — | — | | col\_double | DOUBLE | — | — | | col\_date | INT64 | TIMESTAMP\_MILLIS | — | | col\_time | BYTE\_ARRAY | UTF8 | StringType() | | col\_datetime | INT64 | TIMESTAMP\_MILLIS | — | | col\_timestamp | INT64 | TIMESTAMP\_MILLIS | — | | col\_year | INT32 | INT\_32 | IntType(bitWidth=32, isSigned=1) | | col\_char | BYTE\_ARRAY | UTF8 | StringType() | | col\_varchar | BYTE\_ARRAY | UTF8 | StringType() | | col\_tinytext | BYTE\_ARRAY | UTF8 | StringType() | | col\_text | BYTE\_ARRAY | UTF8 | StringType() | | col\_mediumtext | BYTE\_ARRAY | UTF8 | StringType() | | col\_longtext | BYTE\_ARRAY | UTF8 | StringType() | | col\_binary | BYTE\_ARRAY | — | — | | col\_varbinary | BYTE\_ARRAY | — | — | | col\_tinyblob | BYTE\_ARRAY | — | — | | col\_blob | BYTE\_ARRAY | — | — | | col\_mediumblob | BYTE\_ARRAY | — | — | | col\_longblob | BYTE\_ARRAY | — | — | | col\_enum | BYTE\_ARRAY | UTF8 | StringType() | | col\_set | BYTE\_ARRAY | UTF8 | StringType() | | col\_json | BYTE\_ARRAY | UTF8 | StringType() | | col\_geometry | BYTE\_ARRAY | — | — | | col\_point | BYTE\_ARRAY | — | — | | col\_linestring | BYTE\_ARRAY | — | — | | col\_polygon | BYTE\_ARRAY | — | — | ## Notes[​](#notes "Direct link to Notes") * `BIGINT UNSIGNED` is written as an unsigned 64-bit integer (INT64 with the `UINT_64` logical type, `UBIGINT` in DuckDB) since FastBCP 1.6.4; it was written as text before. --- # Oracle (ADBC) → Parquet Datatypes conversion mapping when exporting from **Oracle** using the ADBC connector (`--connectiontype adbc_oracle`) to **Parquet** format. Platform availability The ADBC FastDriver connectors are available on **Windows x64** and **Linux x64** only. They are **not** supported on **Linux ARM64**. info The ADBC connector does not map every type the way the standard [`oraodp`](/1.6/datatypes-conversion/oracle/parquet.md) driver does. Compare both pages before switching. | | | | --------------- | ------------------------ | | **Source** | Oracle (adbc\_oracle) | | **Format** | Parquet | | **FastBCP** | 1.4.0.0 | | **Test Status** | PARTIAL (21/25 Nullable) | Failed Types The following datatypes are **not supported** with this connector: * `ROWID` — export fails * `UROWID` — export fails * `XMLTYPE` — export fails * `BFILE` — export fails ## Parquet Schema: testdatatypes\_nullable[​](#parquet-schema-testdatatypes_nullable "Direct link to Parquet Schema: testdatatypes_nullable") | name | physical\_type | converted\_type | logical\_type | | ------------------- | ----------------------- | ----------------- | --------------------------------------------- | | COL\_NUMBER | BYTE\_ARRAY | UTF8 | StringType() | | COL\_NUMBER10 | INT64 | — | — | | COL\_NUMBER18\_2 | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=2, precision=18) | | COL\_FLOAT | BYTE\_ARRAY | UTF8 | StringType() | | COL\_BINARY\_FLOAT | FLOAT | — | — | | COL\_BINARY\_DOUBLE | DOUBLE | — | — | | COL\_CHAR | BYTE\_ARRAY | UTF8 | StringType() | | COL\_VARCHAR2 | BYTE\_ARRAY | UTF8 | StringType() | | COL\_NCHAR | BYTE\_ARRAY | UTF8 | StringType() | | COL\_NVARCHAR2 | BYTE\_ARRAY | UTF8 | StringType() | | COL\_CLOB | BYTE\_ARRAY | UTF8 | StringType() | | COL\_NCLOB | BYTE\_ARRAY | UTF8 | StringType() | | COL\_BLOB | BYTE\_ARRAY | — | — | | COL\_RAW | BYTE\_ARRAY | — | — | | COL\_LONG\_RAW | BYTE\_ARRAY | — | — | | COL\_DATE | INT64 | TIMESTAMP\_MILLIS | TimestampType(isAdjustedToUTC=0, unit=MILLIS) | | COL\_TIMESTAMP | INT64 | TIMESTAMP\_MICROS | TimestampType(isAdjustedToUTC=0, unit=MICROS) | | COL\_TIMESTAMP\_TZ | INT64 | TIMESTAMP\_MICROS | TimestampType(isAdjustedToUTC=1, unit=MICROS) | | COL\_TIMESTAMP\_LTZ | INT64 | TIMESTAMP\_MICROS | TimestampType(isAdjustedToUTC=1, unit=MICROS) | | COL\_INTERVAL\_YM | INT64 | — | — | | COL\_INTERVAL\_DS | BYTE\_ARRAY | UTF8 | StringType() | --- # Oracle RMAN backup sets → Parquet Datatypes conversion mapping when exporting a table from **Oracle RMAN backup sets** (full and incremental) using the ArpeOraBackup ADBC driver (`--connectiontype backup_rman`) to **Parquet** format. Platform availability `backup_rman` is available on **Windows x64** and **Linux x64** only. It is **not** supported on **Linux ARM64**. Compared with `adbc_oracle` For the types both connectors read, the mapping is the one of [`adbc_oracle`](/1.6/datatypes-conversion/oracle/adbc-parquet.md), with the same values. | | | | --------------- | -------------------------------------------------------------------------- | | **Source** | Oracle RMAN backup sets (backup\_rman) | | **Format** | Parquet | | **FastBCP** | 1.6.4.0 | | **Test Status** | OK (16/16 Nullable) — Oracle 19c, 23ai and 26ai backups, every compression | ## Parquet Schema[​](#parquet-schema "Direct link to Parquet Schema") | Oracle type | physical\_type | converted\_type | logical\_type | | ----------------------------------- | ----------------------- | ----------------- | --------------------------------------------- | | `NUMBER(10)` | INT64 | — | — | | `NUMBER` | BYTE\_ARRAY | UTF8 | StringType() | | `FLOAT` | BYTE\_ARRAY | UTF8 | StringType() | | `NUMBER(18)` | INT64 | — | — | | `NUMBER(12,4)` | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=4, precision=12) | | `NUMBER(38)` | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=0, precision=38) | | `VARCHAR2(200)` | BYTE\_ARRAY | UTF8 | StringType() | | `CHAR(10)` | BYTE\_ARRAY | UTF8 | StringType() | | `NVARCHAR2(100)` | BYTE\_ARRAY | UTF8 | StringType() | | `NCHAR(5)` | BYTE\_ARRAY | UTF8 | StringType() | | `BINARY_FLOAT` | FLOAT | — | — | | `BINARY_DOUBLE` | DOUBLE | — | — | | `DATE` | INT64 | TIMESTAMP\_MILLIS | TimestampType(isAdjustedToUTC=0, unit=MILLIS) | | `TIMESTAMP(0)` | INT64 | TIMESTAMP\_MILLIS | TimestampType(isAdjustedToUTC=0, unit=MILLIS) | | `TIMESTAMP(6)` | INT64 | TIMESTAMP\_MICROS | TimestampType(isAdjustedToUTC=0, unit=MICROS) | | `TIMESTAMP(9)` | INT64 | — | TimestampType(isAdjustedToUTC=0, unit=NANOS) | | `TIMESTAMP(6) WITH TIME ZONE` | INT64 | TIMESTAMP\_MICROS | TimestampType(isAdjustedToUTC=1, unit=MICROS) | | `TIMESTAMP(6) WITH LOCAL TIME ZONE` | INT64 | TIMESTAMP\_MICROS | TimestampType(isAdjustedToUTC=1, unit=MICROS) | | `RAW(100)` | BYTE\_ARRAY | — | — | | `LONG` | BYTE\_ARRAY | UTF8 | StringType() | | `LONG RAW` | BYTE\_ARRAY | — | — | Refused columns LOB (`CLOB`, `NCLOB`, `BLOB`, `BFILE`), `INTERVAL`, `ROWID` / `UROWID`, `JSON`, `VECTOR`, `XMLTYPE` and object columns cannot be exported: a table with such a column is refused with a message naming the column. Export the other columns by listing them in `--query`. --- # Oracle → Parquet Datatypes conversion mapping when exporting from **Oracle** (`--connectiontype oraodp`) to **Parquet** format. | | | | --------------- | --------------- | | **Source** | Oracle (oraodp) | | **Format** | Parquet | | **FastBCP** | 1.4.0.0 | | **Test Status** | PASS (Nullable) | ## Parquet Schema: testdatatypes\_nullable[​](#parquet-schema-testdatatypes_nullable "Direct link to Parquet Schema: testdatatypes_nullable") | name | physical\_type | converted\_type | logical\_type | | ------------------- | ----------------------- | ----------------- | ----------------------------------- | | COL\_NUMBER | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=18, precision=38) | | COL\_NUMBER10 | INT64 | INT\_64 | IntType(bitWidth=64, isSigned=1) | | COL\_NUMBER18\_2 | INT64 | DECIMAL | DecimalType(scale=2, precision=18) | | COL\_FLOAT | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=18, precision=38) | | COL\_BINARY\_FLOAT | FLOAT | — | — | | COL\_BINARY\_DOUBLE | DOUBLE | — | — | | COL\_CHAR | BYTE\_ARRAY | UTF8 | StringType() | | COL\_VARCHAR2 | BYTE\_ARRAY | UTF8 | StringType() | | COL\_NCHAR | BYTE\_ARRAY | UTF8 | StringType() | | COL\_NVARCHAR2 | BYTE\_ARRAY | UTF8 | StringType() | | COL\_CLOB | BYTE\_ARRAY | UTF8 | StringType() | | COL\_NCLOB | BYTE\_ARRAY | UTF8 | StringType() | | COL\_BLOB | BYTE\_ARRAY | — | — | | COL\_RAW | BYTE\_ARRAY | — | — | | COL\_LONG\_RAW | BYTE\_ARRAY | — | — | | COL\_DATE | INT64 | TIMESTAMP\_MILLIS | — | | COL\_TIMESTAMP | INT64 | TIMESTAMP\_MILLIS | — | | COL\_TIMESTAMP\_TZ | BYTE\_ARRAY | UTF8 | StringType() | | COL\_TIMESTAMP\_LTZ | INT64 | TIMESTAMP\_MILLIS | — | | COL\_INTERVAL\_YM | INT64 | INT\_64 | IntType(bitWidth=64, isSigned=1) | | COL\_INTERVAL\_DS | BYTE\_ARRAY | UTF8 | StringType() | | COL\_ROWID | BYTE\_ARRAY | UTF8 | StringType() | | COL\_UROWID | BYTE\_ARRAY | UTF8 | StringType() | | COL\_XMLTYPE | BYTE\_ARRAY | UTF8 | StringType() | | COL\_BFILE | BYTE\_ARRAY | — | — | --- # Datatypes Conversion When FastBCP exports a table, every native source column type is mapped to a type in the target output format. This section documents the **exact mappings** FastBCP produces. These pages are not a specification: each one is the Parquet schema read back from a real export of a test table covering all of the source's native datatypes. ## Supported Sources[​](#supported-sources "Direct link to Supported Sources") Sources are grouped by database system. A system can be read through several connection types (`--connectiontype`), and each one has its own page because the mappings it produces can differ — `pgcopy` produces exactly the same mappings as `pgsql`, while the ADBC connectors differ from their standard counterparts on several types. Mappings per connection type One page per database system and connection type (--connectiontype) * [![](/img/logos/sqlserver.svg)SQL Server](/1.6/datatypes-conversion/mssql/parquet.md)`mssql` * [![](/img/logos/sqlserver.svg)SQL Server](/1.6/datatypes-conversion/mssql/adbc-parquet.md)`adbc_mssql` * [![](/img/logos/sqlserver.svg)SQL Server](/1.6/datatypes-conversion/mssql/backup-parquet.md)`backup_mssql` (backup files) * [![](/img/logos/mysql.svg)MySQL](/1.6/datatypes-conversion/mysql/parquet.md)`mysql` * [![](/img/logos/oracle.svg)Oracle](/1.6/datatypes-conversion/oracle/parquet.md)`oraodp` * [![](/img/logos/oracle.svg)Oracle](/1.6/datatypes-conversion/oracle/adbc-parquet.md)`adbc_oracle` * [![](/img/logos/oracle.svg)Oracle](/1.6/datatypes-conversion/oracle/backup-parquet.md)`backup_rman` (RMAN backup sets) * [![](/img/logos/postgresql.svg)PostgreSQL](/1.6/datatypes-conversion/postgresql/parquet.md)`pgsql` * [![](/img/logos/postgresql.svg)PostgreSQL](/1.6/datatypes-conversion/postgresql-copy/parquet.md)`pgcopy` * [![](/img/logos/postgresql.svg)PostgreSQL](/1.6/datatypes-conversion/postgresql/adbc-parquet.md)`adbc_pgsql` * [![](/img/logos/sap.svg)SAP HANA](/1.6/datatypes-conversion/saphana/parquet.md)`hana` * [![](/img/logos/teradata.svg)Teradata](/1.6/datatypes-conversion/teradata/parquet.md)`teradata` Parquet is the only output format documented here. ## How to Read a Page[​](#how-to-read-a-page "Direct link to How to Read a Page") Each page opens with a summary of the export it documents — source, output format, the FastBCP build used and the test status — followed by the Parquet schema produced from the **`testdatatypes_nullable`** table, in which every column accepts `NULL`. | Column | Description | | ------------------- | ------------------------------------------------------------------------------------------------------------------------- | | **name** | The column name in the source table | | **physical\_type** | The Parquet physical storage type: `BOOLEAN`, `INT32`, `INT64`, `FLOAT`, `DOUBLE`, `BYTE_ARRAY` or `FIXED_LEN_BYTE_ARRAY` | | **converted\_type** | The legacy Parquet annotation on top of it (`UTF8`, `DECIMAL`, `DATE`, `TIMESTAMP_MILLIS`, …) | | **logical\_type** | The modern Parquet annotation (`StringType()`, `DecimalType(scale=2, precision=18)`, `IntType(…)`, …) | A `—` means the column carries no annotation of that kind, so the physical type alone describes it. Good to know **NOT NULL columns**: declaring the source columns `NOT NULL` does not change the mapping. The only difference is the Parquet repetition level (REQUIRED instead of OPTIONAL), which these tables do not show. --- # PostgreSQL COPY → Parquet Datatypes conversion mapping when exporting from **PostgreSQL** using the COPY protocol (`--connectiontype pgcopy`) to **Parquet** format. info The COPY protocol variant produces the same type mappings as the standard PostgreSQL driver. See also [PostgreSQL (pgsql)](/1.6/datatypes-conversion/postgresql/parquet.md). | | | | --------------- | ------------------------ | | **Source** | PostgreSQL COPY (pgcopy) | | **Format** | Parquet | | **FastBCP** | 1.4.0.0 | | **Test Status** | PASS (Nullable) | ## Parquet Schema: testdatatypes\_nullable[​](#parquet-schema-testdatatypes_nullable "Direct link to Parquet Schema: testdatatypes_nullable") | name | physical\_type | converted\_type | logical\_type | | ---------------------- | ----------------------- | ----------------- | ---------------------------------------- | | col\_bigint | INT64 | INT\_64 | IntType(bitWidth=64, isSigned=1) | | col\_integer | INT32 | INT\_32 | IntType(bitWidth=32, isSigned=1) | | col\_smallint | INT32 | INT\_16 | IntType(bitWidth=16, isSigned=1) | | col\_boolean | BOOLEAN | — | — | | col\_numeric | INT64 | DECIMAL | DecimalType(scale=2, precision=18) | | col\_real | FLOAT | — | — | | col\_double\_precision | DOUBLE | — | — | | col\_money | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=4, precision=19) | | col\_date | INT32 | DATE | — | | col\_time | INT32 | TIME\_MILLIS | TimeType(isAdjustedToUTC=0, unit=MILLIS) | | col\_timestamp | INT64 | TIMESTAMP\_MILLIS | — | | col\_timestamptz | BYTE\_ARRAY | UTF8 | StringType() | | col\_interval | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | col\_char | BYTE\_ARRAY | UTF8 | StringType() | | col\_varchar | BYTE\_ARRAY | UTF8 | StringType() | | col\_text | BYTE\_ARRAY | UTF8 | StringType() | | col\_bytea | BYTE\_ARRAY | — | — | | col\_uuid | BYTE\_ARRAY | UTF8 | StringType() | | col\_json | BYTE\_ARRAY | UTF8 | StringType() | | col\_jsonb | BYTE\_ARRAY | — | — | | col\_xml | BYTE\_ARRAY | UTF8 | StringType() | | col\_inet | BYTE\_ARRAY | UTF8 | StringType() | | col\_cidr | BYTE\_ARRAY | UTF8 | StringType() | | col\_macaddr | BYTE\_ARRAY | UTF8 | StringType() | | col\_point | BYTE\_ARRAY | UTF8 | StringType() | | col\_line | BYTE\_ARRAY | UTF8 | StringType() | | col\_lseg | BYTE\_ARRAY | UTF8 | StringType() | | col\_box | BYTE\_ARRAY | UTF8 | StringType() | | col\_path | BYTE\_ARRAY | UTF8 | StringType() | | col\_polygon | BYTE\_ARRAY | UTF8 | StringType() | | col\_circle | BYTE\_ARRAY | UTF8 | StringType() | | col\_int4range | BYTE\_ARRAY | UTF8 | StringType() | | col\_int8range | BYTE\_ARRAY | UTF8 | StringType() | | col\_numrange | BYTE\_ARRAY | UTF8 | StringType() | | col\_tsrange | BYTE\_ARRAY | UTF8 | StringType() | | col\_tstzrange | BYTE\_ARRAY | UTF8 | StringType() | | col\_daterange | BYTE\_ARRAY | UTF8 | StringType() | | col\_bit | BYTE\_ARRAY | UTF8 | StringType() | | col\_bit\_varying | BYTE\_ARRAY | UTF8 | StringType() | | col\_oid | BYTE\_ARRAY | UTF8 | StringType() | | col\_int\_array | BYTE\_ARRAY | UTF8 | StringType() | --- # PostgreSQL (ADBC) → Parquet Datatypes conversion mapping when exporting from **PostgreSQL** using the ADBC connector (`--connectiontype adbc_pgsql`) to **Parquet** format. Platform availability The ADBC FastDriver connectors (`adbc_mssql`, `adbc_pgsql`) are available on **Windows x64** and **Linux x64** only. They are **not** supported on **Linux ARM64**. info The ADBC connector does not map every type the way the standard [`pgsql`](/1.6/datatypes-conversion/postgresql/parquet.md) driver does. Compare both pages before switching. | | | | --------------- | ------------------------ | | **Source** | PostgreSQL (adbc\_pgsql) | | **Format** | Parquet | | **FastBCP** | 1.4.0.0 | | **Test Status** | PARTIAL (40/41 Nullable) | Failed Types The following datatype is **not supported** with this connector: * `INTERVAL` — export fails ## Parquet Schema: testdatatypes\_nullable[​](#parquet-schema-testdatatypes_nullable "Direct link to Parquet Schema: testdatatypes_nullable") | name | physical\_type | converted\_type | logical\_type | | ---------------------- | ----------------------- | ----------------- | --------------------------------------------- | | col\_bigint | INT64 | — | — | | col\_integer | INT32 | — | — | | col\_smallint | INT32 | INT\_16 | IntType(bitWidth=16, isSigned=1) | | col\_boolean | BOOLEAN | — | — | | col\_numeric | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=2, precision=18) | | col\_real | FLOAT | — | — | | col\_double\_precision | DOUBLE | — | — | | col\_money | BYTE\_ARRAY | — | — | | col\_date | INT32 | DATE | DateType() | | col\_time | INT64 | — | TimeType(isAdjustedToUTC=0, unit=MICROS) | | col\_timestamp | INT64 | TIMESTAMP\_MICROS | TimestampType(isAdjustedToUTC=0, unit=MICROS) | | col\_timestamptz | INT64 | TIMESTAMP\_MICROS | TimestampType(isAdjustedToUTC=1, unit=MICROS) | | col\_char | BYTE\_ARRAY | UTF8 | StringType() | | col\_varchar | BYTE\_ARRAY | UTF8 | StringType() | | col\_text | BYTE\_ARRAY | UTF8 | StringType() | | col\_bytea | BYTE\_ARRAY | — | — | | col\_uuid | BYTE\_ARRAY | UTF8 | StringType() | | col\_json | BYTE\_ARRAY | UTF8 | StringType() | | col\_jsonb | BYTE\_ARRAY | UTF8 | StringType() | | col\_xml | BYTE\_ARRAY | UTF8 | StringType() | | col\_inet | BYTE\_ARRAY | UTF8 | StringType() | | col\_cidr | BYTE\_ARRAY | UTF8 | StringType() | | col\_macaddr | BYTE\_ARRAY | UTF8 | StringType() | | col\_point | BYTE\_ARRAY | — | — | | col\_line | BYTE\_ARRAY | — | — | | col\_lseg | BYTE\_ARRAY | — | — | | col\_box | BYTE\_ARRAY | — | — | | col\_path | BYTE\_ARRAY | — | — | | col\_polygon | BYTE\_ARRAY | — | — | | col\_circle | BYTE\_ARRAY | — | — | | col\_int4range | BYTE\_ARRAY | — | — | | col\_int8range | BYTE\_ARRAY | — | — | | col\_numrange | BYTE\_ARRAY | — | — | | col\_tsrange | BYTE\_ARRAY | — | — | | col\_tstzrange | BYTE\_ARRAY | — | — | | col\_daterange | BYTE\_ARRAY | — | — | | col\_bit | BYTE\_ARRAY | UTF8 | StringType() | | col\_bit\_varying | BYTE\_ARRAY | UTF8 | StringType() | | col\_oid | INT32 | — | — | | col\_int\_array | BYTE\_ARRAY | — | — | --- # PostgreSQL → Parquet Datatypes conversion mapping when exporting from **PostgreSQL** (`--connectiontype pgsql`) to **Parquet** format. info [PostgreSQL COPY](/1.6/datatypes-conversion/postgresql-copy/parquet.md) (`--connectiontype pgcopy`) produces identical type mappings. The [ADBC connector](/1.6/datatypes-conversion/postgresql/adbc-parquet.md) (`--connectiontype adbc_pgsql`) does not. | | | | --------------- | ------------------ | | **Source** | PostgreSQL (pgsql) | | **Format** | Parquet | | **FastBCP** | 1.4.0.0 | | **Test Status** | PASS (Nullable) | ## Parquet Schema: testdatatypes\_nullable[​](#parquet-schema-testdatatypes_nullable "Direct link to Parquet Schema: testdatatypes_nullable") | name | physical\_type | converted\_type | logical\_type | | ---------------------- | ----------------------- | ----------------- | ---------------------------------------- | | col\_bigint | INT64 | INT\_64 | IntType(bitWidth=64, isSigned=1) | | col\_integer | INT32 | INT\_32 | IntType(bitWidth=32, isSigned=1) | | col\_smallint | INT32 | INT\_16 | IntType(bitWidth=16, isSigned=1) | | col\_boolean | BOOLEAN | — | — | | col\_numeric | INT64 | DECIMAL | DecimalType(scale=2, precision=18) | | col\_real | FLOAT | — | — | | col\_double\_precision | DOUBLE | — | — | | col\_money | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=4, precision=19) | | col\_date | INT32 | DATE | — | | col\_time | INT32 | TIME\_MILLIS | TimeType(isAdjustedToUTC=0, unit=MILLIS) | | col\_timestamp | INT64 | TIMESTAMP\_MILLIS | — | | col\_timestamptz | BYTE\_ARRAY | UTF8 | StringType() | | col\_interval | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | col\_char | BYTE\_ARRAY | UTF8 | StringType() | | col\_varchar | BYTE\_ARRAY | UTF8 | StringType() | | col\_text | BYTE\_ARRAY | UTF8 | StringType() | | col\_bytea | BYTE\_ARRAY | — | — | | col\_uuid | BYTE\_ARRAY | UTF8 | StringType() | | col\_json | BYTE\_ARRAY | UTF8 | StringType() | | col\_jsonb | BYTE\_ARRAY | — | — | | col\_xml | BYTE\_ARRAY | UTF8 | StringType() | | col\_inet | BYTE\_ARRAY | UTF8 | StringType() | | col\_cidr | BYTE\_ARRAY | UTF8 | StringType() | | col\_macaddr | BYTE\_ARRAY | UTF8 | StringType() | | col\_point | BYTE\_ARRAY | UTF8 | StringType() | | col\_line | BYTE\_ARRAY | UTF8 | StringType() | | col\_lseg | BYTE\_ARRAY | UTF8 | StringType() | | col\_box | BYTE\_ARRAY | UTF8 | StringType() | | col\_path | BYTE\_ARRAY | UTF8 | StringType() | | col\_polygon | BYTE\_ARRAY | UTF8 | StringType() | | col\_circle | BYTE\_ARRAY | UTF8 | StringType() | | col\_int4range | BYTE\_ARRAY | UTF8 | StringType() | | col\_int8range | BYTE\_ARRAY | UTF8 | StringType() | | col\_numrange | BYTE\_ARRAY | UTF8 | StringType() | | col\_tsrange | BYTE\_ARRAY | UTF8 | StringType() | | col\_tstzrange | BYTE\_ARRAY | UTF8 | StringType() | | col\_daterange | BYTE\_ARRAY | UTF8 | StringType() | | col\_bit | BYTE\_ARRAY | UTF8 | StringType() | | col\_bit\_varying | BYTE\_ARRAY | UTF8 | StringType() | | col\_oid | BYTE\_ARRAY | UTF8 | StringType() | | col\_int\_array | BYTE\_ARRAY | UTF8 | StringType() | --- # SAP HANA → Parquet Datatypes conversion mapping when exporting from **SAP HANA** (`--connectiontype hana`) to **Parquet** format. | | | | --------------- | --------------- | | **Source** | SAP HANA (hana) | | **Format** | Parquet | | **FastBCP** | 1.4.0.0 | | **Test Status** | PASS (Nullable) | ## Parquet Schema: testdatatypes\_nullable[​](#parquet-schema-testdatatypes_nullable "Direct link to Parquet Schema: testdatatypes_nullable") | name | physical\_type | converted\_type | logical\_type | | ----------------- | -------------- | ----------------- | ---------------------------------- | | COL\_TINYINT | INT32 | UINT\_8 | IntType(bitWidth=8, isSigned=0) | | COL\_SMALLINT | INT32 | INT\_16 | IntType(bitWidth=16, isSigned=1) | | COL\_INTEGER | INT32 | INT\_32 | IntType(bitWidth=32, isSigned=1) | | COL\_BIGINT | INT64 | INT\_64 | IntType(bitWidth=64, isSigned=1) | | COL\_DECIMAL | INT64 | DECIMAL | DecimalType(scale=2, precision=18) | | COL\_SMALLDECIMAL | INT64 | DECIMAL | DecimalType(scale=0, precision=16) | | COL\_REAL | FLOAT | — | — | | COL\_DOUBLE | DOUBLE | — | — | | COL\_FLOAT | DOUBLE | — | — | | COL\_BOOLEAN | BOOLEAN | — | — | | COL\_DATE | INT64 | TIMESTAMP\_MILLIS | — | | COL\_TIME | BYTE\_ARRAY | UTF8 | StringType() | | COL\_TIMESTAMP | INT64 | TIMESTAMP\_MILLIS | — | | COL\_SECONDDATE | INT64 | TIMESTAMP\_MILLIS | — | | COL\_CHAR | BYTE\_ARRAY | UTF8 | StringType() | | COL\_VARCHAR | BYTE\_ARRAY | UTF8 | StringType() | | COL\_NCHAR | BYTE\_ARRAY | UTF8 | StringType() | | COL\_NVARCHAR | BYTE\_ARRAY | UTF8 | StringType() | | COL\_ALPHANUM | BYTE\_ARRAY | UTF8 | StringType() | | COL\_CLOB | BYTE\_ARRAY | UTF8 | StringType() | | COL\_NCLOB | BYTE\_ARRAY | UTF8 | StringType() | | COL\_BLOB | BYTE\_ARRAY | — | — | | COL\_BINARY | BYTE\_ARRAY | — | — | | COL\_VARBINARY | BYTE\_ARRAY | — | — | | COL\_ST\_GEOMETRY | BYTE\_ARRAY | — | — | | COL\_ST\_POINT | BYTE\_ARRAY | — | — | | COL\_SHORTTEXT | BYTE\_ARRAY | UTF8 | StringType() | --- # Teradata → Parquet Datatypes conversion mapping when exporting from **Teradata** (`--connectiontype teradata`) to **Parquet** format. | | | | --------------- | ------------------- | | **Source** | Teradata (teradata) | | **Format** | Parquet | | **FastBCP** | 1.4.0.0 | | **Test Status** | PASS (Nullable) | ## Parquet Schema: testdatatypes\_nullable[​](#parquet-schema-testdatatypes_nullable "Direct link to Parquet Schema: testdatatypes_nullable") | name | physical\_type | converted\_type | logical\_type | | ------------------------ | ----------------------- | ----------------- | ---------------------------------------- | | col\_byteint | INT32 | INT\_16 | IntType(bitWidth=16, isSigned=1) | | col\_smallint | INT32 | INT\_16 | IntType(bitWidth=16, isSigned=1) | | col\_integer | INT32 | INT\_32 | IntType(bitWidth=32, isSigned=1) | | col\_bigint | INT64 | INT\_64 | IntType(bitWidth=64, isSigned=1) | | col\_decimal18\_2 | INT64 | DECIMAL | DecimalType(scale=2, precision=18) | | col\_float | DOUBLE | — | — | | col\_number | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=18, precision=38) | | col\_number18\_2 | INT64 | DECIMAL | DecimalType(scale=2, precision=18) | | col\_date | INT32 | DATE | — | | col\_time | INT64 | — | TimeType(isAdjustedToUTC=0, unit=MICROS) | | col\_timestamp | INT64 | TIMESTAMP\_MILLIS | — | | col\_timestamp\_tz | BYTE\_ARRAY | UTF8 | StringType() | | tdintervalyear | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | tdintervalyeartomonth | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | tdintervalmonth | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | tdintervalday | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | tdintervaldaytohour | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | tdintervaldaytominute | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | tdintervaldaytosecond | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | tdintervalhour | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | tdintervalhourtominute | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | tdintervalhourtosecond | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | tdintervalminute | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | tdintervalminutetosecond | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | tdintervalsecond | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | col\_real | DOUBLE | — | — | | col\_double\_precision | DOUBLE | — | — | | col\_char | BYTE\_ARRAY | UTF8 | StringType() | | col\_varchar | BYTE\_ARRAY | UTF8 | StringType() | | col\_clob | BYTE\_ARRAY | UTF8 | StringType() | | col\_byte | BYTE\_ARRAY | — | — | | col\_varbyte | BYTE\_ARRAY | — | — | | col\_blob | BYTE\_ARRAY | — | — | | col\_period\_date | BYTE\_ARRAY | UTF8 | StringType() | | col\_period\_timestamp | BYTE\_ARRAY | UTF8 | StringType() | | col\_json | BYTE\_ARRAY | UTF8 | StringType() | | col\_xml | BYTE\_ARRAY | UTF8 | StringType() | | col\_st\_geometry | BYTE\_ARRAY | UTF8 | StringType() | --- # Advanced Parameters This section covers advanced configuration options for FastBCP. ## Run ID[​](#run-id "Direct link to Run ID") The Run ID parameter `--runid` is a unique identifier for the current export operation. It can be used for tracking, logging, and monitoring purposes. Information If not specified, FastBCP will generate a unique Run ID automatically. Tips If possible, inject the RunId provided by the caller (e.g., SSIS, Airflow, or any scheduler that supports a run identifier). This will greatly facilitate log correlation and troubleshooting. ``` ./FastBCP \ ... --runid "export-2024-01-09-001" \ ... ``` `--runid`Long form only `--runid ""` ## Log Level[​](#log-level "Direct link to Log Level") The Log Level parameter `--loglevel` controls the verbosity of logging output during export operations. **Available values:** `Information`Default Standard logging with key operation details `Debug` Verbose logging with detailed diagnostic information ``` ./FastBCP \ ... --loglevel "Debug" \ ... ``` `--loglevel`Long form only `--loglevel ""` note If a settings file is specified with `--settingsfile`, the log level defined in the settings file takes precedence unless overridden by the command-line parameter. Information See [Logging Overview](/1.6/documentation/logging/Overview.md) for detailed information about logging configuration and output. ## Settings File[​](#settings-file "Direct link to Settings File") The Settings File parameter `--settingsfile` allows you to store all FastBCP parameters in a configuration file, making it easier to manage complex exports and reuse configurations. ``` ./FastBCP \ ... --settingsfile "/path/to/config/export-config.json" \ ... ``` `--settingsfile`Long form only `--settingsfile ""` Information See [Logging Overview](/1.6/documentation/logging/Overview.md) for examples of settings file configuration. ## Config File[​](#config-file "Direct link to Config File") The Config File parameter `--config` allows you to define all FastBCP parameters in a YAML configuration file. This provides a more structured and readable way to manage export configurations compared to JSON settings files. * Windows * Linux ``` .\FastBCP.exe --config samples\sample_mssql_to_csv.yaml ``` ``` ./FastBCP --config samples/sample_mssql_to_csv.yaml ``` `--config`Long form only `--config ""` ### YAML Configuration Example[​](#yaml-configuration-example "Direct link to YAML Configuration Example") Here's a complete example of a YAML configuration file: ``` # FastBCP – MSSQL to CSV using RangeId parallel method # # Usage: # .\FastBCP.exe --config samples\sample_mssql_to_csv.yaml connection: type: mssql server: localhost database: tpch10_collation_bin2 trusted: true source: schema: dbo table: orders output: file: "mssql_orders_{startdate}.csv" directory: 'D:\temp\{database}\{schema}\{table}\full\' delimiter: "|" decimal_separator: "." date_format: "yyyy-MM-dd HH:mm:ss" encoding: UTF-8 performance: method: RangeId degree: -2 distribute_key_column: o_orderkey merge: false logging: run_id: mssql_to_csv_parallel-2_rangeid ``` Benefits of YAML Configuration * **Structured and readable**: YAML format is more human-friendly than JSON * **Comments support**: Add documentation directly in your configuration files * **Reusable configurations**: Version control your export settings * **Simplified command-line**: Reduce complex exports to a single `--config` parameter ## Traceparent[​](#traceparent "Direct link to Traceparent") The `--traceparent` parameter accepts a [W3C Trace Context](https://www.w3.org/TR/trace-context/) traceparent identifier from an external caller. This enables distributed trace correlation between FastBCP and upstream systems such as orchestrators, APIs, or CI/CD pipelines. Information See [OpenTelemetry](/1.6/documentation/logging/OpenTelemetry.md) for detailed information about configuring OpenTelemetry tracing and log export. ``` ./FastBCP \ ... --traceparent "00-abcdef1234567890abcdef1234567890-1234567890abcdef-01" \ ... ``` `--traceparent`Long form only `--traceparent ""` ## No Banner[​](#no-banner "Direct link to No Banner") Disable the FastBCP banner display in the command line output. This is useful for scripting or when you want cleaner output in automated processes. **Example:** ``` ./FastBCP \ ... --nobanner \ ... ``` `--nobanner` Switch, no value (long form). Clean Output Using `--nobanner` is recommended when running FastBCP 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 ``` .\FastBCP.exe ` --connectiontype "oraodp" ` --server "localhost:1521/OraService" ` --database "tpch" ` --user "FastUser" ` --password "FastPassword" ` --sourceschema "TPCH" ` --sourcetable "ORDERS" ` --directory "D:\temp" ` --fileoutput "orders.xlsx" ` --encoding "UTF-8" ` --parallelmethod "Physical" ` --paralleldegree 7 ` --merge false ` --loglevel "Debug" ` --runid "oracle_to_excel_parallel_physical" ` --settingsfile "C:\config\oracle-export.json" ` --nobanner ``` ``` ./FastBCP \ --connectiontype "oraodp" \ --server "localhost:1521/OraService" \ --database "tpch" \ --user "FastUser" \ --password "FastPassword" \ --sourceschema "TPCH" \ --sourcetable "ORDERS" \ --directory "/temp" \ --fileoutput "orders.xlsx" \ --encoding "UTF-8" \ --parallelmethod "Physical" \ --paralleldegree 7 \ --merge false \ --loglevel "Debug" \ --runid "oracle_to_excel_parallel_physical" \ --settingsfile "/config/oracle-export.json" \ --nobanner ``` This example: * Connects to an Oracle database using the Physical parallel method (resolved to Rowid on Oracle) * Exports ORDERS table to Excel format with UTF-8 encoding * Uses 7 parallel threads with separate files (merge=false) * Enables Debug logging for detailed diagnostics * Uses a custom Run ID for tracking * Loads additional configuration from a settings file * Disables the banner for cleaner output Related * [Logging Overview](/1.6/documentation/logging/Overview.md)logging configuration, output and settings file examples * [OpenTelemetry](/1.6/documentation/logging/OpenTelemetry.md)OpenTelemetry tracing and log export --- # Authentication FastBCP supports two types of authentication methods depending on your database platform. ## Authentication Methods[​](#authentication-methods "Direct link to Authentication Methods") ### 1. Trusted Connection[​](#1-trusted-connection "Direct link to 1. Trusted Connection") Uses the current Windows user's credentials or the operating system authentication if allowed by the RDBMS. ``` .\FastBCP.exe ` ... --trusted ` ... ``` `--trusted`or`-A` Switch, no value (short form: `-A`). Warning This method is only available if your RDBMS supports trusted/integrated authentication (e.g., SQL Server with Windows Authentication). ### 2. SQL Login with Username and Password[​](#2-sql-login-with-username-and-password "Direct link to 2. SQL Login with Username and Password") Standard database authentication with explicit credentials. ``` ./FastBCP ` ... --user "myuser" ` --password "mypassword" ` ... ``` `--user`or`-U` Username: `--user "username"` (short form: `-U "username"`) `--password`or`-X` Password: `--password "password"` (short form: `-X "password"`) ### Alternative: Connection String Parameter[​](#alternative-connection-string-parameter "Direct link to Alternative: Connection String Parameter") You can also use the `--sourceconnectstring` parameter where you pass the user and password directly in the connection string. This parameter will be covered in detail in the [Connection Parameters](/1.6/documentation/cli/connection_parameters.md#source-connection-string) section. Password Security in Logs All passwords passed either through the `--password` parameter or within the `--sourceconnectstring` parameter 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 FASTBCP\_USER and FASTBCP\_PASSWORD for exemple or store the password in an encrypted file. Up to you to decrypt the file and it’s content before using it in a shell variable that will be used with FastBCP. Related * [Connection Parameters](/1.6/documentation/cli/connection_parameters.md#source-connection-string)the `--sourceconnectstring` parameter --- # Cloud Options FastBCP supports direct exports to cloud storage platforms: AWS S3, Azure Blob Storage, Azure Data Lake Gen2, and Google Cloud Storage. For detailed cloud authentication setup and configuration, see the [Cloud Connectivity](/1.6/documentation/cloud-connectivity/overview.md) documentation. note FastBCP will use multi-part uploads for all cloud provider Warning Since FastBCP 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**. ## Supported Cloud Platforms[​](#supported-cloud-platforms "Direct link to Supported Cloud Platforms") To export data to a cloud storage service, use the URI scheme specific to your target destination with the `--directory` value: ![](/img/logos/aws-s3.png)AWS S3 `s3://`Scheme`my-bucket`Bucket/`data/`Path ![](/img/logos/gcs.png)Google Cloud Storage `gs://`Scheme`my-bucket`Bucket/`data/`Path ![](/img/logos/azure-blob.svg)Azure Blob `abs://`Scheme`myaccount.blob.core.windows.net`Account/`mycontainer`Container/`mydir/`Path ![](/img/logos/azure-blob.svg)Azure Data Lake Gen2 `abfss://`Scheme`myaccount.dfs.core.windows.net`Account/`mycontainer`Container/`mydir/`Path ![](/img/logos/onelake.png)OneLake `onelake://`Scheme`MyWorSpace`Workspace/`MyLakeHouse`Lakehouse/`MyDir/`Path S3-Compatible (MinIO, OVH, etc.) `s3://`Scheme`mybucket`Bucket/`export/`Path ## Cloud Profile[​](#cloud-profile "Direct link to Cloud Profile") You can use the `--cloudprofile` parameter to specify which cloud credentials profile to use. ``` ./FastBCP \ ... --directory "s3://my-bucket/exports" \ --fileoutput "orders.parquet" \ --cloudprofile "production" \ ... ``` `--cloudprofile` Syntax: `--cloudprofile ` (long form). Cloud Connectivity Authentication setup and configuration for each platform * [Cloud Connectivity Overview](/1.6/documentation/cloud-connectivity/overview.md) * [![](/img/logos/aws-s3.png)AWS S3](/1.6/documentation/cloud-connectivity/aws-s3.md) * [![](/img/logos/azure-blob.svg)Azure](/1.6/documentation/cloud-connectivity/azure.md) * [![](/img/logos/gcs.png)Google Cloud Storage](/1.6/documentation/cloud-connectivity/google-cloud.md) * [![](/img/logos/onelake.png)OneLake](/1.6/documentation/cloud-connectivity/onelake.md) --- # Connection Parameters FastBCP requires connection information to access your database. This page covers all connection-related parameters. ## Connection Type[​](#connection-type "Direct link to Connection Type") Specify the type of database connection driver to use. This parameter determines how FastBCP connects to your database. ``` ./FastBCP \ ... --connectiontype mssql \ ... ``` `--connectiontype`or`-C` `--connectiontype "connection_type"` (short form: `-C "connection_type"`), one of the types below. **Available Connection Types**, grouped by database. The types marked **ADBC** use an ADBC driver: see [ADBC Connectors](#adbc-connectors) below the cards. ![](/img/logos/sqlserver.svg)SQL Server * `mssql`Microsoft SQL Server (default) * `adbc_mssql`ADBCMicrosoft SQL Server via ADBC (Arpe.io ADBC FastDriver) - 2x faster for Parquet exports * `backup_mssql`ADBCSQL Server full and differential backup files (`.bak`) read directly, without restoring them (embedded ArpeMSBackup ADBC driver) - see [SQL Server backup files](#sql-server-backup-files-backup_mssql) ![](/img/logos/postgresql.svg)PostgreSQL * `pgsql`PostgreSQL standard connection * `pgcopy`PostgreSQL with COPY protocol * `adbc_pgsql`ADBCPostgreSQL via ADBC (Arpe.io ADBC FastDriver) - ultra-fast Parquet exports ![](/img/logos/oracle.svg)Oracle * `oraodp`Oracle Data Provider * `adbc_oracle`ADBCOracle via ADBC (Arpe.io ADBC FastDriver) - ultra-fast Parquet exports * `backup_rman`ADBCOracle RMAN backup sets, full and incremental, read directly, without Oracle and without restoring them (embedded ArpeOraBackup ADBC driver) - see [Oracle RMAN backup sets](#oracle-rman-backup-sets-backup_rman) ![](/img/logos/teradata.svg)Teradata * `teradata`Teradata database * `adbc_teradata`ADBCTeradata via ADBC (embedded ArpeTeradata driver) - TLS logon needs no Teradata client software IBM Netezza * `nzsql`IBM Netezza * `adbc_netezza`ADBCNetezza / IBM NPS via ADBC (embedded ArpeNetezza driver) - no NZdotNET needed, works with IBM Cloud NPS ![](/img/logos/mysql.svg)MySQL / MariaDB * `mysql`MySQL/MariaDB database ![](/img/logos/sap.svg)SAP HANA * `hana`SAP HANA database ClickHouse * `clickhouse`ClickHouse database Generic drivers * `odbc`Generic ODBC connection * `oledb`Generic OLE DB connection ### ADBC Connectors[​](#adbc-connectors "Direct link to ADBC Connectors") The ADBC FastDriver connectors, marked **ADBC** above, share three rules: * `adbc_mssql` * `adbc_pgsql` * `adbc_oracle` * `adbc_netezza` * `adbc_teradata` * `backup_mssql` * `backup_rman` - Windows x64 and Linux x64 onlyAvailable on **Windows x64** and **Linux x64** only, **not** supported on **Linux ARM64**. - Parquet output onlyThey only support exporting to **Parquet** format. No other output format is supported with these connection types. - ADBC end to endSince FastBCP 1.3, they run fully on their ADBC driver: the metadata and planning step (row counts, column types, `Ntile`, `Random`, `Timepartition`, `DBPartition`, …) uses the same driver and the same connection string as the data step. No SqlClient, Npgsql, ODP.NET or NZdotNET is involved. ## DSN (Data Source Name)[​](#dsn-data-source-name "Direct link to DSN (Data Source Name)") If you have chosen an ODBC connection type, you must define the DSN with the `--dsn` parameter, or alternatively define a connection string using `--sourceconnectstring`. ``` ./FastBCP \ ... --connectiontype odbc \ --dsn "MyODBCDataSource" \ ... ``` `--dsn`or`-N` `--dsn "DSN_name"` (short form: `-N "DSN_name"`) ## Provider[​](#provider "Direct link to Provider") If you have chosen an OLEDB connection type, you must define the OLEDB provider with the `--provider` parameter. ``` ./FastBCP \ ... --connectiontype oledb \ --provider MSOLEDBSQL \ ... ``` ``` ./FastBCP \ ... --connectiontype oledb \ --provider NZOLEDB \ ... ``` `--provider`or`-P` `--provider "provider_name"` (short form: `-P "provider_name"`) ## Server[​](#server "Direct link to Server") Except if you have defined a connection string (`--sourceconnectstring`), you must define a server (or could also be a TNS entry for Oracle). `--server`or`-S` `--server "server"` (short form: `-S "server"`) ### Server Format Examples[​](#server-format-examples "Direct link to Server Format Examples") The server parameter accepts different formats depending on your database: IP address or DNS name `myserver.mydomain.com`Host IP address or DNS name with port number `myserver.mydomain.com`Host: or ,`2433`Port IP address or DNS name with named instance `myserver.mydomain.com`Host\\`myinstance`Named instance Oracle: Easy Connect string `myserver.mydomain.com`Host:`1521`Port/`myinstance`Instance SQL Server backup files (`backup_mssql`) `D:\Backups\MSSQL`Directory holding the backups Oracle RMAN backup sets (`backup_rman`) `/backup/rman/orcl`Directory holding the backup pieces ``` ./FastBCP \ ... --server "myserver.mydomain.com:2433" \ ... ``` ## Trusted or User & Password[​](#trusted-or-user--password "Direct link to Trusted or User & Password") ### Trusted[​](#trusted "Direct link to Trusted") You can used a trusted (Windows or Kerberos Authentication) using the `--trusted` switch parameter. ``` ./FastBCP \ ... --server "myserver.mydomain.com\myinstance \ --trusted \ --database MySourceDB" \ ... ``` ### User and Password[​](#user-and-password "Direct link to User and Password") You can also provide a user and password the `--user` and `--password` can be used like this ``` ./FastBCP \ ... --server "myserver.mydomain.com\myinstance \ --user "FastUser" \ --password "FastPassword" \ --database MySourceDB" \ ... ``` ## 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 database. This connection string will override any other connection parameters and can be used if the other authentication mode are not enougth for your case You can use the connection string for any connection type. The connection string must be enclosed in double quotes. **Example:** ``` ./FastBCP \ ... --sourceconnectstring "Server=myserver;Database=mydb;User ID=FastUser;Password=FastPassword;Encrypt=True;TrustServerCertificate=True" ... ``` `--sourceconnectstring`or`-g` `--sourceconnectstring "connection_string"` (short form: `-g "connection_string"`) Passwords in logs Passwords are masked in logs and telemetry, including quoted passwords containing `;` (e.g. `Password="p;w=1"`). ### Connection Strings with ADBC Connectors[​](#connection-strings-with-adbc-connectors "Direct link to Connection Strings with ADBC Connectors") With the ADBC connection types (`adbc_mssql`, `adbc_pgsql`, `adbc_oracle`, `adbc_netezza`, `adbc_teradata`), `--sourceconnectstring` accepts: * Native syntaxthe native syntax of the database (ADO.NET-style `Key=Value;` pairs), translated to the driver keys * Explicit keysexplicit `adbc.*` / `arpeio.*` keys, which win over translated keys * Whole connectiona whole-connection `uri` / `adbc..connection_string` Good to know * Native keys with no driver equivalent (e.g. `Pooling=false`) are dropped with a warning. With a whole-connection `uri` / `connection_string`, native keys are dropped with a warning: put them inside the URI / connection string instead. * A `Driver=` path in `--sourceconnectstring` is used for both the metadata and the data step. #### adbc\_netezza[​](#adbc_netezza "Direct link to adbc_netezza") Keys do not need the `adbc.arpenz.` prefix. All of the following are accepted: | Kind | Keys | | ----------------------- | ----------------------------------------------------------------------------------------------------------- | | Friendly / ADO.NET keys | `Server`, `Host`, `host:port`, `Port`, `Database`, `User ID`, `Password`, `SSL Mode`, `Application Name`, … | | Plain driver keys | `sslmode`, `tls_min_version`, `char_encoding`, `login_timeout`, … | | Whole connection | `uri`, `connection_string` | Keys the driver does not support (e.g. `propagate`, `Pooling`) are ignored, with a single warning. `Application Name` defaults to `FastBCP`. ``` ./FastBCP \ --connectiontype adbc_netezza \ --sourceconnectstring "Server=nps-host;Port=5480;Database=SALES;User ID=admin;Password=FastPassword;SSL Mode=require" \ ... ``` NPS 7.x NPS 7.x servers only offer TLS 1.0/1.1. Add `tls_min_version=1.0` to the connection string to connect to them. #### adbc\_pgsql[​](#adbc_pgsql "Direct link to adbc_pgsql") Like `--connectiontype pgsql`, `--connectiontype adbc_pgsql` honours `PGUSER`, `PGPASSWORD`, `PGPASSFILE` / `~/.pgpass` and `PGSSLROOTCERT` when `--user` / `--password` / `--sourceconnectstring` do not provide them. NaN in NUMERIC columns A `NaN` in a `NUMERIC` column fails the read. Add `adbc.arpepgsql.numeric_special=null` to `--sourceconnectstring` to read it as `NULL` instead. #### adbc\_oracle[​](#adbc_oracle "Direct link to adbc_oracle") Like `--connectiontype oraodp`, `--connectiontype adbc_oracle` resolves TNS aliases through `tnsnames.ora` (looked up in `TNS_ADMIN`, then `$ORACLE_HOME/network/admin`), so `--server` can be a TNS alias. Network encryption and data integrity are negotiated with `encryption=accepted` and `data_integrity=accepted`, so the server decides, as with `--connectiontype oraodp`. Use the `FASTBCP_ADBC_ENCRYPTION` / `FASTBCP_ADBC_DATA_INTEGRITY` environment variables or explicit keys to override this. #### adbc\_teradata[​](#adbc_teradata "Direct link to adbc_teradata") `--connectiontype adbc_teradata` reads Teradata through the embedded **ArpeTeradata** ADBC driver, for both the metadata step and the data step. It uses the Teradata SQL dialect, like `--connectiontype teradata`. ``` ./FastBCP \ --connectiontype adbc_teradata \ --server "td-host" \ --user "FastUser" \ --password "FastPassword" \ --database "TPCH" \ ... ``` Connection: parameters and connection string keys * `--server host[:port]` (legacy port, default `1025`), `--user`, `--password` and an optional `--database`, or a `--sourceconnectstring` in the Teradata provider spelling. * Keys translated from `--sourceconnectstring`: `Host` / `Server` / `Data Source`, `Port` / `DBS Port` / `Port Number`, `Database` / `Initial Catalog`, `User Id` / `User Name` / `UID`, `Password` / `PWD`, `SSL Mode`, `HTTPS Port`, `SSL CA`, `SSL CA Path`, `TMODE`, `Login Timeout` / `Connect Timeout` / `Connection Timeout`, `Query Timeout`, `TTU Path`. Explicit `adbc.arpeteradata.*` keys are passed as is and win. * Trusted authentication (`--trusted`) is **not supported**: FastBCP stops with `-C adbc_teradata does not support trusted (-A) authentication: give -U and -X`. Logon and Teradata Tools and Utilities (TTU) * The default logon (`sslmode=prefer`) uses TLS on the HTTPS port (443) and needs no Teradata client software. * When the server has no TLS, the driver falls back to the legacy port (1025). `sslmode=disable` in `--sourceconnectstring` always uses the legacy port. The legacy-port logon needs the customer's TTU (CLIv2). * **Linux:** FastBCP looks for TTU in the [`FASTBCP_TTU_PATH`](/1.6/documentation/environment-variables/fastbcp-ttu-path.md) environment variable, then in a `ttu` or `TeradataToolsAndUtilitiesBase` directory next to the FastBCP binary. The library directory found is passed to the driver (`adbc.arpeteradata.ttu_path`) and logged. When nothing is found, the driver searches itself (`ARPETERADATA_TTU_PATH`, `/opt/teradata/client`, the system library path). * **Windows:** FastBCP passes nothing; the driver finds `wincli32.dll` itself (`ARPETERADATA_TTU_PATH`, its own directory, the registered TTU installation). See [FASTBCP\_TTU\_PATH](/1.6/documentation/environment-variables/fastbcp-ttu-path.md) for the TTU folder layouts accepted on Linux and how to prepare Teradata's TTU download without installing it. ## SQL Server Backup Files (backup\_mssql)[​](#sql-server-backup-files-backup_mssql "Direct link to SQL Server Backup Files (backup_mssql)") `--connectiontype backup_mssql` reads SQL Server **full and differential backups** (`.bak` files) directly, **without restoring them** and without any SQL Server instance, through the embedded **ArpeMSBackup** ADBC driver (metadata and data steps). The backup is read in place (random access by page): it is never loaded in memory, so backups much larger than the RAM are read with a bounded memory. `--server` The **directory** of the backups (`D:\Backups\MSSQL`, `/var/opt/mssql/backup`). `--database` Names the **backup files** in that directory: a file name, a pattern (`*`, `?`), or a list separated by `;`, in any order. With a full backup and its differentials, name them all: see [Differential backups](#differential-backups). `--user`/`--password`Encrypted only No database credentials: `--trusted` is not used, and `--user` and `--password` only serve for [encrypted backups](#encrypted-backups), where they name the private key of the certificate. `--sourceconnectstring` only serves to set driver options, such as [`adbc.arpemsbackup.geospatial`](/1.6/datatypes-conversion/mssql/backup-parquet.md). The driver is licensed like the other Arpe.io ADBC FastDrivers. * Single backup * Striped backup, on Linux ``` ./FastBCP \ --connectiontype backup_mssql \ --server "D:\Backups\MSSQL" \ --database "tpch_full.bak" \ --sourceschema "dbo" \ --sourcetable "orders" \ --directory "D:\export\orders" \ --fileoutput "orders.parquet" \ --parallelmethod "Physical" \ --paralleldegree 8 ``` ``` ./FastBCP \ --connectiontype backup_mssql \ --server "/var/opt/mssql/backup" \ --database "tpch_*.bak" \ --sourceschema "dbo" \ --sourcetable "lineitem" \ --directory "/export/lineitem" \ --fileoutput "lineitem.parquet" \ --parallelmethod "Physical" \ --paralleldegree 8 ``` * Backups read * Tables and data types * Refused * Queries and parallelism - Full backups and copy-only full backups, uncompressed or compressed with **MS\_XPRESS** or **ZSTD**, any `BLOCKSIZE` / `MAXTRANSFERSIZE`. - [**Differential backups**](#differential-backups), with the full backup they were taken from (since FastBCP 1.6.7). Log backups are not applied. - [**Encrypted backups**](#encrypted-backups) (`WITH ENCRYPTION`) and backups of **TDE** databases, with the private key of the certificate (since FastBCP 1.6.6). - **Striped backups** (`BACKUP DATABASE ... TO DISK = a, DISK = b, ...`): name all the stripes with a pattern (`--database "mydb_*.bak"`) or a list separated by `;` (`--database "mydb_1.bak;mydb_2.bak;mydb_3.bak"`), in any order. An incomplete set, stripes of different backups or a lone stripe are refused with a message naming the missing stripes. - **Several backups in one file** (`WITH NOINIT`): the [latest version](#differential-backups) they hold is read, a full backup and its newest differential (a copy-only full backup counts). Up to FastBCP 1.6.6, the last full backup of the file was read. - Databases over **several data files and filegroups**, from **SQL Server 2017, 2019, 2022 and 2025** (Windows or Linux). **Tables read:** rowstore tables (heaps, clustered indexes, partitions, ROW / PAGE compression, LOBs including `text` / `ntext` / `image` and `xml`, row-overflow, sparse columns, computed persisted columns) and **clustered columnstore** tables (including archive compression and the open delta store). **Data types:** a backup and an `adbc_mssql` export of the same table give the same Parquet since FastBCP 1.6.5. See [SQL Server backup files → Parquet](/1.6/datatypes-conversion/mssql/backup-parquet.md). Refused with a clear message: tables with a `json` or `vector(n, float16)` column (SQL Server 2025): list the other columns in `--query` to export them. A damaged or truncated backup stops with an error, and so does [any backup that could be the newest and cannot be used](#backups-that-cannot-be-used). QAT\_DEFLATE backup compression is not supported. * `--sourceschema` / `--sourcetable`, or `--query` limited to `SELECT * | col1, col2, … FROM [schema.]table`. * Parallel methods: `None`, or `Physical`, which resolves to the **Pages** method for this source: each thread reads a slice of the data pages (rowstore) or of the rowgroups (columnstore). See [Parallel parameters](/1.6/documentation/cli/parallel_parameters.md). * Parquet output only. Good to know * **Consistency:** a backup taken while the database is written to is read as its pages are: the transaction log contained in the backup is not replayed. This goes for a differential too: taken during writes, it can give other rows than a `RESTORE` of the same backups. * **Opening a backup again:** the first export from a backup reads its structure; FastBCP keeps it in a small file in the local application data of the user (`%LOCALAPPDATA%\ArpeMSBackup\index` on Windows, `~/.cache/arpemsbackup/index` on Linux), so the next exports from the same backup open in a few milliseconds (since FastBCP 1.6.3). A rewritten or moved backup is opened in full again; files unused for 30 days, or beyond 2 GB in all, are removed automatically. [`FASTBCP_INDEX_DIR`](/1.6/documentation/environment-variables/fastbcp-index-dir.md) names another directory, for an account without a usable home (since FastBCP 1.6.6). ### Differential Backups[​](#differential-backups "Direct link to Differential Backups") Since FastBCP 1.6.7, `--connectiontype backup_mssql` reads the **latest version** of a table: the newest full backup among the files, and the newest differential taken from it. You always get the **whole table**, not what changed. Nothing to set: give FastBCP the files. ``` ./FastBCP \ --connectiontype backup_mssql \ --server "/var/opt/mssql/backup" \ --database "sales_full.bak;sales_diff.bak" \ --sourceschema "dbo" \ --sourcetable "orders" \ --directory "/export/orders" \ --fileoutput "orders.parquet" \ --parallelmethod "Physical" \ --paralleldegree 8 ``` | How the backups are stored | `--database` | | ----------------------------- | ---------------------------------------------------------------------------------------- | | One file each | A list in any order, `"sales_full.bak;sales_diff.bak"`, or a pattern, `"sales_*.bak"` | | Several days in one directory | A pattern, `"sales_*.bak"`: older backups can match too, only the latest version is read | | One file, `WITH NOINIT` | The file, `"sales.bak"` | | Striped | All the stripes of each backup, usually a pattern | FastBCP checks that the differential was taken from that full backup: the names and the order of the files do not matter. A differential holds every change since its full backup, so one is enough. All the files must be in the `--server` directory, and be backups of one database. Encrypted backups work the same way, with the [key of their certificate](#encrypted-backups). ### Backups That Cannot Be Used[​](#backups-that-cannot-be-used "Direct link to Backups That Cannot Be Used") A backup that could be the newest and cannot be used **fails the export, naming it**, rather than reading older data without saying so. That is the case of: * a differential whose full backup is not among the files, * a stripe that is missing, * a backup that is truncated, interrupted or still being written, * a file that matches the pattern and is not a backup, * an encrypted backup without its key, * a file, filegroup or partial backup, * backups of a database and of a restored copy of it. The logs say what can be done about it. Two variables change this behaviour without touching the command: | Variable | Effect | | -------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- | | [`FASTBCP_BACKUP_RESTORE_MODE=best_effort`](/1.6/documentation/environment-variables/fastbcp-backup-restore-mode.md) | The backup is skipped, and the newest usable version is read, however old | | [`FASTBCP_BACKUP_RESTORE_POINT=full`](/1.6/documentation/environment-variables/fastbcp-backup-restore-point.md) | The last full backup of one backup is read, as up to FastBCP 1.6.6 | The options `adbc.arpemsbackup.restore_mode` and `adbc.arpemsbackup.restore_point` in `--sourceconnectstring` do the same, and win over the variables. ### Upgrading to 1.6.7[​](#upgrading-to-1-6-7 "Direct link to Upgrading to 1.6.7") Without these variables, an export can behave differently from FastBCP 1.6.6. Each line was measured on both versions, with backups of SQL Server 2025. * Worked, now fail * Read other rows * Still fail, best\_effort reads them These **worked and now fail**, naming the backup: | With these files | 1.6.6 | To read anyway | | ------------------------------------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | | A `WITH NOINIT` file whose newest differential has its full backup in another file | The older full backup of the file | Give both files, for the newest rows. `FASTBCP_BACKUP_RESTORE_POINT=full` or `FASTBCP_BACKUP_RESTORE_MODE=best_effort`, for the rows of 1.6.6 | | A `WITH NOINIT` file with a file, filegroup or partial backup after the full backup | The tables of that backup, from it; the other tables failed | `FASTBCP_BACKUP_RESTORE_POINT=full`, as 1.6.6. `FASTBCP_BACKUP_RESTORE_MODE=best_effort`, every table from the full backup, so older rows | | A `WITH NOINIT` file whose last differential lost the end of the file, after its data | The older full backup of the file | `FASTBCP_BACKUP_RESTORE_POINT=full` or `FASTBCP_BACKUP_RESTORE_MODE=best_effort`, for the rows of 1.6.6 | | A full backup alone that lost the end of the file, after its data | Read | `FASTBCP_BACKUP_RESTORE_POINT=full`, as 1.6.6: `best_effort` has no other version to read. Check the file first: it was cut, or is still being copied | These **read other rows**, or read what used to fail: | With these files | 1.6.6 | 1.6.7 | To keep 1.6.6 | | ------------------------------------------------------------------- | -------------------- | --------------------------------------------------------- | ----------------------------------- | | A `WITH NOINIT` file with a full backup and differentials | The last full backup | The full backup and its newest differential: fresher rows | `FASTBCP_BACKUP_RESTORE_POINT=full` | | A pattern or a list matching several complete backups of a database | Failed | The latest version among them | A narrower `--database` | These **failed and still fail**, with a clearer message, and `FASTBCP_BACKUP_RESTORE_MODE=best_effort` now reads them: | With these files | With `best_effort` | | ---------------------------------------------------------------------- | ------------------------------------------------------------------------------- | | A file cut in the data of a backup, with an older complete full backup | The older version | | Several backups, the newest truncated or still being written | The older version | | A pattern also matching a file that is not a backup | The backups, without that file | | Backups of a database and of a restored copy of it | The newest of the two, whichever database it is: prefer a narrower `--database` | The first export from each backup also reads its structure once more, as the format of the index has changed. ### Encrypted Backups[​](#encrypted-backups "Direct link to Encrypted Backups") Since FastBCP 1.6.6, `--connectiontype backup_mssql` reads backups `WITH ENCRYPTION` and backups of **TDE** databases, alone or together, with the private key of the server certificate. No SQL Server is needed: the key file is all it takes. `--user`or`--sourceuser` The file of the private key: a `.pvk`, a `.pfx` / `.p12`, a PEM or DER key, or a `.cer` / `.crt` certificate with its private key next to it, under the same name. Several files separated by `;`: a backup `WITH ENCRYPTION` of a TDE database can use two certificates. `--password`or`--sourcepassword` The password of that key, if it has one. Hidden in all logs. ``` ./FastBCP \ --connectiontype backup_mssql \ --server "/var/opt/mssql/backup" \ --database "sales_encrypted.bak" \ --sourceuser "/secure/keys/MyCert.pvk" \ --sourcepassword "KeyPassword" \ --sourceschema "dbo" \ --sourcetable "orders" \ --directory "/export/orders" \ --fileoutput "orders.parquet" \ --parallelmethod "Physical" \ --paralleldegree 8 ``` Export the key from SQL Server Export the key on the server that holds the certificate, as one PVK file with its certificate, or as one PFX file (SQL Server 2022 and later): ``` BACKUP CERTIFICATE MyCert TO FILE = 'C:\keys\MyCert.cer' WITH PRIVATE KEY (FILE = 'C:\keys\MyCert.pvk', ENCRYPTION BY PASSWORD = 'KeyPassword'); BACKUP CERTIFICATE MyCert TO FILE = 'C:\keys\MyCert.pfx' WITH FORMAT = 'PFX', PRIVATE KEY (ENCRYPTION BY PASSWORD = 'KeyPassword', ALGORITHM = 'AES_256'); ``` **What is read:** AES 128, 192 and 256 and Triple DES, compressed or not, striped, from SQL Server 2017, 2019, 2022 and 2025. A backup that is not encrypted ignores these two parameters. **Without the right key**, the export stops and the message names the certificate by its thumbprint, the one `sys.certificates` shows. A wrong or a missing password stops it too, with a message saying so. Protect the key file Whoever has the private key can read the backups it opens, with no server involved: keep it as carefully as the backups themselves. The [index](/1.6/documentation/environment-variables/fastbcp-index-dir.md#encrypted-backups) FastBCP keeps for such a backup holds no key, and the key is needed at every export. Good to know * SQL Server gives the files written by `BACKUP CERTIFICATE` to its service account alone: grant the account running FastBCP read access to them, or use `CERTPRIVATEKEY` and `CERTENCODED`, which return the same bytes. * Keys in an EKM provider (`SERVER ASYMMETRIC KEY`) are not supported. * An **uncompressed** backup of a TDE database taken while its key was being changed (`encryption_state` 4) is refused when the export reaches a page still under the previous key. Take the backup again once the change is over, or `WITH COMPRESSION`, which reads normally. * A password with non-ASCII characters in a PVK file depends on the code page of the server. If it is reported as wrong, export the key with an ASCII password. ## Oracle RMAN Backup Sets (backup\_rman)[​](#oracle-rman-backup-sets-backup_rman "Direct link to Oracle RMAN Backup Sets (backup_rman)") `--connectiontype backup_rman` reads **Oracle RMAN backup sets** directly, **without Oracle** and **without restoring them**, through the embedded **ArpeOraBackup** ADBC driver (metadata and data steps). The backup pieces are read in place: nothing is restored, copied or loaded in memory as a whole. `--server` The **directory** of the backup pieces (`/backup/rman/orcl`, `D:\Backups\RMAN`). `--database` Names the **pieces**: names, paths or patterns, several of them separated by `;`, in any order (`--database "full_*"`, `--database "l0/*;l1/**"`). Give every piece of the backup: the pieces of a multi-piece set and of every set, and with [incremental backups](#incremental-rman-backups) the whole chain. See [Naming the backup pieces](#naming-the-backup-pieces). `--user`/`--password`/`--trusted`Not used No credentials: `--user`, `--password` and `--trusted` are not used. `--sourceconnectstring` only serves to set driver options, such as the [restore point and restore mode](#rman-backups-that-cannot-be-used). The driver is licensed like the other Arpe.io ADBC FastDrivers. * Full backup, on Linux * Table of another PDB, on Windows ``` ./FastBCP \ --connectiontype backup_rman \ --server "/backup/rman/orcl" \ --database "full_*" \ --sourceschema "SALES" \ --sourcetable "ORDERS" \ --directory "/export/orders" \ --fileoutput "orders.parquet" \ --parallelmethod "Physical" \ --paralleldegree 8 ``` A few columns of a table of another PDB, on Windows: ``` .\FastBCP.exe ` --connectiontype backup_rman ` --server "D:\Backups\RMAN" ` --database "full_*;ctl_*" ` --query "SELECT ID, NAME, CREATED FROM HRPDB.HR.EMPLOYEES" ` --directory "D:\export\employees" ` --fileoutput "employees.parquet" ` --parallelmethod "Physical" ` --paralleldegree 4 ``` * Backups read * Tables read * Refused * Queries and parallelism - Full backup sets (`BACKUP DATABASE`, `BACKUP TABLESPACE`, `BACKUP DATAFILE`, `BACKUP PLUGGABLE DATABASE`), **uncompressed** or `AS COMPRESSED BACKUPSET` with the **BASIC**, **LOW**, **MEDIUM** or **HIGH** algorithm. - [**Incremental backups**](#incremental-rman-backups), levels 0 to 4, differential and cumulative: the latest version of the table (since FastBCP 1.6.8). - Multi-piece sets (`MAXPIECESIZE`), several channels or sets (`FILESPERSET`), `SECTION SIZE`, `COPIES 2`. When several backups of the same files are given, the latest version of each datafile is read. - Archived log, control file and SPFILE pieces among the files are ignored. - Container databases (the root and the PDBs) and non-CDB databases, bigfile and smallfile tablespaces. - Backups of **Oracle 19c, 21c, 23ai and 26ai** databases running on **Linux x86-64**. Heap tables, including deleted, chained and migrated rows, tables of more than 255 columns and empty tables. See the [datatypes conversion](/1.6/datatypes-conversion/oracle/backup-parquet.md) for the column types. Refused with a clear message: * **Encrypted backup sets** (`SET ENCRYPTION`, password or wallet). * [Any backup that could be the newest and cannot be used](#rman-backups-that-cannot-be-used), such as an incremental backup without its level 0, or a set without one of its pieces (since FastBCP 1.6.8). * Image copies (`BACKUP AS COPY`, `RECOVER COPY` strategies) are not read. * Partitioned, index-organized, clustered, object, nested, temporary and external tables. * LOB (`CLOB`, `NCLOB`, `BLOB`, `BFILE`), `INTERVAL`, `ROWID` / `UROWID`, `JSON`, `VECTOR`, `XMLTYPE` and object columns: the other columns of the table can still be exported, listed in `--query`. * Tablespaces with a non-default block size, and backups of big-endian platforms. - `--sourceschema` (the owner) / `--sourcetable`, or `--query` limited to `SELECT * | col1, col2, … FROM [[container.]owner.]table`. - In a container database with a single PDB, tables are named `OWNER.TABLE`; the tables of the root or of another PDB are named `CONTAINER.OWNER.TABLE` in `--query`. - Parallel methods: `None`, or `Physical`, which resolves to the **Pages** method for this source: each thread reads a range of the table's blocks. See [Parallel parameters](/1.6/documentation/cli/parallel_parameters.md). - Parquet output only. Good to know * **Consistency:** a backup taken while the database is open (an online backup, in `ARCHIVELOG` mode) is read as its blocks are: the redo is not applied. A backup taken with the database mounted is consistent. This goes for incremental backups too. * **Opening a backup again:** the first export from a backup reads its structure; FastBCP keeps it in a small file in the local application data of the user (`%LOCALAPPDATA%\ArpeOraBackup\index` on Windows, `~/.cache/arpeorabackup/index` on Linux), so the next exports from the same backup open in a few milliseconds (since FastBCP 1.6.4). After a new incremental backup, only the new backup is opened in full: the backups already opened stay fast (since FastBCP 1.6.8). A rewritten or moved backup is opened in full again; files unused for 30 days, or beyond 2 GB in all, are removed automatically. [`FASTBCP_INDEX_DIR`](/1.6/documentation/environment-variables/fastbcp-index-dir.md) names another directory, for an account without a usable home (since FastBCP 1.6.6). ### Naming the Backup Pieces[​](#naming-the-backup-pieces "Direct link to Naming the Backup Pieces") `--database` is a list of entries separated by `;`. Each entry is a name, a path or a pattern, relative to the `--server` directory or absolute: | Linux | Windows | What it matches | | ------------------------------------- | ------------------------------------------- | ----------------------------------------------------------------------- | | `full_*`, `ORCL_??_*` | `full_*`, `ORCL_??_*` | `*` and `?` match within a name, in the `--server` directory | | `l0/*` | `l0\*` | The files of the subdirectory `l0` | | `l1/**` | `l1\**` | The files of `l1` and of all its subdirectories, at any depth | | `**` | `**` | Every file below `--server` | | `**/ORCL_*` | `**\ORCL_*` | The files named `ORCL_*`, in `--server` or in any of its subdirectories | | `l0` | `l0` | A directory named last stands for its files | | `/backup/l0/*;/backup/l1/2026-11-*/*` | `D:\Backups\l0\*;D:\Backups\l1\2026-11-*\*` | Absolute paths, patterns included | * **Path separator:** `/` on Linux. On Windows, `\` or `/`, both work. * **Each entry must match at least one file**, or the export fails, naming it (`no file matches 'l2/**'`): a typo does not silently drop a level of the chain. * A name starting with `.` is matched only by a pattern starting with `.`. * `**` does not go down into a directory link it finds; a link named in the entry, or `--server` itself, is followed. * At the start of each export, the log gives the number of files found: `Backup files : 42 file(s) matching 'l0/*;l1/**' in /backup/rman/orcl`. ### Incremental Backups[​](#incremental-rman-backups "Direct link to Incremental Backups") Since FastBCP 1.6.8, `--connectiontype backup_rman` reads **incremental backups**, levels 0 to 4, differential and cumulative. Give the level 0 and the incremental backups taken on it, or the whole backup directory: each datafile is read at the **latest version** the files give. You always get the **whole table**, not the changed rows. ``` ./FastBCP \ --connectiontype backup_rman \ --server "/backup/rman/orcl" \ --database "l0/*;l1/**" \ --sourceschema "SALES" \ --sourcetable "ORDERS" \ --directory "/export/orders" \ --fileoutput "orders.parquet" \ --parallelmethod "Physical" \ --paralleldegree 8 ``` | How the backups are stored | `--database` | | ------------------------------------- | --------------------------------------------------------------------------------------------- | | All in one directory | A pattern, `"ORCL_*"`, or `"*"`: older backups can match too, only the latest version is read | | A directory per level | `"l0/*;l1/*"` (Windows: `"l0\*;l1\*"`) | | A directory per day, below each level | `"l0/*;l1/**"` (Windows: `"l0\*;l1\**"`) | | Anywhere below `--server` | `"**"` | FastBCP checks that each incremental backup belongs to the chain: the names and the order of the files do not matter, and a newer full or level 0 backup among the files starts a new chain. Backups of the abandoned branch, after a restore and `OPEN RESETLOGS`, are not read. Good to know * The more incremental backups to read through, the longer the read, most of all with BASIC compression. A cumulative backup, or a new level 0, keeps the chain short. * A level 1 taken under heavy writes can fail the export of a table, naming the block it lacks: the next level 1, taken at a quieter time, reads it. * Image copies (`BACKUP AS COPY`, `RECOVER COPY` strategies) are not read. * The `**` pattern is for `backup_rman`; `backup_mssql` reads the files of the `--server` directory only. ### Backups That Cannot Be Used[​](#rman-backups-that-cannot-be-used "Direct link to Backups That Cannot Be Used") A backup that could be the newest and cannot be used **fails the export, naming it**, rather than reading older data without saying so. That is the case of: * an incremental backup whose level 0, or a level in between, is not among the files: the message names the backup needed, * a backup set without one of its pieces, or still being written, * an encrypted backup set. The other tables are read, and the logs say what can be done about it. The same two variables as for `backup_mssql` change this behaviour without touching the command: | Variable | Effect | | -------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------ | | [`FASTBCP_BACKUP_RESTORE_MODE=best_effort`](/1.6/documentation/environment-variables/fastbcp-backup-restore-mode.md) | The backup is skipped, and the newest usable version is read, however old | | [`FASTBCP_BACKUP_RESTORE_POINT=full`](/1.6/documentation/environment-variables/fastbcp-backup-restore-point.md) | The most recent full or level 0 backup of each datafile is read, the incremental backups ignored | The options `adbc.arpeorabackup.restore_mode` and `adbc.arpeorabackup.restore_point` in `--sourceconnectstring` do the same, and win over the variables. ### Upgrading to 1.6.8[​](#upgrading-to-1-6-8 "Direct link to Upgrading to 1.6.8") Each line was measured on both versions, with backups of Oracle 23ai. | With these files | 1.6.7 | 1.6.8 | To keep 1.6.7 | | -------------------------------------------------------- | ------------------------------------------ | ------------------------------------------ | ---------------------------------------------------------------------- | | One full or level 0 backup | Read | **Same** | — | | A level 0 and incremental backups on it | Failed: `is an incremental level 1 backup` | The latest version: fresher rows | `FASTBCP_BACKUP_RESTORE_POINT=full`: the level 0 | | Incremental backups without their level 0 | Failed | Fails, naming the backup needed | — | | A chain with a hole (a level missing, a newer one given) | Failed | Fails, naming the backup and what it needs | `FASTBCP_BACKUP_RESTORE_MODE=best_effort`: the version before the hole | | `--database` with a subdirectory (`l0/*`) | Failed: `no file matches` | Read | — | Also on full backups: | With these files | 1.6.7 | 1.6.8 | | --------------------------------------------------------------------- | ---------------------------- | ------------------------------------------------------ | | A backup set without its last piece | Read short, without an error | Fails, naming it. `best_effort`: the version before it | | A table truncated, then its tablespace backed up alone | Read empty | Refused, naming it | | A column added with a `DEFAULT`, on the rows written before | `NULL` | The default value | | Archived log pieces in the directory, more than 64 pieces, `COPIES 2` | Refused | Read | | A dropped PDB | Its tables listed | No longer listed | From FastBCP 1.6.0 FastBCP 1.6.0 read a level 1 backup as a full one, so the export held only the rows of the changed blocks, with no error. Export again any table read from a level 1 backup with 1.6.0. ## Database[​](#database "Direct link to Database") Optionally define a source database. With `backup_mssql`, `--database` names the backup files (see [SQL Server backup files](#sql-server-backup-files-backup_mssql)); with `backup_rman`, the names, paths or patterns of the backup pieces (see [Oracle RMAN backup sets](#oracle-rman-backup-sets-backup_rman)). **Example:** ``` ./FastBCP \ ... --database "AdventureWorks" \ ... ``` `--database`or`-I` `--database "database_name"` (short form: `-I "database_name"`) ## Application Intent[​](#application-intent "Direct link to Application Intent") Specifies the application workload type when connecting to SQL Server. This parameter is only applicable for SQL Server (`mssql`, `adbc_mssql`) and OLEDB (`oledb`) connection types. With `adbc_mssql`, an `ApplicationIntent` key in `--sourceconnectstring` is also passed to the driver. `--applicationintent`default `ReadOnly` `--applicationintent "ReadOnly|ReadWrite"` (long form) **Values:** `ReadOnly`Default Declares the read-only workload type when connecting to a read-only replica in an Always On availability group `ReadWrite` Declares a read-write workload type (standard connection) **Example (Read-Only):** ``` ./FastBCP \ --connectiontype mssql \ --server "myserver.mydomain.com" \ --applicationintent ReadOnly \ --database "AdventureWorks" \ ... ``` **Example (Read-Write):** ``` ./FastBCP \ --connectiontype mssql \ --server "myserver.mydomain.com" \ --applicationintent ReadWrite \ --database "AdventureWorks" \ ... ``` info When using `ReadOnly`, the connection will be routed to a read-only replica if available in an Always On availability group configuration. This is useful for offloading reporting and export workloads from the primary replica. --- # CSV Formatting When exporting to CSV format (`.csv` extension), FastBCP provides extensive formatting options. ## Delimiter[​](#delimiter "Direct link to Delimiter") Use the `--delimiter` parameter to specify the character(s) used to separate fields. ``` ./FastBCP \ ... --fileoutput "data.csv" \ --delimiter "," \ ... ``` `--delimiter`or`-d`default `,` `--delimiter "delimiter"` (short form: `-d "delimiter"`). Default: `,` (comma). ### Common Delimiters[​](#common-delimiters "Direct link to Common Delimiters") * Comma (CSV) * Tab (TSV) * Pipe * Semicolon ``` --delimiter "," ``` ``` --delimiter "\t" ``` ``` --delimiter "|" ``` ``` --delimiter ";" ``` ## Use Quotes[​](#use-quotes "Direct link to Use Quotes") Use the `--quotes` switch to enclose string fields in double quotes. ``` ./FastBCP \ ... --fileoutput "products.csv" \ --quotes \ ... ``` `--quotes`or`-t` Switch, no value (short form: `-t`). Default: without quotes. * Without --quotes * With --quotes ``` ProductID,ProductName,Description,Price 1,Widget A,Small widget,19.99 2,Widget B,Large widget,29.99 ``` ``` "ProductID","ProductName","Description","Price" "1","Widget A","Small widget","19.99" "2","Widget B","Large widget","29.99" ``` Information When `--quotes`, any double quotes (`"`) in the data are escaped with backslash (`\"`). ## Date Format[​](#date-format "Direct link to Date Format") Use the `--dateformat` parameter to specify how dates and timestamps are formatted. ``` ./FastBCP \ ... --fileoutput "orders.csv" --dateformat "yyyy-MM-dd HH:mm:ss" \ ... ``` `--dateformat`or`-f`default `yyyy-MM-dd HH:mm:sszzz` `--dateformat "format"` (short form: `-f "format"`). Auto-adaptive formatting The date format is auto-adaptive based on the column type: * **Date-only** columns will always output as `yyyy-MM-dd` regardless of the format string * **Timestamp/DateTime** columns will output as `yyyy-MM-dd HH:mm:ss` even if a timezone token (`zzz`) is present in the format string * **DateTimeOffset** columns will include the timezone offset as specified ### Format Codes[​](#format-codes "Direct link to Format Codes") | Code | Description | Example | | ------ | ---------------- | -------- | | `yyyy` | 4-digit year | `2026` | | `MM` | Month (01-12) | `01` | | `dd` | Day (01-31) | `07` | | `HH` | Hour 24h (00-23) | `14` | | `mm` | Minute (00-59) | `30` | | `ss` | Second (00-59) | `22` | | `zzz` | UTC offset | `+02:00` | ## Decimal Separator[​](#decimal-separator "Direct link to Decimal Separator") Use the `--decimalseparator` parameter to specify the decimal separator for numeric values. ``` ./FastBCP \ ... --fileoutput "products.csv" --decimalseparator "," ... ``` `--decimalseparator`or`-n`default `.` `--decimalseparator "separator"` (short form: `-n "separator"`). Default: `.` (period/dot). ## No Header[​](#no-header "Direct link to No Header") Use the `--noheader` parameter to exclude column headers from the output. ``` ./FastBCP \ ... --fileoutput "customers.csv" \ --noheader \ ... ``` `--noheader`or`-h` Switch, no value (short form: `-h`). * Without --noheader (default) * With --noheader ``` CustomerID,CustomerName,Email 1,John Doe,john@example.com 2,Jane Smith,jane@example.com ``` ``` 1,John Doe,john@example.com 2,Jane Smith,jane@example.com ``` ## Boolean Format[​](#boolean-format "Direct link to Boolean Format") Use the `--boolformat` parameter to specify how boolean values are represented. ``` ./FastBCP \ ... --fileoutput "products.csv" \ --boolformat "1/0" \ ... ``` `--boolformat`or`-b`default `True/False` `--boolformat "format"` (short form: `-b "format"`). **Options:** `true/false`, `True/False` (default), `t/f`, `1/0`, `yes/no`, `y/n`. **With `--boolformat "true/false"` (default):** ``` ProductID,ProductName,InStock,Discontinued 1,Widget A,true,false 2,Widget B,false,true ``` **With `--boolformat "1/0"`:** ``` ProductID,ProductName,InStock,Discontinued 1,Widget A,1,0 2,Widget B,0,1 ``` **With `--boolformat "yes/no"`:** ``` ProductID,ProductName,InStock,Discontinued 1,Widget A,yes,no 2,Widget B,no,yes ``` ## Complete Example[​](#complete-example "Direct link to Complete Example") * Windows * Linux ``` .\FastBCP.exe ` --connectiontype mssql ` --server "localhost" ` --database "AdventureWorks" ` --trusted ` --query "SELECT OrderID, OrderDate, CustomerName, TotalAmount, IsShipped FROM Sales.Orders WHERE OrderDate >= '2024-01-01'" ` --directory "C:\exports\sales" ` --fileoutput "orders_{startdate}.csv" ` --delimiter "," ` --quotes ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --decimalseparator "." ` --boolformat "1/0" ` --encoding "UTF-8" ``` ``` ./FastBCP \ --connectiontype mssql \ --server "localhost" \ --database "AdventureWorks" \ --trusted \ --query "SELECT OrderID, OrderDate, CustomerName, TotalAmount, IsShipped FROM Sales.Orders WHERE OrderDate >= '2024-01-01'" \ --directory "/exports/sales" \ --fileoutput "orders_{startdate}.csv" \ --delimiter "," \ --quotes \ --dateformat "yyyy-MM-dd HH:mm:ss" \ --decimalseparator "." \ --boolformat "1/0" \ --encoding "UTF-8" ``` **Output (orders\_20260107.csv):** ``` "OrderID","OrderDate","CustomerName","TotalAmount","IsShipped" "1001","2026-01-05 10:30:00","John Doe","299.99","1" "1002","2026-01-05 11:15:00","Jane Smith","149.50","0" "1003","2026-01-06 09:20:00","Bob Johnson","599.00","1" ``` tip For Excel compatibility, use `.xlsx` format instead: `--fileoutput "data.xlsx"` --- # License Configure how FastBCP 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 FastBCP license. `--license`Long form only `--license ""`: a file path, an HTTP(S) URL or the license content itself. By default, without `--license`, FastBCP looks for a license file named `FastBCP.lic`: 1. 1Current directory`FastBCP.lic` in the current directory 2. 2Next to the executable`FastBCP.lic` next to the FastBCP executable ### Since FastBCP 1.5[​](#since-fastbcp-15 "Direct link to Since FastBCP 1.5") * Always requiredA license is always required, including for the free 30-day trial: the trial is a license file requested at [arpe.io](https://www.arpe.io). There is no build-date trial any more. `--help` and `--version` work without a license. * Several blocks per fileA license file can hold several blocks, each followed by its own signature, in any order: the FASTBCP block, an `ARPE ADBC DRIVER LICENCE` block for the ADBC drivers, and other products' blocks. * ADBC driversFastBCP checks the FASTBCP block against the signature that follows it, and forwards every ADBC block with its signature to the ADBC drivers, inline (`arpeio.adbc.license`, no temporary file); each driver uses the block meant for it. A driver license of your own (`arpeio.adbc.license` / `LicenseFile` in `--sourceconnectstring`, or `ARPEIO_ADBC_LICENCE` / `ARPEIO_ADBC_LICENCE_FILE`) wins: FastBCP then forwards nothing. | Exit code | When | | --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | **99** | No license, an invalid signature, or an `adbc_*` / `backup_mssql` / `backup_rman` connection type with no ADBC driver block (and no `ARPEIO_ADBC_LICENCE` / `ARPEIO_ADBC_LICENCE_FILE`) | | **100** | An expired license after its grace period | ### License Sources[​](#license-sources "Direct link to License Sources") FastBCP 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 ``` .\FastBCP.exe ` ... --license "C:\licenses\FastBCP.lic" ` ... ``` Linux ``` ./FastBCP \ ... --license "/path/to/licenses/FastBCP.lic" \ ... ``` Retrieve the license from a remote URL where you put the license content and distribute it using HTTPS: Windows ``` .\FastBCP.exe ` ... --license "https://licenseserve.yourdomain.lan/fastbcp.lic" ` ... ``` Linux ``` ./FastBCP \ ... --license "https://licenseserve.yourdomain.lan/fastbcp.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:FASTBCP_LICENSE = "LICENSE_CONTENT_HERE" .\FastBCP.exe ` ... --license $env:FASTBCP_LICENSE ` ... # Using variable $license = Get-Content "C:\licenses\FastBCP.lic" -Raw .\FastBCP.exe ` ... --license $license ` ... ``` Linux ``` # Using environment variable export FASTBCP_LICENSE="LICENSE_CONTENT_HERE" ./FastBCP \ ... --license "$FASTBCP_LICENSE" \ ... # Using variable license=$(cat /path/to/licenses/FastBCP.lic) ./FastBCP \ ... --license "$license" \ ... ``` ## Complete Example[​](#complete-example "Direct link to Complete Example") Here's a complete example using a license from a remote server with parallel export: | | This example | | ----------- | ------------------------------------------------------------------------------------------------------------------------------- | | **License** | Retrieved from a remote UNC path | | **Source** | A PostgreSQL database | | **Method** | Orders data exported with the `DataDriven` parallel method and 7 threads, with a `YEAR` expression on the distribute key column | | **Output** | Distributed files kept separate (`--merge false`) | * Windows * Linux ``` .\FastBCP.exe ` --connectiontype pgsql ` --server "localhost:15432" ` --database "tpch10" ` --user "FastUser" ` --password "FastPassword" ` --query "SELECT * FROM dbo.orders" ` --directory "D:\temp" ` --fileoutput "pgsql_orders.parquet" ` --parallelmethod DataDriven ` --distributekeycolumn "YEAR(o_orderdate)" ` --paralleldegree 7 ` --merge false ` --runid "pgsql_to_parquet_parallel_datadriven" ` --license "//SharedUnc/licenses/fastbcp/fastbcp.lic" ``` ``` ./FastBCP \ --connectiontype pgsql \ --server "localhost:15432" \ --database "tpch10" \ --user "FastUser" \ --password "FastPassword" \ --query "SELECT * FROM dbo.orders" \ --directory "/temp" \ --fileoutput "pgsql_orders.parquet" \ --parallelmethod DataDriven \ --distributekeycolumn "YEAR(o_orderdate)" \ --paralleldegree 7 \ --merge false \ --runid "pgsql_to_parquet_parallel_datadriven" \ --license "//SharedUnc/licenses/fastbcp/fastbcp.lic" ``` ## License Agreement[​](#license-agreement "Direct link to License Agreement") FastBCP and the ARPE.IO drivers it ships with are licensed under the **ARPE.IO Software License Agreement**, delivered with the software (`LICENSE.txt`, next to the executable). No reverse engineering Reverse engineering, decompiling or disassembling the binaries of ARPE.IO tools and drivers, or otherwise attempting to derive their source code, internal structure, algorithms or data formats, is **prohibited**, whether it is done manually or with the help of automated tools or artificial intelligence, except to the extent that applicable law expressly permits it. Any breach terminates the license and may give rise to legal proceedings. --- # Output Info Configure where and how FastBCP saves exported data. ## Directory[​](#directory "Direct link to Directory") Use the `--directory` parameter to specify where the output file(s) will be saved. `--directory`or`-D` `--directory "path"` (short form: `-D "path"`): a local path, a UNC path or a cloud path, as shown below. ### Local Paths[​](#local-paths "Direct link to Local Paths") * Windows * Linux ``` .\FastBCP.exe \ ... --directory "C:\exports\sales\orders" \ ... ``` ``` ./FastBCP \ ... --directory "/exports/sales/orders" \ ... ``` ### UNC Paths[​](#unc-paths "Direct link to UNC Paths") For Windows network shares, you can use UNC paths: ``` .\FastBCP.exe \ ... --directory "\\server\share\exports\orders" \ ... ``` ### Cloud Paths[​](#cloud-paths "Direct link to Cloud Paths") FastBCP supports direct export to cloud storage: * AWS S3 * Azure Blob * Azure Data Lake Gen2 * Google Cloud Storage * S3-Compatible (MinIO, OVH) * OneLake ``` ./FastBCP \ ... --directory "s3://my-bucket/exports/orders" \ ... ``` ``` ./FastBCP \ ... --directory "abs://mystorageaccount.blob.core.windows.net/container/path" \ ... ``` ``` ./FastBCP \ ... --directory "abfss://mystorageaccount.dfs.core.windows.net/container/path/to/data" \ ... ``` ``` ./FastBCP \ ... --directory "gs://my-bucket/exports/orders" \ ... ``` ``` ./FastBCP \ ... --directory "s3://my-bucket/exports" \ ... ``` ``` ./FastBCP \ ... --directory "onelake://myworkspace.dfs.core.windows.net/lakehouse/path/to/data" \ ... ``` Information See [Cloud Options](/1.6/documentation/cli/cloud_options.md) for authentication and configuration details. ## Output File[​](#output-file "Direct link to Output File") Use the `--fileoutput` parameter to specify the name of the output file. The file extension determines the output format. ``` ./FastBCP \ ... --fileoutput "orders.parquet" \ ... ``` `--fileoutput`or`-o` `--fileoutput "filename"` (short form: `-o "filename"`). The extension sets the format: see [Supported Formats](#supported-formats). ### Supported Formats[​](#supported-formats "Direct link to Supported Formats") parquet ParquetRecommended`.parquet` Columnar, compressed csv CSV`.csv` Delimiter-separated values `.csv.gz`CSV GzippedDelimiter-separated values and compressed with Gzip tsv TSV`.tsv` Tab-separated values `.tsv.gz`TSV GzippedTab delimited values and compressed with Gzip json JSON`.json` JavaScript Object Notation `.json.gz`JSON GzippedJavaScript Object Notation with Gzip bson BSON`.bson` Binary JSON xlsx Excel`.xlsx` Microsoft Excel format bin Binary`.bin` PostgreSQL COPY binary format ## Tokens[​](#tokens "Direct link to Tokens") Use tokens in `--directory` and `--fileoutput` parameters for dynamic paths and filenames. ``` ./FastBCP \ ... --directory "/exports/{sourcedatabase}/{sourceschema}" \ --fileoutput "{sourcetable}_{startdate}.parquet" \ ... ``` **Syntax:** tokens are enclosed in curly braces `{token_name}`. With the example values below, the filename of the command above resolves to: `{sourcetable}_{startdate}.parquet`Resolves to`Orders_20260107.parquet` ### Available Tokens[​](#available-tokens "Direct link to Available Tokens") Source `{sourcedatabase}`→`AdventureWorks` Value from `--database` `{sourceschema}`→`Sales` Value from `--sourceschema` `{sourcetable}`→`Orders` Value from `--sourcetable` Job start `{starttimestamp}`→`20260107143022` Job start (yyyyMMddHHmmss) `{starttimestamp:FORMAT}`→[See below](#timestamp-format-codes) Custom timestamp format `{startdate}`→`20260107` Job start date (yyyyMMdd) `{starttime}`→`143022` Job start time (HHmmss) `{starthour}`→`14` Job start hour (HH) Other `{user}`→`dbuser` Username (from `--user` or system) `{filetype}`→`parquet` Output format extension `{datadrivencolumn}`→Varies Data-driven split value ### Timestamp Format Codes[​](#timestamp-format-codes "Direct link to Timestamp Format Codes") Use `{starttimestamp:FORMAT}` with custom format: `yyyy`→`2026` 4-digit year `yy`→`26` 2-digit year `MM`→`01` Month (01-12) `dd`→`07` Day (01-31) `HH`→`14` Hour 24h (00-23) `mm`→`30` Minute (00-59) `ss`→`22` Second (00-59) **Examples:** ``` # yyyyMMdd format ./FastBCP \ ... --fileoutput "orders_{starttimestamp:yyyyMMdd}.parquet" \ ... # yyyy-MM-dd format ./FastBCP \ ... --fileoutput "orders_{starttimestamp:yyyy-MM-dd}.parquet" \ ... # yyyyMMddHH format (hourly) ./FastBCP \ ... --fileoutput "logs_{starttimestamp:yyyyMMddHH}.parquet" \ ... ``` ## Timestamped Output[​](#timestamped-output "Direct link to Timestamped Output") Use the `--timestamped` parameter to automatically add a timestamp to the filename. ``` ./FastBCP \ ... --fileoutput "orders.parquet" \ --timestamped \ ... ``` `--timestamped`or`-x` Switch, no value (short form: `-x`). tip `--timestamped` automatically appends `_yyyyMMddHHmmss` to the filename. For more control over format and placement, use timestamp tokens instead. ## Encoding[​](#encoding "Direct link to Encoding") Use the `--encoding` parameter to specify character encoding for text formats (CSV, JSON, TSV). ``` ./FastBCP \ ... --fileoutput "orders.csv" \ --encoding "UTF-8" \ ... ``` `--encoding`or`-e`default `UTF-8` `--encoding "encoding"` (short form: `-e "encoding"`). note Encoding is not applicable to Parquet files (they use UTF-8 internally). --- # Parallel Parameters FastBCP 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 ``` .\FastBCP.exe ` ... --parallelmethod Ntile ` ... ``` ``` ./FastBCP \ ... --parallelmethod Ntile \ ... ``` `--parallelmethod`or`-m` `--parallelmethod ` (short form: `-m `). The methods are compared below. ### Methods Comparison[​](#methods-comparison "Direct link to Methods Comparison") | Method | Parallel | Needs Distributed Column | Database Source Type | | ---------------------------- | ------------- | ------------------------ | ---------------------------------------------------------------------------------------------------------------------------- | | `None` | Not supported | Not supported | Any | | `Random` | Supported | Supported | Any | | `DataDriven` | Supported | Supported | Any | | `RangeId` | Supported | Supported | Any | | `Ntile` | Supported | Supported | Any | | `Physical` | Supported | Not supported | PostgreSQL, Oracle, SQL Server, Netezza, SQL Server backup files, Oracle RMAN backup sets (see [Physical](#physical-method)) | | `Ctid` *(deprecated)* | Supported | Not supported | PostgreSQL (pgsql/pgcopy) | | `Physloc` *(deprecated)* | Supported | Not supported | SQL Server (mssql) | | `Rowid` *(deprecated)* | Supported | Not supported | Oracle (oraodp/adbc\_oracle) | | `NZDataSlice` *(deprecated)* | Supported | Not supported | Netezza (nzsql/adbc\_netezza) | | `DBPartition` | Supported | Not supported | SQL Server, PostgreSQL, Oracle, MySQL, Teradata (and their `adbc_*` counterparts) | | `Timepartition` | Supported | Supported | Any | ### Available Methods[​](#available-methods "Direct link to Available Methods") [`Physical`](#physical-method)RecommendedNo key column Splits the data on the physical row location of the source engine. The strategy (Ctid, Rowid, Physloc, NZDataSlice, or Pages for SQL Server backup files and Oracle RMAN backup sets) is picked from the connection type. See [Physical Method](#physical-method) below. [`DBPartition`](#dbpartition-example)No key column Runs one extraction per native partition / subpartition of the source table. The largest partitions are scheduled first, based on the catalog row estimates. `None`Any source No parallel processing. Data is exported sequentially. `Ntile`Any source Uses the distributed column field and ntile values to retrieve evenly distributed chunks of data. Each parallel thread exports a portion based on a range built using the distributed column values. Key column--distributekeycolumn (uniqueness not mandatory) `RangeId`Any source Uses the distributed column field and its min/max values to retrieve chunks of data. Each parallel thread exports a portion based on a range built using the distributed column values. Key column--distributekeycolumn `Random`Any source Requires a distribution column that must be an integer/bigint with many values. Key columnAn integer/bigint column with many values (at least as many as the degree of parallelism) [`DataDriven`](#data-driven-query)Any source Uses all values of a column (or a given list provided by `--datadrivenquery`) to split the export. If the number of values is greater than the degree of parallelism, throttling will be applied. Key column--distributekeycolumn, optionally --datadrivenquery [`Timepartition`](#timepartition-example)Any source Uses a date/datetime column to partition data into time-based chunks. Each parallel thread exports data for a specific time period (year, month, week, or day). Ideal for time-series data: efficient parallel export based on temporal ranges. Key column(datecolumn, year, month), (datecolumn, year, month, day), (datecolumn, year) or (datecolumn, year, week) Good to know * **Expressions:** you can use an expression in the distribute key column instead of a column name. Example: `YEAR(o_orderdate)`. * **Backup files:** with `backup_mssql` and `backup_rman`, only `None` and `Physical` are available: there is no SQL engine behind a backup file to compute ranges, partitions or random keys. Any other method stops with `ERROR in command line parameters : method is not available with connection type backup_mssql ==> use --parallelmethod None or Physical` (or `backup_rman`). DBPartition: partitioning used per source and output layout | Source | Partitioning used | | -------------------------------------------- | --------------------------------------------- | | SQL Server (`mssql`, `adbc_mssql`) | `$PARTITION` | | PostgreSQL (`pgsql`, `pgcopy`, `adbc_pgsql`) | Leaf tables | | Oracle (`oraodp`, `adbc_oracle`) | `PARTITION (...)` | | MySQL (`mysql`) | `PARTITION (...)` | | Teradata (`teradata`, `adbc_teradata`) | Row partitioning, single- and multi-level PPI | * `DBPartition` requires `--sourceschema` and `--sourcetable`; it does not need a distribute key column. It falls back to `None`, with a warning, when the table is not partitioned, has a single partition, or the source is not supported. * The output file layout is controlled by the [`FASTBCP_DBPARTITION_TARGET_MODE`](/1.6/documentation/environment-variables/fastbcp-dbpartition-target-mode.md) environment variable: numbered chunks (`CHUNK`, default) or Hive-style directories named after each partition (`HIVE`). `--merge` works in both modes. #### Deprecated engine-specific methods[​](#deprecated-engine-specific-methods "Direct link to Deprecated engine-specific methods") Deprecated The four engine-specific values below are still accepted, but they are **deprecated** and will be removed in **FastBCP 2.0**. Use [`Physical`](#physical-method) instead: it picks the same strategy from the connection type (see the [table below](#physical-method)). When a deprecated value is used, FastBCP runs the export as before and logs a warning: ``` Parallel method Ctid is deprecated and will be removed in 2.0 ==> use --parallelmethod Physical ``` Their description is kept here for reference: `Ctid`Deprecated![](/img/logos/postgresql.svg)PostgreSQL Uses an internal hidden field to retrieve chunks of data. Each parallel thread exports a portion based on the CTID range. PostgreSQL databases only (and some compatible PostgreSQL databases). `Physloc`Deprecated![](/img/logos/sqlserver.svg)SQL Server Uses an internal hidden field (`%%physloc%%`) to retrieve chunks of data. Each parallel thread exports a portion based on the Physloc value. SQL Server databases only. Since FastBCP 1.4, it requires `--sourceschema` and `--sourcetable` (directly or through `Physical`). `Rowid`Deprecated![](/img/logos/oracle.svg)Oracle Uses an internal hidden field to retrieve chunks of data. Each parallel thread exports a portion based on the ROWID range. Oracle databases only (`oraodp` and `adbc_oracle` connection types). Since FastBCP 1.4, it requires `--sourceschema` and `--sourcetable` (directly or through `Physical`); it used to crash when they were missing. `NZDataSlice`DeprecatedNetezza Uses the native Netezza data slices to retrieve chunks of data. Each parallel thread exports a portion based on the data slice distribution. Slices go through a shared work queue: an idle thread takes the next waiting slice, which keeps all threads busy when slices are uneven. After the first failure, no new slice is started. Netezza databases only (`nzsql` and `adbc_netezza` connection types). Physloc on rowstore and clustered columnstore tables * On a rowstore table, the rows are distributed on the two low bytes of the page id, so runs of 256 pages go to each chunk. * On a **clustered columnstore** table, `%%physloc%%` is a row id, not a page address. FastBCP detects the clustered columnstore index and distributes the rows on the whole row id instead (logged as `Physloc : .
is a clustered columnstore, splitting on the columnstore row id`). If the check fails, FastBCP logs a warning and uses the rowstore key. ## Physical Method[​](#physical-method "Direct link to Physical Method") `--parallelmethod Physical` is the recommended way to split a table on its physical row location, without a distribute key column. FastBCP picks the physical-location strategy of the source engine from the connection type (`--connectiontype`): | Source | Connection types | Resolved strategy | | ----------------------- | -------------------------------------------- | ----------------- | | PostgreSQL | `pgsql`, `pgcopy`, `adbc_pgsql` | `Ctid` | | Oracle | `oraodp`, `adbc_oracle` | `Rowid` | | SQL Server | `mssql`, `msoledbsql`, `adbc_mssql` | `Physloc` | | Netezza | `nzsql`, `nzcopy`, `nzoledb`, `adbc_netezza` | `NZDataSlice` | | SQL Server backup files | `backup_mssql` | `Pages` | | Oracle RMAN backup sets | `backup_rman` | `Pages` | The resolved strategy behaves exactly like the deprecated engine-specific method of the same name (see [Deprecated engine-specific methods](#deprecated-engine-specific-methods)). The Pages strategy (backup\_mssql and backup\_rman) **Pages** (`backup_mssql` and `backup_rman`, reached through `Physical`) splits the table read from the backup into as many slices as the degree of parallelism: with `backup_mssql`, contiguous ranges of data pages for a rowstore table, of rowgroups (and delta stores) for a clustered columnstore table; with `backup_rman`, contiguous ranges of the table's blocks. Each thread opens the shared, already indexed backup and reads its own slice, so the threads do not read the same pages twice. Each slice is logged as `Completed Pages Load sub-process : rows x columns in ms`. `--sourceschema`/`--sourcetable`Required Both are required. `--query` can be added to filter the table (simple query with a WHERE clause). `--distributekeycolumn`Not used `Physical` does not use a distribute key column. Missing --sourceschema or --sourcetable Error: `ERROR in command line parameters : With Physical (Ctid) Method you must define source schema (--sourceschema) and source table (--sourcetable) ==> With Physical (Ctid) Method --sourceschema and --sourcetable are both mandatory` How to fix FastBCP stops with an error when one of them is missing: give both `--sourceschema` and `--sourcetable`. Unsupported source Error: `ERROR in command line parameters : Physical method is not supported for connection type 'mysql' ==> supported sources are PostgreSQL, Oracle, SQL Server, SQL Server backups, Oracle RMAN backups and Netezza` How to fix Any other connection type (`odbc`, `oledb`, `mysql`, `clickhouse`, `hana`, `teradata`, `adbc_teradata`) stops with an error. ODBC and OLE DB Error: `ERROR in command line parameters : Physical method cannot identify the source engine behind connection type 'odbc' ==> use a native connection type (pgsql, pgcopy, oraodp, mssql, msoledbsql, nzsql, nzcopy, nzoledb or their adbc_* counterpart, backup_mssql, backup_rman)` How to fix With `odbc` and `oledb`, FastBCP cannot know which engine is behind the driver, so the error asks for a native connection type. Good to know: logs The resolved strategy is written to the log as the distribute method: `Distribute Method : Physical (Ctid)`. The OpenTelemetry spans carry the resolved method in `fastbcp.method`. When `Physical` was resolved, `fastbcp.method.requested` holds `Physical`. ### Physical Examples[​](#physical-examples "Direct link to Physical Examples") * PostgreSQL * SQL Server * Oracle * Oracle RMAN backup * SQL Server backup Windows ``` # PostgreSQL: resolved to Ctid .\FastBCP.exe ` --connectiontype "pgsql" ` --server "localhost:5432" ` --database "tpch" ` --user "FastUser" ` --password "FastPassword" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --parallelmethod "Physical" ` --paralleldegree 8 ` --directory "D:\temp\orders" ` --fileoutput "orders.parquet" ` --merge "False" ``` Linux ``` # PostgreSQL: resolved to Ctid ./FastBCP \ --connectiontype "pgsql" \ --server "localhost:5432" \ --database "tpch" \ --user "FastUser" \ --password "FastPassword" \ --sourceschema "tpch_10" \ --sourcetable "orders" \ --parallelmethod "Physical" \ --paralleldegree 8 \ --directory "/data/export/orders" \ --fileoutput "orders.parquet" \ --merge "False" ``` Windows ``` # SQL Server: resolved to Physloc .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "tpch" ` --trusted ` --sourceschema "dbo" ` --sourcetable "orders" ` --parallelmethod "Physical" ` --paralleldegree -2 ` --directory "D:\temp\orders" ` --fileoutput "orders.parquet" ` --merge "False" ``` Linux ``` # Oracle: resolved to Rowid ./FastBCP \ --connectiontype "oraodp" \ --server "dbserver:1521/ORCLPDB" \ --user "FastUser" \ --password "FastPassword" \ --sourceschema "SALES" \ --sourcetable "ORDERS" \ --parallelmethod "Physical" \ --paralleldegree 8 \ --directory "/data/export/orders" \ --fileoutput "orders.parquet" \ --merge "False" ``` Windows ``` # Oracle RMAN backup set: resolved to Pages .\FastBCP.exe ` --connectiontype "backup_rman" ` --server "D:\Backups\RMAN" ` --database "full_*" ` --sourceschema "SALES" ` --sourcetable "ORDERS" ` --parallelmethod "Physical" ` --paralleldegree 8 ` --directory "D:\temp\orders" ` --fileoutput "orders.parquet" ` --merge "False" ``` Linux ``` # Oracle RMAN backup set (multi-piece, compressed): resolved to Pages ./FastBCP \ --connectiontype "backup_rman" \ --server "/backup/rman/orcl" \ --database "full_*" \ --sourceschema "SALES" \ --sourcetable "LINEITEM" \ --parallelmethod "Physical" \ --paralleldegree 8 \ --directory "/data/export/lineitem" \ --fileoutput "lineitem.parquet" \ --merge "False" ``` Windows ``` # SQL Server backup file: resolved to Pages .\FastBCP.exe ` --connectiontype "backup_mssql" ` --server "D:\Backups\MSSQL" ` --database "tpch_full.bak" ` --sourceschema "dbo" ` --sourcetable "orders" ` --parallelmethod "Physical" ` --paralleldegree 8 ` --directory "D:\temp\orders" ` --fileoutput "orders.parquet" ` --merge "False" ``` Linux ``` # SQL Server backup files (striped over 3 files): resolved to Pages ./FastBCP \ --connectiontype "backup_mssql" \ --server "/var/opt/mssql/backup" \ --database "tpch_*.bak" \ --sourceschema "dbo" \ --sourcetable "lineitem" \ --parallelmethod "Physical" \ --paralleldegree 8 \ --directory "/data/export/lineitem" \ --fileoutput "lineitem.parquet" \ --merge "False" ``` ## 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. FastBCP 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. Good to know This parameter is mandatory when using methods that require a distributed column: Random, DataDriven, RangeId, Ntile, or Timepartition. It is not used by `Physical` (nor by the deprecated Ctid, Rowid, Physloc and NZDataSlice) or `DBPartition`. With the `Timepartition` method, the distribute key column must be specified in a special format: | Format | Partitions by | | -------------------------------- | -------------------- | | `(datecolumn, year)` | Year only | | `(datecolumn, year, month)` | Year and month | | `(datecolumn, year, month, day)` | Year, month, and day | | `(datecolumn, year, week)` | Year and week | Example: `--distributekeycolumn "(o_orderdate, year, month)"` * Windows * Linux ``` # Using a column name .\FastBCP.exe ` ... --distributekeycolumn order_date ` ... # Using an expression .\FastBCP.exe ` ... --distributekeycolumn "YEAR(order_date)" ` ... ``` ``` # Using a column name ./FastBCP \ ... --distributekeycolumn order_date \ ... # Using an expression ./FastBCP \ ... --distributekeycolumn "YEAR(order_date)" \ ... ``` `--distributekeycolumn`or`-c` `--distributekeycolumn ` (short form: `-c `) ## Degree of Parallelism[​](#degree-of-parallelism "Direct link to Degree of Parallelism") Use the `--paralleldegree` parameter to control how many parallel threads will be used for the export. ### DOP Values[​](#dop-values "Direct link to DOP Values") `n > 0`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. `n < 0`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 .\FastBCP.exe ` ... --paralleldegree 8 ` ... # Auto-detect based on CPU cores .\FastBCP.exe ` ... --paralleldegree 0 ` ... # Use half of available cores .\FastBCP.exe ` ... --paralleldegree -2 ` ... ``` ``` # Use 8 parallel threads ./FastBCP \ ... --paralleldegree 8 \ ... # Auto-detect based on CPU cores ./FastBCP \ ... --paralleldegree 0 \ ... # Use half of available cores ./FastBCP \ ... --paralleldegree -2 \ ... ``` `--paralleldegree`or`-p`default `-2` `--paralleldegree ` (short form: `-p `) ## 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 ``` .\FastBCP.exe ` ... --datadrivenquery "SELECT tagname FROM tags" ` ... ``` ``` .\FastBCP.exe ` ... --datadrivenquery "SELECT o_orderdate FROM dim_date where ref_date > getdate() - 30" ` ... ``` ``` ./FastBCP \ ... --datadrivenquery "SELECT tagname FROM tags" \ ... ``` ``` ./FastBCP \ ... --datadrivenquery "SELECT o_orderdate FROM dim_date where ref_date > getdate() - 30" \ ... ``` `--datadrivenquery`Long form only `--datadrivenquery ""`, with the `DataDriven` method. ## Merge (boolean)[​](#merge "Direct link to Merge (boolean)") Use `--merge` true/false to specify if the files generated by the parallel export should be merged into a single output file (`true`) or kept as separate files (`false`). `--merge`or`-M`default `false` `--merge true` or `--merge false` (short form: `-M`) warning * Current version allows valid merge for CSV and Parquet formats only. * Merge is not available for cloud destinations: `--merge true` is forced to `false` (with a warning in the log) when `--directory` is a cloud URI. * Merge is not supported with gzip compressed output (`.csv.gz`, `.tsv.gz`, `.json.gz`): FastBCP stops with an error. - Windows - Linux ``` # Merge files after parallel export .\FastBCP.exe ` ... --merge true ` ... # Keep distributed files (default) .\FastBCP.exe ` ... --merge false ` ... ``` ``` # Merge files after parallel export ./FastBCP \ ... --merge true \ ... # Keep distributed files (default) ./FastBCP \ ... --merge false \ ... ``` ## 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 PostgreSQL database on localhost:15432 | | **Data** | A query on the `tpch_10.orders` table | | **Method** | `DataDriven`, distributing work on the month of the order date, computed with an expression | | **Split values** | A custom query generates the month values to extract from a light query (instead of a `SELECT DISTINCT o_ordermonth` from the source query) | | **Threads** | 10 parallel threads (even if there are 12 months to export) | | **Output** | Distributed files kept, without merging (`--merge false`) | | **Run ID** | A custom Run ID for tracking | * Windows * Linux ``` .\FastBCP.exe ` --connectiontype "pgcopy" ` --server "localhost:15432" ` --database "tpch" ` --user "FastUser" ` --password "FastPassword" ` --query "with T1 AS (select *, to_char(o_orderdate, 'YYYYMM') o_ordermonth from tpch_10.orders) SELECT * FROM T1" ` --directory "D:\temp\tpch\orders\" ` --fileoutput "pgcopy_orders.parquet" ` --method "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" ` --paralleldegree 10 ` --merge "False" ` --runid "pgcopy_to_parquet_parallel12_DataDriven" ``` ``` ./FastBCP \ --connectiontype "pgcopy" \ --server "localhost:15432" \ --database "tpch" \ --user "FastUser" \ --password "FastPassword" \ --query "with T1 AS (select *, to_char(o_orderdate, 'YYYYMM') o_ordermonth from tpch_10.orders) SELECT * FROM T1" \ --directory "/data/export/tpch/orders/" \ --fileoutput "pgcopy_orders.parquet" \ --method "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" \ --paralleldegree 10 \ --merge "False" \ --runid "pgcopy_to_parquet_parallel12_DataDriven" ``` ## Timepartition Example[​](#timepartition-example "Direct link to Timepartition Example") Here's an example using the Timepartition method to partition data based on a date column: | | This example | | ----------- | -------------------------------------------------------------- | | **Source** | A SQL Server database on localhost | | **Data** | The `tpch_10.orders_date_sorted` table | | **Method** | `Timepartition`, by year and month on the `o_orderdate` column | | **Threads** | 16 parallel threads | | **Output** | Distributed files kept, without merging | | **Run ID** | A custom Run ID for tracking | * Windows * Linux ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "tpch_copy" ` --user "FastUser" ` --password "FastPassword" ` --sourceschema "tpch_10" ` --sourcetable "orders_date_sorted" ` --directory "D:\temp\TestPartition" ` --fileoutput "orders.csv" ` --decimalseparator "," ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --method "Timepartition" ` --distributekeycolumn "(o_orderdate,year,month)" ` --paralleldegree 16 ` --merge "False" ` --runid "mssql_to_csv_parallel8_timepartition" ``` ``` ./FastBCP \ --connectiontype "mssql" \ --server "localhost" \ --database "tpch_copy" \ --user "FastUser" \ --password "FastPassword" \ --sourceschema "tpch_10" \ --sourcetable "orders_date_sorted" \ --directory "/data/export/TestPartition" \ --fileoutput "orders.csv" \ --decimalseparator "," \ --delimiter "|" \ --dateformat "yyyy-MM-dd HH:mm:ss" \ --encoding "UTF-8" \ --method "Timepartition" \ --distributekeycolumn "(o_orderdate,year,month)" \ --paralleldegree 16 \ --merge "False" \ --runid "mssql_to_csv_parallel8_timepartition" ``` ## DBPartition Example[​](#dbpartition-example "Direct link to DBPartition Example") Here's an example using the DBPartition method to export each partition of a partitioned table into a Hive-style directory: | | This example | | -------------- | ------------------------------------------------------------------------------------------------ | | **Source** | A PostgreSQL database on localhost:5432 | | **Data** | The partitioned table `tpch_10.orders_partitioned`, one extraction per leaf table | | **Scheduling** | Starts with the largest partitions and runs up to 8 of them in parallel | | **Output** | Each partition written to `partition=/orders.parquet` (`HIVE` mode), without merging | | **Run ID** | A custom Run ID for tracking | * Windows * Linux ``` $env:FASTBCP_DBPARTITION_TARGET_MODE = "HIVE" .\FastBCP.exe ` --connectiontype "pgsql" ` --server "localhost:5432" ` --database "tpch" ` --user "FastUser" ` --password "FastPassword" ` --sourceschema "tpch_10" ` --sourcetable "orders_partitioned" ` --method "DBPartition" ` --paralleldegree 8 ` --directory "D:\temp\orders" ` --fileoutput "orders.parquet" ` --merge "False" ` --runid "pgsql_to_parquet_dbpartition" ``` ``` export FASTBCP_DBPARTITION_TARGET_MODE=HIVE ./FastBCP \ --connectiontype "pgsql" \ --server "localhost:5432" \ --database "tpch" \ --user "FastUser" \ --password "FastPassword" \ --sourceschema "tpch_10" \ --sourcetable "orders_partitioned" \ --method "DBPartition" \ --paralleldegree 8 \ --directory "/data/export/orders" \ --fileoutput "orders.parquet" \ --merge "False" \ --runid "pgsql_to_parquet_dbpartition" ``` --- # Parquet Formatting [Apache Parquet](https://parquet.apache.org/) is a columnar storage format optimized for analytics. FastBCP automatically uses Parquet format when the output file has a `.parquet` extension. ## Parquet Compression[​](#parquet-compression "Direct link to Parquet Compression") Use the `--parquetcompression` parameter to specify the parquet compression codec. ``` ./FastBCP \ ... --fileoutput "orders.parquet" \ --parquetcompression Snappy \ ... ``` `--parquetcompression`default `Zstd` Syntax: `--parquetcompression ` (long form). The default, `Zstd`, is faster and has a better compression ratio than the others. **Available Algorithms:** `None` No compression `Snappy` Fast, small compression, classic `Gzip` Smaller files, slower `Lzo` Slower, medium compression (rarely used) `Lz4` Slower, moderate compression `Zstd`Default Best compression and Fast tip The **Zstd** (default) is best for most cases. It provides the best compression ratio with moderate speed, ideal for cloud storage to minimize storage costs and transfer time. * So no need to set this parameter to use Zstd. ## Row Group Size Configuration[​](#row-group-size-configuration "Direct link to Row Group Size Configuration") Available since version 0.30.1 This feature is available starting from FastBCP version 0.30.1. You can control the Parquet row group size using the `FASTBCP_RGSIZE` environment variable. Row groups are the unit of parallelization in Parquet files, and their size can impact query performance and memory usage. `FASTBCP_RGSIZE`Environment variabledefault `max(2^18/sqrt(degree),64000)` Row group size of the Parquet files, in rows. See [FASTBCP\_RGSIZE](/1.6/documentation/environment-variables/fastbcp-rgsize.md). **Usage:** * Windows * Linux ``` # Set the row group size to 500,000 rows $env:FASTBCP_RGSIZE = "500000" # Run FastBCP .\FastBCP.exe --connectiontype mssql --server "localhost" ... ``` ``` # Set the row group size to 500,000 rows export FASTBCP_RGSIZE=500000 # Run FastBCP ./FastBCP --connectiontype mssql --server "localhost" ... ``` ## Complete Example[​](#complete-example "Direct link to Complete Example") * Windows * Linux ``` $env:FASTBCP_RGSIZE = "500000" .\FastBCP.exe ` --connectiontype mssql ` --server "localhost" ` --database "sales" ` --trusted ` --query "SELECT * FROM orders WHERE OrderDate >= '2024-01-01'" ` --directory "C:\exports" ` --fileoutput "orders.parquet" ` --parquetcompression Snappy ``` ``` export FASTBCP_RGSIZE=500000 ./FastBCP \ --connectiontype mssql \ --server "localhost" \ --database "sales" \ --trusted \ --query "SELECT * FROM orders WHERE OrderDate >= '2024-01-01'" \ --directory "/exports" \ --fileoutput "orders.parquet" \ --parquetcompression Snappy ``` --- # Source Info FastBCP offers multiple ways to define your data source for extraction. You can use a query, an input file, or specify schema and table names directly. ## Query[​](#query "Direct link to Query") Use the `--query` parameter to specify your extraction as a SELECT statement. ``` ./FastBCP \ ... --query "SELECT * FROM Sales.Orders WHERE OrderDate >= '2024-01-01'" \ ... ``` `--query`or`-q` `--query "SELECT_statement"` (short form: `-q "SELECT_statement"`) ## Input File[​](#input-file "Direct link to Input File") Use the `--fileinput` parameter to specify an input file that contains only one query. ``` ./FastBCP \ ... --fileinput "/sources/sql/queries/my_extraction.sql" \ ... ``` `--fileinput`or`-F` `--fileinput "file_path"` (short form: `-F "file_path"`) Warning The query in the input file must not end with a semicolon (`;`). ## Source Schema[​](#source-schema "Direct link to Source Schema") If no query or input file is used, you can specify the source schema with the `--sourceschema` parameter. Combined with the source table, this will extract data from `sourceschema.sourcetable`. ``` ./FastBCP \ ... --sourceschema "Sales" \ --sourcetable "Orders" \ ... ``` `--sourceschema`or`-s` `--sourceschema "schema_name"` (short form: `-s "schema_name"`) Information This field is mandatory with the `Physical` (and the deprecated `Ctid`, `Rowid`, `Physloc`) and `DBPartition` parallel methods. See **[Parallel Parameters](/1.6/documentation/cli/parallel_parameters.md#physical-method)** for more details. ## Source Table[​](#source-table "Direct link to Source Table") If no query or input file is used, you can specify the source table with the `--sourcetable` parameter. Combined with the source schema, this will extract data from `sourceschema.sourcetable`. ``` ./FastBCP \ ... --sourceschema "Sales" \ --sourcetable "Orders" \ ... ``` `--sourcetable`or`-T` `--sourcetable "table_name"` (short form: `-T "table_name"`) Information This field is mandatory with the `Physical` (and the deprecated `Ctid`, `Rowid`, `Physloc`) and `DBPartition` parallel methods. See **[Parallel Parameters](/1.6/documentation/cli/parallel_parameters.md#physical-method)** for more details. Warning if you use the placeholder `{sourceschema}` and `{sourcetable}` in the `--directory` or `--fileoutput` (See **[Output Info](/1.6/documentation/cli/output_info.md)**) then you must set the `--sourceschema `and the `--sourcetable `even you use `--query `or `--inputfile` Related * [Parallel Parameters](/1.6/documentation/cli/parallel_parameters.md#physical-method)the `Physical` method * [Output Info](/1.6/documentation/cli/output_info.md)tokens in `--directory` and `--fileoutput` --- # AWS S3 Configuration Complete guide for configuring AWS S3 connectivity with FastBCP. ## Authentication Methods[​](#authentication-methods "Direct link to Authentication Methods") FastBCP supports multiple AWS authentication methods, listed in order of precedence: 1\. AWS Credentials File The most common method for local development and testing * Recommended forLocal development * Configured with`~/.aws/credentials` (and optionally `~/.aws/config`), profiles selected with `--cloudprofile` 2\. Environment Variables Useful for CI/CD pipelines and containerized environments * Recommended forCI/CD * Configured with`AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, `AWS_DEFAULT_REGION`, optionally `AWS_SESSION_TOKEN` 3\. IAM Roles EC2, ECS, Lambda, Batch and EKS * Recommended forAWS infrastructure * Configured withThe instance's IAM role, no credentials configuration needed ### 1. AWS Credentials File[​](#1-aws-credentials-file "Direct link to 1. AWS Credentials File") The most common method for local development and testing. | OS | Credentials file 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):** `~/.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 FastBCP:** ``` # Use default profile ./FastBCP \ ... --directory "s3://my-bucket/exports" \ --fileoutput "data.parquet" \ ... # Use production profile ./FastBCP \ ... --directory "s3://prod-bucket/exports" \ --cloudprofile "production" \ --fileoutput "data.parquet" \ ... # Use development profile ./FastBCP \ ... --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 FastBCP .\FastBCP.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 FastBCP ./FastBCP \ ... --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 FastBCP runs on AWS infrastructure, it can automatically use 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 FastBCP:** ``` { "Version": "2012-10-17", "Statement": [ { "Sid": "FastBCPRequired", "Comment": "REQUIRED - actual operations performed by FastBCP (multipart upload)", "Effect": "Allow", "Action": [ "s3:PutObject", "s3:AbortMultipartUpload" ], "Resource": "arn:aws:s3:::MY-BUCKET/exports/*" }, { "Sid": "FastBCPOptionalConvenience", "Comment": "OPTIONAL - operational convenience, not required by the code", "Effect": "Allow", "Action": [ "s3:GetObject", "s3:ListBucket" ], "Resource": [ "arn:aws:s3:::MY-BUCKET/exports/*", "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 ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "orders" ` --directory "s3://my-bucket/exports/{sourcetable}" ` --fileoutput "{sourcetable}.parquet" ``` ``` ./FastBCP \ --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 ``` .\FastBCP.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" ``` ``` ./FastBCP \ --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 ``` .\FastBCP.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 ``` ``` ./FastBCP \ --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") FastBCP 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/*" } } } ] } ``` ## Server-Side Encryption with AWS KMS (SSE-KMS)[​](#server-side-encryption-with-aws-kms-sse-kms "Direct link to Server-Side Encryption with AWS KMS (SSE-KMS)") FastBCP can write to buckets encrypted with SSE-KMS. Encryption is done by S3 on the server side, so FastBCP never calls AWS KMS directly: S3 calls KMS on behalf of the identity that uploads the files. Encryption can come from: * **Bucket default encryption:** the bucket is configured with SSE-KMS as its default encryption, and S3 encrypts every new object with the configured key. Nothing needs to be set on the FastBCP side. * **App-driven encryption:** the upload request itself asks for SSE-KMS (and optionally a specific KMS key). The required permissions are the same. ### KMS Permissions[​](#kms-permissions "Direct link to KMS Permissions") FastBCP uploads files with S3 multipart uploads. With SSE-KMS, a multipart upload needs both `kms:GenerateDataKey` and `kms:Decrypt` on the KMS key, in addition to the S3 permissions above. | Key type | What to configure | | ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | **AWS managed key** (`aws/s3`) | Nothing more: its key policy already lets any principal of the account use it through S3. It cannot be used across accounts. | | **Customer managed key** | Allow `kms:GenerateDataKey` and `kms:Decrypt` in the IAM policy of the identity running FastBCP **and** make sure the key policy allows that identity (or delegates to IAM policies). | **Example IAM policy for a customer managed key:** ``` { "Version": "2012-10-17", "Statement": [ { "Sid": "FastBCPS3Upload", "Effect": "Allow", "Action": [ "s3:PutObject", "s3:AbortMultipartUpload" ], "Resource": "arn:aws:s3:::MY-BUCKET/exports/*" }, { "Sid": "FastBCPKmsForSSE", "Effect": "Allow", "Action": [ "kms:GenerateDataKey", "kms:Decrypt" ], "Resource": "arn:aws:kms:eu-west-1:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab", "Condition": { "StringEquals": { "kms:ViaService": "s3.eu-west-1.amazonaws.com" } } } ] } ``` S3 Bucket Keys Enabling **S3 Bucket Keys** on the bucket reduces the number of calls from S3 to KMS, and therefore KMS costs and throttling, which matters for parallel exports that write many files. With Bucket Keys, the KMS encryption context is the bucket ARN instead of the object ARN: update any `kms:EncryptionContext` condition in your policies accordingly. ### Network / Egress[​](#network--egress "Direct link to Network / Egress") Since S3 calls KMS itself, FastBCP only needs network access to the S3 endpoint, not to the KMS endpoint. In a private VPC, an S3 gateway or interface endpoint is enough. --- # Azure Configuration Complete guide for configuring Azure Blob Storage and Azure Data Lake Gen2 connectivity with FastBCP. ## 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") FastBCP supports multiple Azure authentication methods: | Method | Best for | | ---------------------------------------------------- | ------------------------------------ | | [**1. Azure CLI**](#1-azure-cli) | Recommended for local development | | [**2. Connection String**](#2-connection-string) | Simple but less secure | | [**3. Storage Account Key**](#3-storage-account-key) | Via environment variables | | [**4. Managed Identity**](#4-managed-identity) | Recommended for Azure infrastructure | | [**5. SAS URL**](#5-sas-url) | Scoped, time-limited access | For direct commit to Azure Blob Storage, FastBCP uses `AZURE_STORAGE_CONNECTION_STRING` or `AZURE_STORAGE_SAS_URL` when one of them is set, and falls back to `DefaultAzureCredential` (Azure CLI, Managed Identity, environment credentials, …) otherwise. The selected authentication method is written to the log. ### 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 ``` FastBCP will automatically use the Azure CLI's authentication credentials. **Using with FastBCP:** ``` # No additional configuration needed - just run FastBCP ./FastBCP \ ... --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. Copy the connection string Azure Portal›Storage Account›Security + networking›Access keys 1. Navigate to your Storage Account 2. Go to **Security + networking** › **Access keys** 3. Copy the **Connection string** for key1 or key2 Goes into the environment variable * Connection string→`AZURE_STORAGE_CONNECTION_STRING` ``` 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 FastBCP .\FastBCP.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 FastBCP ./FastBCP \ ... --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. Copy a storage account key Azure Portal›Storage Account›Security + networking›Access keys 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 FastBCP .\FastBCP.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 FastBCP ./FastBCP \ ... --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 FastBCP 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. Enable the system-assigned identity Azure Portal›Your resource›Identity 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}" ``` ### 5. SAS URL[​](#5-sas-url "Direct link to 5. SAS URL") Since FastBCP 1.3, you can authenticate to Azure Blob Storage with a Shared Access Signature (SAS) URL, set in the `AZURE_STORAGE_SAS_URL` environment variable. A SAS grants scoped, time-limited access without sharing the account key. **Generate a container SAS URL:** * Azure Portal * Azure CLI 1. Generate a container SAS URL Azure Portal›Storage Account›Containers›Your container›Shared access tokens 1. Navigate to your Storage Account › **Containers** › your container 2. Go to **Shared access tokens** 3. Select the **Create** and **Write** permissions and an expiry date 4. Click **Generate SAS token and URL** and copy the **Blob SAS URL** Goes into the environment variable * Blob SAS URL→`AZURE_STORAGE_SAS_URL` ``` az storage container generate-sas \ --account-name mystorageaccount \ --name mycontainer \ --permissions cw \ --expiry 2026-12-31T23:59Z \ --auth-mode key \ --output tsv # Then build the URL: https://mystorageaccount.blob.core.windows.net/mycontainer? ``` **Set the SAS URL:** * Windows (PowerShell) * Linux/macOS ``` $env:AZURE_STORAGE_SAS_URL="https://mystorageaccount.blob.core.windows.net/mycontainer?sv=...&sig=..." # Run FastBCP .\FastBCP.exe ` ... --directory "abs://mystorageaccount.blob.core.windows.net/mycontainer/exports" ` --fileoutput "data.parquet" ` ... ``` ``` export AZURE_STORAGE_SAS_URL="https://mystorageaccount.blob.core.windows.net/mycontainer?sv=...&sig=..." # Run FastBCP ./FastBCP \ ... --directory "abs://mystorageaccount.blob.core.windows.net/mycontainer/exports" \ --fileoutput "data.parquet" \ ... ``` tip Quote the SAS URL: it contains `&` characters that the shell would otherwise interpret. ## 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 ``` .\FastBCP.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" ``` ``` ./FastBCP \ --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 ``` .\FastBCP.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 ``` ``` ./FastBCP \ --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 ``` .\FastBCP.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" ``` ``` ./FastBCP \ --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 ``` .\FastBCP.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 ``` ``` ./FastBCP \ --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") | Role | Access | | | --------------------------------- | ------------------------------------ | ----------- | | **Storage Blob Data Contributor** | Full read/write access to blobs | Recommended | | **Storage Blob Data Owner** | Full access including ACL management | Alternative | | **Storage Blob Data Reader** | Read-only access (for verification) | Alternative | ### Container Access[​](#container-access "Direct link to Container Access") FastBCP creates the target container if it does not exist. When the container already exists, a missing permission to create it (HTTP 403 or 409 on the create call) is tolerated, so an identity or SAS that can only write blobs into an existing container is enough. ### Troubleshooting 403 Errors[​](#troubleshooting-403-errors "Direct link to Troubleshooting 403 Errors") A `403 Forbidden` from Azure Storage usually comes from one of the following. FastBCP logs the authentication method it used, which helps tell these cases apart. Firewall Error: `403 Forbidden` How to fix **Cause:** the storage account's network rules do not allow the IP address or virtual network FastBCP runs from. RBAC Error: `403 Forbidden` How to fix **Cause:** the identity used by `DefaultAzureCredential` has no data-plane role (such as **Storage Blob Data Contributor**) on the account or container. Management roles such as *Owner* or *Contributor* are not enough. Role assignments can take a few minutes to apply. SAS permissions Error: `403 Forbidden` How to fix **Cause:** the SAS token is expired, is scoped to another container, or lacks the **Create** / **Write** permissions. ### Assign Role via Azure Portal[​](#assign-role-via-azure-portal "Direct link to Assign Role via Azure Portal") 1. Add a role assignment Azure Portal›Storage Account›Access Control (IAM) 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 FastBCP. ## Authentication Methods[​](#authentication-methods "Direct link to Authentication Methods") FastBCP supports multiple Google Cloud authentication methods: 1\. gcloud CLIRecommended The simplest method for local development and testing * Recommended forLocal development * Configured with`gcloud auth application-default login` 2\. Service Account Key File Production environments, CI/CD pipelines, and automated workflows * Recommended forProduction * Configured withA JSON key file, set in `GOOGLE_APPLICATION_CREDENTIALS` 3\. Default Application Credentials Compute Engine, GKE, Cloud Run, Cloud Functions, App Engine * Recommended forGCP infrastructure * Configured withThe default service account, no credentials configuration needed ### 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 ``` FastBCP will automatically use the gcloud CLI's authentication credentials. **Using with FastBCP:** ``` # No additional configuration needed - just run FastBCP ./FastBCP \ ... --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. Create the service account [Google Cloud Console›IAM & Admin›Service Accounts](https://console.cloud.google.com/iam-admin/serviceaccounts) 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., "fastbcp-export") 4. Click **Create and Continue** 5. Grant **Storage Object Admin** role 6. Click **Continue** › **Done** 2. Create a JSON key Google Cloud Console›Service Accounts›Your service account›Keys 1. Click on the service account 2. Go to **Keys** tab 3. Click **Add Key** › **Create new key** 4. Select **JSON** format 5. Click **Create** (JSON file will download) Goes into the environment variable * Path to the downloaded JSON key file→`GOOGLE_APPLICATION_CREDENTIALS` ``` # Create service account gcloud iam service-accounts create fastbcp-export \ --display-name="FastBCP Export Service Account" # Grant Storage Object Admin role gcloud projects add-iam-policy-binding my-project-id \ --member="serviceAccount:fastbcp-export@my-project-id.iam.gserviceaccount.com" \ --role="roles/storage.objectAdmin" # Create and download key file gcloud iam service-accounts keys create ~/fastbcp-key.json \ --iam-account=fastbcp-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\fastbcp-key.json" # Run FastBCP .\FastBCP.exe ` ... --directory "gs://my-bucket/exports" ` --fileoutput "data.parquet" ` ... ``` ``` # Set path to service account key file export GOOGLE_APPLICATION_CREDENTIALS="/path/to/fastbcp-key.json" # Run FastBCP ./FastBCP \ ... --directory "gs://my-bucket/exports" \ --fileoutput "data.parquet" \ ... ``` ### 3. Default Application Credentials[​](#3-default-application-credentials "Direct link to 3. Default Application Credentials") When FastBCP 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 ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Orders" ` --directory "gs://my-bucket/exports/orders" ` --fileoutput "orders.parquet" ``` ``` ./FastBCP \ --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 ``` .\FastBCP.exe ` --connectiontype "pgsql" ` --server "localhost" ` --port "5432" ` --database "analytics" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "events" ` --query "SELECT * FROM events WHERE event_date >= '2024-01-01'" ` --directory "gs://analytics-bucket/events/2024" ` --fileoutput "events.parquet" ` --parallelmethod "Physical" ` --paralleldegree 10 ``` ``` ./FastBCP \ --connectiontype "pgsql" \ --server "localhost" \ --port "5432" \ --database "analytics" \ --user "postgres" \ --password "postgres" \ --sourceschema "public" \ --sourcetable "events" \ --query "SELECT * FROM events WHERE event_date >= '2024-01-01'" \ --directory "gs://analytics-bucket/events/2024" \ --fileoutput "events.parquet" \ --parallelmethod "Physical" \ --paralleldegree 10 ``` ### Export with Date Partitioning[​](#export-with-date-partitioning "Direct link to Export with Date Partitioning") * Windows * Linux ``` .\FastBCP.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 ``` ``` ./FastBCP \ --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 the Physical parallel method[​](#export-from-oracle-to-gcs-using-the-physical-parallel-method "Direct link to Export from Oracle to GCS using the Physical parallel method") * Windows * Linux ``` .\FastBCP.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 "Physical" ` --paralleldegree 8 ``` ``` ./FastBCP \ --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 "Physical" \ --paralleldegree 8 \ --merge "False" ``` ## Bucket Configuration[​](#bucket-configuration "Direct link to Bucket Configuration") ### Create Bucket[​](#create-bucket "Direct link to Create Bucket") * Google Cloud Console * gcloud CLI 1. Create the bucket [Google Cloud Console›Cloud Storage›Buckets](https://console.cloud.google.com/storage/browser) 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:** | Role | ID | Access | | -------------------------- | ----------------------------- | ------------------- | | **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. Grant access on the bucket [Google Cloud Console›Cloud Storage›Buckets›Your bucket›Permissions](https://console.cloud.google.com/storage/browser) 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:fastbcp-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 FastBCP instead of bucket storage admin: | Permission | Purpose | | ------------------------ | ------------------------------- | | `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 FastBCP connects to OneLake with an Entra application (service principal): set it up once in Entra and Fabric, then set its credentials as environment variables before running FastBCP. ## Authentication Setup[​](#authentication-setup "Direct link to Authentication Setup") 1. Create an application account in your tenant Entra Create an application account in your tenant. Goes into the environment variable * Application (Entra) ID→`AZURE_CLIENT_ID` 2. Create a secret for this application Entra Create a secret for the application created in step 1. Goes into the environment variable * Client secret→`AZURE_CLIENT_SECRET` 3. Grant the application on Power BI Service Entra›API Permission Grant the application on **PowerBI Service** in **API Permission**. 4. Give the service principal the Admin role Fabric›Your workspace Give the service principal created in step 1 the **Admin** role in your workspace. ## Set the Environment Variables and Export[​](#set-the-environment-variables-and-export "Direct link to Set the Environment Variables and Export") In your shell, set the environment variables, then run FastBCP with an `onelake://` directory: * Windows * Linux ``` $env:AZURE_TENANT_ID="YOUR_TENANT_ID" $env:AZURE_CLIENT_ID="APPLICATION_ENTRA_ID" $env:AZURE_CLIENT_SECRET="Your_AZCLient_Secret" .\FastBCP.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 "onelake://myworkspace/mylakehouse/{sourcedatabase}/{sourceschema}/{sourcetable}/year=2024/" ` --fileoutput "orders_2024.parquet" ` --parallelmethod "Physical" ` --paralleldegree 8 ``` ``` export AZURE_TENANT_ID="YOUR_TENANT_ID" export AZURE_CLIENT_ID="APPLICATION_ENTRA_ID" export AZURE_CLIENT_SECRET="Your_AZCLient_Secret" ./FastBCP ` --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 "onelake://myworkspace/mylakehouse/{sourcedatabase}/{sourceschema}/{sourcetable}/year=2024/" \ --fileoutput "orders_2024.parquet" \ --parallelmethod "Physical" \ --paralleldegree 8 ``` --- # Cloud Connectivity Overview FastBCP 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") [![](/img/logos/aws-s3.png)AWS S3`s3://`](/1.6/documentation/cloud-connectivity/aws-s3.md) Authentication * Credentials file * Environment variables * IAM roles [![](/img/logos/azure-blob.svg)Azure Blob Storage`abs://`](/1.6/documentation/cloud-connectivity/azure.md) Authentication * Azure CLI * Connection string * Access keys * Managed Identity [![](/img/logos/azure-blob.svg)Azure Data Lake Gen2`abfss://`](/1.6/documentation/cloud-connectivity/azure.md) Authentication * Azure CLI * Connection string * Access keys * Managed Identity [![](/img/logos/gcs.png)Google Cloud Storage`gs://`](/1.6/documentation/cloud-connectivity/google-cloud.md) Authentication * gcloud CLI * Service account * Default credentials [![](/img/logos/onelake.png)OneLake`onelake://`](/1.6/documentation/cloud-connectivity/onelake.md) Authentication * Azure CLI * Connection string * Access keys * Managed Identity S3-Compatible Storage`s3://` Authentication * Credentials file * Environment variables ## Key Features[​](#key-features "Direct link to Key Features") * Direct UploadExport data directly to cloud storage without local disk space requirements. * Multiple Authentication MethodsCLI profiles, credentials files, environment variables, and cloud-native identity solutions. * Profile ManagementThe `--cloudprofile` parameter switches between different cloud accounts and environments (development, staging, production). * Automatic RetryBuilt-in retry logic for network failures and transient cloud service errors. ### Direct Upload[​](#direct-upload "Direct link to Direct Upload") Good to know FastBCP uses multi-part uploads for all cloud providers. Warning Since FastBCP 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") Authentication is resolved through a fallback chain, in the following order: 1. 1`--cloudprofile`Used first, if provided. 2. 2Environment variablesStandard authentication environment variables are used as the first fallback. 3. 3Managed IdentityUsed as the second fallback. 4. 4IAM role / profileUsed as the final fallback. ## 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: * [![](/img/logos/aws-s3.png)AWS S3 Setup](/1.6/documentation/cloud-connectivity/aws-s3.md) * [![](/img/logos/azure-blob.svg)Azure Setup](/1.6/documentation/cloud-connectivity/azure.md) * [![](/img/logos/gcs.png)Google Cloud Storage Setup](/1.6/documentation/cloud-connectivity/google-cloud.md) * [![](/img/logos/onelake.png)OneLake Setup](/1.6/documentation/cloud-connectivity/onelake.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 * Azure Blob * Azure Data Lake Gen2 * Google Cloud Storage * OneLake ``` # AWS S3 & S3-Compatible ./FastBCP / ... --directory "s3://my-bucket/exports" / --fileoutput "data.parquet" / ... ``` ``` # Azure Blob ./FastBCP \ ... --directory "abs://account.blob.core.windows.net/container/exports/" \ --fileoutput "data.parquet" \ ... ``` ``` # Azure Datalake Gen 2 ./FastBCP \ ... --directory "abs://account.dfs.core.windows.net/container/exports/" \ --fileoutput "data.parquet" \ ... ``` ``` # Google Cloud Storage ./FastBCP \ ... --directory "gs://my-bucket/exports" \ --fileoutput "data.parquet" \ ... ``` ``` # OneLake ./FastBCP \ ... --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: ``` ./FastBCP \ ... --directory "s3://prod-bucket/exports" \ --cloudprofile "production" \ ... ./FastBCP \ ... --directory "s3://dev-bucket/exports" \ --cloudprofile "development" ... ``` --- # Operating Systems FastBCP supports Windows and Linux 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 | | ------------------------ | -------------------------- | ------------- | --------- | | Amazon Linux | 2023 (Kernel 6.1) | Arm64, x64 | 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 FastBCP supports a wide range of database systems across different platforms. ## Supported Databases & Platforms[​](#supported-databases--platforms "Direct link to Supported Databases & Platforms") | Database | Windows AMD64 | Linux AMD64 | Linux ARM64 | | ---------------------------------------- | ------------- | ------------- | ------------- | | **SQL Server** | Supported | Supported | Supported | | **SQL Server (ADBC)** | Supported | Supported | Not supported | | **SQL Server backup files (.bak, ADBC)** | Supported | Supported | Not supported | | **PostgreSQL** | Supported | Supported | Supported | | **PostgreSQL (ADBC)** | Supported | Supported | Not supported | | **MySQL** | Supported | Supported | Supported | | **Oracle** | Supported | Supported | Supported | | **Oracle (ADBC)** | Supported | Supported | Not supported | | **Oracle RMAN backup sets (ADBC)** | Supported | Supported | Not supported | | **ClickHouse** | Supported | Supported | Supported | | **DuckDB** | Supported | Supported | Supported | | **Teradata** | Supported | Supported | Not supported | | **Teradata (ADBC)** | Supported | Supported | Not supported | | **Netezza** | Supported | Supported | Not supported | | **Netezza (ADBC)** | Supported | Supported | Not supported | | **SAP HANA** | Supported | Supported | Not supported | | **ODBC** | Supported | Supported | Supported | | **OLEDB** | Supported | Not supported | Not supported | Good to know The ADBC FastDriver connectors (**SQL Server (ADBC)**, **SQL Server backup files**, **PostgreSQL (ADBC)**, **Oracle (ADBC)**, **Oracle RMAN backup sets**, **Netezza (ADBC)** and **Teradata (ADBC)**) are not supported on **Linux ARM64**. --- # FASTBCP\_ADBC\_BATCHCELLS ## Overview[​](#overview "Direct link to Overview") The `FASTBCP_ADBC_BATCHCELLS` environment variable controls the size of the Arrow record batches fetched by the ADBC connectors (`adbc_mssql`, `adbc_pgsql`), expressed in **cells** (rows × columns) rather than rows alone. Because a batch's memory footprint depends on both its row count and its column count, sizing by cell count keeps memory usage predictable across tables of very different widths: a narrow table fetches more rows per batch, a wide table fewer, for a comparable memory footprint. ## Syntax[​](#syntax "Direct link to Syntax") * Windows * Linux ``` $env:FASTBCP_ADBC_BATCHCELLS = 1000000 ``` ``` export FASTBCP_ADBC_BATCHCELLS=1000000 ``` ## Configuration[​](#configuration "Direct link to Configuration") | Property | Value | | -------------- | ------------------------------------------------------------------- | | **Type** | Integer (> 0) | | **Default** | `500000` (500,000 cells) | | **Applies to** | `adbc_mssql` and `adbc_pgsql` connections (Arpe.io ADBC FastDriver) | | **Since** | FastBCP 1.2 | ## How Batch Size Is Derived[​](#how-batch-size-is-derived "Direct link to How Batch Size Is Derived") For a given table, the effective number of rows per Arrow record batch is computed as: ``` rows per batch = FASTBCP_ADBC_BATCHCELLS / number of columns ``` For example, with the default `500000` cells: | Columns | Rows per batch | | ------- | -------------- | | 10 | 50,000 | | 50 | 10,000 | | 500 | 1,000 | ## When to Change It[​](#when-to-change-it "Direct link to When to Change It") * **Increase** the value to reduce the number of round trips for very wide or very narrow tables when more memory is available, which can improve throughput. * **Decrease** the value to lower peak memory usage in constrained environments (containers, small VMs) or when exporting extremely wide tables. ## Examples[​](#examples "Direct link to Examples") ### Increase batch size for higher throughput[​](#increase-batch-size-for-higher-throughput "Direct link to Increase batch size for higher throughput") * Windows * Linux ``` $env:FASTBCP_ADBC_BATCHCELLS = 2000000 fastbcp -S myserver.database.windows.net ` -d MyDatabase ` -T dbo.MyTable ` -C adbc_mssql ` --fileoutput "output.parquet" ``` ``` export FASTBCP_ADBC_BATCHCELLS=2000000 fastbcp -S myserver.database.windows.net \ -d MyDatabase \ -T dbo.MyTable \ -C adbc_mssql \ --fileoutput "output.parquet" ``` ### Reduce batch size to limit memory usage[​](#reduce-batch-size-to-limit-memory-usage "Direct link to Reduce batch size to limit memory usage") * Windows * Linux ``` $env:FASTBCP_ADBC_BATCHCELLS = 100000 fastbcp -S pg-server:5432 ` -d MyDatabase ` -Q "SELECT * FROM public.orders" ` -C adbc_pgsql ` --fileoutput "orders.parquet" ``` ``` export FASTBCP_ADBC_BATCHCELLS=100000 fastbcp -S pg-server:5432 \ -d MyDatabase \ -Q "SELECT * FROM public.orders" \ -C adbc_pgsql \ --fileoutput "orders.parquet" ``` Platform availability This variable only applies to the ADBC FastDriver connectors (`adbc_mssql`, `adbc_pgsql`), available on **Windows x64** and **Linux x64** only. See [Connection Parameters](/1.6/documentation/cli/connection_parameters.md#connection-type) for details. --- # FASTBCP\_BACKUP\_RESTORE\_MODE ## Overview[​](#overview "Direct link to Overview") `--connectiontype backup_mssql` (since FastBCP 1.6.7) and `--connectiontype backup_rman` (since FastBCP 1.6.8) read the latest version of a table among the files you give them. When a backup that could be the newest cannot be used, the export **fails and names it**, rather than reading older data without saying so. The `FASTBCP_BACKUP_RESTORE_MODE` environment variable changes that without touching the command. Set it to `best_effort` to skip that backup and read the newest version that can be used. ## Syntax[​](#syntax "Direct link to Syntax") * Windows * Linux ``` $env:FASTBCP_BACKUP_RESTORE_MODE = "best_effort" ``` ``` export FASTBCP_BACKUP_RESTORE_MODE=best_effort ``` ## Configuration[​](#configuration "Direct link to Configuration") | Property | Value | | -------------- | ------------------------------------------------------------------------------------------------------------------- | | **Values** | `strict` or `best_effort`, in any case. Any other value stops the run at startup with a message naming the variable | | **Default** | Not set: `strict` | | **Applies to** | `--connectiontype backup_mssql` (since 1.6.7), `--connectiontype backup_rman` (since 1.6.8) | | **Since** | FastBCP 1.6.7 | | Value | A backup that could be the newest and cannot be used | | ------------- | ------------------------------------------------------------------------------- | | `strict` | The export fails, naming the backup, and the logs say what can be done about it | | `best_effort` | It is skipped, and the newest usable version is read, however old | With `backup_rman`, this applies to an incremental backup whose level 0, or a level in between, is missing, and to a backup set that lacks a piece or is still being written. The tables of the other datafiles are read either way. ## What FastBCP Logs[​](#what-fastbcp-logs "Direct link to What FastBCP Logs") At the start of each export: ``` Backup version to read : restore point "latest", restore mode "strict" ``` With `strict`, a refusal is followed by a warning with the ways out. With `best_effort`, a warning at the start of each export says that older rows may be read. What `best_effort` skipped The backups skipped are reported on the **standard error output only**, not in the FastBCP logs. A job that captures only the logs sees that this can happen, not that it did: keep the standard error output of the job if you use this mode. Good to know `best_effort` needs another version to read. A SQL Server full backup alone that lost the end of its file fails with this mode too, and the logs then point to [`FASTBCP_BACKUP_RESTORE_POINT=full`](/1.6/documentation/environment-variables/fastbcp-backup-restore-point.md). ## With `--sourceconnectstring`[​](#with---sourceconnectstring "Direct link to with---sourceconnectstring") An `adbc.arpemsbackup.restore_mode` option (`backup_mssql`) or `adbc.arpeorabackup.restore_mode` option (`backup_rman`) in [`--sourceconnectstring`](/1.6/documentation/cli/connection_parameters.md#source-connection-string) wins over the variable. ## See Also[​](#see-also "Direct link to See Also") * [SQL Server backups that cannot be used](/1.6/documentation/cli/connection_parameters.md#backups-that-cannot-be-used) * [Oracle RMAN backups that cannot be used](/1.6/documentation/cli/connection_parameters.md#rman-backups-that-cannot-be-used) * [Upgrading to 1.6.7](/1.6/documentation/cli/connection_parameters.md#upgrading-to-1-6-7) (`backup_mssql`) * [Upgrading to 1.6.8](/1.6/documentation/cli/connection_parameters.md#upgrading-to-1-6-8) (`backup_rman`) --- # FASTBCP\_BACKUP\_RESTORE\_POINT ## Overview[​](#overview "Direct link to Overview") FastBCP reads the **latest version** the backup files hold: * `--connectiontype backup_mssql` (since FastBCP 1.6.7): the newest full backup, and the newest [differential backup](/1.6/documentation/cli/connection_parameters.md#differential-backups) taken from it. * `--connectiontype backup_rman` (since FastBCP 1.6.8): for each datafile, the newest full or level 0 backup, and the [incremental backups](/1.6/documentation/cli/connection_parameters.md#incremental-rman-backups) taken on it. The `FASTBCP_BACKUP_RESTORE_POINT` environment variable changes that without touching the command. Set it to `full` to ignore the differential or incremental backups and read the full backup. ## Syntax[​](#syntax "Direct link to Syntax") * Windows * Linux ``` $env:FASTBCP_BACKUP_RESTORE_POINT = "full" ``` ``` export FASTBCP_BACKUP_RESTORE_POINT=full ``` ## Configuration[​](#configuration "Direct link to Configuration") | Property | Value | | -------------- | ------------------------------------------------------------------------------------------------------------ | | **Values** | `latest` or `full`, in any case. Any other value stops the run at startup with a message naming the variable | | **Default** | Not set: `latest` | | **Applies to** | `--connectiontype backup_mssql` (since 1.6.7), `--connectiontype backup_rman` (since 1.6.8) | | **Since** | FastBCP 1.6.7 | | Value | `backup_mssql` | `backup_rman` | | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------- | | `latest` | The newest full backup among the files, and the newest differential taken from it | For each datafile, the newest full or level 0 backup, and the incremental backups taken on it | | `full` | The last full backup of one backup, as up to FastBCP 1.6.6. Its later differentials are ignored, and several backups in `--database` are refused | For each datafile, the most recent full or level 0 backup. The incremental backups are ignored | warning With `full`, an export does not read the differential or incremental backups, and so gets older rows, without any message saying so. Use it when that is what you want. ## With `--sourceconnectstring`[​](#with---sourceconnectstring "Direct link to with---sourceconnectstring") An `adbc.arpemsbackup.restore_point` option (`backup_mssql`) or `adbc.arpeorabackup.restore_point` option (`backup_rman`) in [`--sourceconnectstring`](/1.6/documentation/cli/connection_parameters.md#source-connection-string) wins over the variable. ## See Also[​](#see-also "Direct link to See Also") * [`FASTBCP_BACKUP_RESTORE_MODE`](/1.6/documentation/environment-variables/fastbcp-backup-restore-mode.md), what happens when a backup cannot be used * [Upgrading to 1.6.7](/1.6/documentation/cli/connection_parameters.md#upgrading-to-1-6-7) (`backup_mssql`) * [Upgrading to 1.6.8](/1.6/documentation/cli/connection_parameters.md#upgrading-to-1-6-8) (`backup_rman`) --- # FASTBCP\_CLOUD\_ISBUFFERED ## Overview[​](#overview "Direct link to Overview") The `FASTBCP_CLOUD_ISBUFFERED` environment variable controls whether FastBCP uses buffered uploads when writing to cloud storage. ## Syntax[​](#syntax "Direct link to Syntax") * Windows * Linux ``` $env:FASTBCP_CLOUD_ISBUFFERED = "True" # or "False" ``` ``` export FASTBCP_CLOUD_ISBUFFERED=True # or False ``` ## Configuration[​](#configuration "Direct link to Configuration") | Property | Value | | -------------- | --------------------------------------------------------------------- | | **Type** | Boolean (`True` / `False`) | | **Default** | `False` | | **Applies to** | Azure Data Lake Storage (ADLS), OneLake, AWS S3, Google Cloud Storage | | **Since** | FastBCP 1.0 | ## Behavior[​](#behavior "Direct link to Behavior") FalseDefault FastBCP uses the cloud SDK's OpenWriteAsync streaming upload * UploadData is written directly to the cloud storage in chunks. Each chunk blocks the writer until acknowledged * Performance**Simpler** but can be **slower** for Azure storage TrueRecommended for Azure FastBCP uses buffered uploads * UploadData is first written to a local temporary file (see [`FASTBCP_TMPPATH`](/1.6/documentation/environment-variables/fastbcp-tmppath.md)). When the stream is closed, the file is uploaded in parallel blocks (azcopy-like pattern) * Performance**Significantly faster** for Azure Data Lake Storage and OneLake * Disk spaceRequires temporary disk space --- # FASTBCP\_CLOUD\_MAXUPLOADTHREAD\_PER\_STREAM ## Overview[​](#overview "Direct link to Overview") The `FASTBCP_CLOUD_MAXUPLOADTHREAD_PER_STREAM` environment variable controls the maximum number of parallel threads used to upload each file to cloud storage during buffered uploads. ## Syntax[​](#syntax "Direct link to Syntax") * Windows * Linux ``` $env:FASTBCP_CLOUD_MAXUPLOADTHREAD_PER_STREAM = 16 ``` ``` export FASTBCP_CLOUD_MAXUPLOADTHREAD_PER_STREAM=16 ``` ## Configuration[​](#configuration "Direct link to Configuration") | Property | Value | | -------------- | -------------------------------------------------------------------------------------------------------------------------- | | **Type** | Integer (> 0) | | **Default** | `8` when `parallelmethod=None`, `2` otherwise | | **Applies to** | Cloud uploads when [`FASTBCP_CLOUD_ISBUFFERED=True`](/1.6/documentation/environment-variables/fastbcp-cloud-isbuffered.md) | | **Since** | FastBCP 1.0 | ## Behavior[​](#behavior "Direct link to Behavior") ### Default Values[​](#default-values "Direct link to Default Values") FastBCP automatically adjusts the default based on the parallel extraction method: | Parallel Method | Default Threads | Reason | | --------------------------- | --------------- | ---------------------------------------------------------------------------------------------- | | `None` (single stream) | `8` | FastBCP itself is not parallelized, so more bandwidth can be allocated to upload | | `Ntile`, `DataDriven`, etc. | `2` | FastBCP is already extracting in parallel, so limit upload threads to avoid saturating network | ### How It Works[​](#how-it-works "Direct link to How It Works") When [`FASTBCP_CLOUD_ISBUFFERED=True`](/1.6/documentation/environment-variables/fastbcp-cloud-isbuffered.md): 1. Data is written to a local temporary file 2. On stream close, the file is uploaded in parallel blocks 3. `FASTBCP_CLOUD_MAXUPLOADTHREAD_PER_STREAM` controls how many threads upload blocks concurrently 4. Maps to `StorageTransferOptions.MaximumConcurrency` in Azure SDK --- # FASTBCP\_DATEFORMAT ## Overview[​](#overview "Direct link to Overview") The `FASTBCP_DATEFORMAT` environment variable lets you specify a custom format string for converting date values to strings in the output. When not set, FastBCP uses the default `yyyy-MM-dd HH:mm:sszzz`. The format string follows [.NET standard and custom date/time format patterns](https://learn.microsoft.com/en-us/dotnet/standard/base-types/custom-date-and-time-format-strings). ## Syntax[​](#syntax "Direct link to Syntax") * Windows * Linux ``` $env:FASTBCP_DATEFORMAT = "yyyyMMdd" ``` ``` export FASTBCP_DATEFORMAT=yyyyMMdd ``` ## Configuration[​](#configuration "Direct link to Configuration") | Property | Value | | -------------- | --------------------------------------------------------------------------- | | **Type** | Format string | | **Default** | `yyyy-MM-dd HH:mm:sszzz` | | **Applies to** | All output formats that serialize date columns as strings (CSV, JSON, etc.) | | **Since** | FastBCP 1.0 | Auto-adaptive formatting The date format is auto-adaptive based on the column type: * **Date-only** columns will always output as `yyyy-MM-dd` regardless of the format string * **Timestamp/DateTime** columns will output as `yyyy-MM-dd HH:mm:ss` even if a timezone token (`zzz`) is present in the format string * **DateTimeOffset** columns will include the timezone offset as specified ## Format Examples[​](#format-examples "Direct link to Format Examples") | Format string | Example output | | ---------------------------------- | --------------------------- | | `yyyy-MM-dd HH:mm:sszzz` (default) | `2026-06-28 14:30:22+02:00` | | `yyyy-MM-dd` | `2026-06-28` | | `yyyyMMdd` | `20260628` | | `dd/MM/yyyy` | `28/06/2026` | | `MM-dd-yyyy` | `06-28-2026` | | `yyyy/MM/dd` | `2026/06/28` | | `yyyy-MM-dd HH:mm:ss` | `2026-06-28 14:30:22` | ## Examples[​](#examples "Direct link to Examples") ### Compact date format — no separators[​](#compact-date-format--no-separators "Direct link to Compact date format — no separators") * Windows * Linux ``` $env:FASTBCP_DATEFORMAT = "yyyyMMdd" fastbcp -S myserver.database.windows.net ` -d MyDatabase ` -T dbo.MyTable ` --fileoutput "output.csv" ``` ``` export FASTBCP_DATEFORMAT=yyyyMMdd fastbcp -S myserver.database.windows.net \ -d MyDatabase \ -T dbo.MyTable \ --fileoutput "output.csv" ``` Output column value: `20260628` ### Restore default ISO 8601 format[​](#restore-default-iso-8601-format "Direct link to Restore default ISO 8601 format") * Windows * Linux ``` Remove-Item Env:FASTBCP_DATEFORMAT ``` ``` unset FASTBCP_DATEFORMAT ``` --- # FASTBCP\_DBPARTITION\_TARGET\_MODE ## Overview[​](#overview "Direct link to Overview") The `FASTBCP_DBPARTITION_TARGET_MODE` environment variable controls how the files produced by the [`DBPartition`](/1.6/documentation/cli/parallel_parameters.md#available-methods) parallel method are named and laid out. `DBPartition` runs one extraction per native partition / subpartition of the source table. Each extraction writes its own file, either as a numbered chunk (`CHUNK`) or in a Hive-style directory named after the partition (`HIVE`). ## Syntax[​](#syntax "Direct link to Syntax") * Windows * Linux ``` $env:FASTBCP_DBPARTITION_TARGET_MODE = "HIVE" ``` ``` export FASTBCP_DBPARTITION_TARGET_MODE=HIVE ``` ## Configuration[​](#configuration "Direct link to Configuration") | Property | Value | | -------------- | ------------------------------ | | **Type** | `CHUNK` / `HIVE` | | **Default** | `CHUNK` | | **Applies to** | `--parallelmethod DBPartition` | | **Since** | FastBCP 1.3 | ## Modes[​](#modes "Direct link to Modes") ### CHUNK (default)[​](#chunk-default "Direct link to CHUNK (default)") Each partition is written as a numbered chunk next to the target file: ``` _chunk_NNN. ``` For example, with `--fileoutput "orders.parquet"`: ``` orders_chunk_001.parquet orders_chunk_002.parquet orders_chunk_003.parquet ``` ### HIVE[​](#hive "Direct link to HIVE") Each partition is written into a Hive-style directory named after the partition, and the subpartition when there is one: ``` partition=

/[subpartition=/]. ``` Some sources use their own directory naming: | Source | Directory layout | | ------------------------- | ------------------------------------------------ | | SQL Server | `bounds=_/.` | | Teradata | `L1=/[L2=/].` | | PostgreSQL, Oracle, MySQL | `partition=

/[subpartition=/].` | For example, an Oracle table partitioned by month, with `--fileoutput "orders.parquet"`: ``` partition=ORDERS_2024_01/orders.parquet partition=ORDERS_2024_02/orders.parquet partition=ORDERS_2024_03/orders.parquet ``` tip The `HIVE` layout can be read directly as a partitioned dataset by engines such as Spark, DuckDB, Trino or Athena. `--merge` works in both modes. ## Example[​](#example "Direct link to Example") * Windows * Linux ``` $env:FASTBCP_DBPARTITION_TARGET_MODE = "HIVE" .\FastBCP.exe ` --connectiontype oraodp ` --server "dbserver:1521/ORCLPDB" ` --user "FastUser" ` --password "FastPassword" ` --sourceschema "SALES" ` --sourcetable "ORDERS" ` --directory "D:\export\orders" ` --fileoutput "orders.parquet" ` --parallelmethod DBPartition ` --paralleldegree 8 ` --merge false ``` ``` export FASTBCP_DBPARTITION_TARGET_MODE=HIVE ./FastBCP \ --connectiontype oraodp \ --server "dbserver:1521/ORCLPDB" \ --user "FastUser" \ --password "FastPassword" \ --sourceschema "SALES" \ --sourcetable "ORDERS" \ --directory "/data/export/orders" \ --fileoutput "orders.parquet" \ --parallelmethod DBPartition \ --paralleldegree 8 \ --merge false ``` --- # FASTBCP\_INDEX\_DIR ## Overview[​](#overview "Direct link to Overview") The first export from a backup reads its structure, which can take minutes on a large compressed backup. FastBCP keeps the result in a small index file, so that the next exports from the same backup open in milliseconds (see [Backups opened again in milliseconds](/1.6/release-notes/release-notes-1.6.md#backups-opened-again-in-milliseconds)). The `FASTBCP_INDEX_DIR` environment variable names the directory of these files. Set it when the account running FastBCP has no usable home directory, as a service account may have, or to keep the indexes on another disk. ## Syntax[​](#syntax "Direct link to Syntax") * Windows * Linux ``` $env:FASTBCP_INDEX_DIR = "D:\FastBCP\index" ``` ``` export FASTBCP_INDEX_DIR=/var/cache/fastbcp/index ``` ## Configuration[​](#configuration "Direct link to Configuration") | Property | Value | | -------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | **Type** | Fully qualified directory path. It does not need to exist: FastBCP creates it | | **Default** | Not set: the local application data of the user, `%LOCALAPPDATA%\ArpeMSBackup\index` and `%LOCALAPPDATA%\ArpeOraBackup\index` on Windows, `$XDG_CACHE_HOME/arpemsbackup/index` and `arpeorabackup/index` or `~/.cache/...` on Linux | | **Applies to** | `--connectiontype backup_mssql` and `backup_rman` | | **Since** | FastBCP 1.6.6 | warning On Windows, the path must name its drive and start from its root. `C:index` and `\index` depend on the current directory, and stop the run at startup with a message naming the variable. Use `C:\index`, or a UNC path such as `\\server\share\index`. ## When the Index Cannot Be Saved[​](#when-the-index-cannot-be-saved "Direct link to When the Index Cannot Be Saved") Before reading a backup, FastBCP checks that the directory can be written. If it cannot, the export still runs and FastBCP logs a warning, because every run would otherwise read the structure of the backup again, without saying so: ``` Backup index not saved: cannot write to /var/cache/fastbcp/index (...). Every run will index this backup again (minutes on a large compressed backup). To keep its index, set the FASTBCP_INDEX_DIR environment variable to a writable directory. ``` There is no warning when no index is written: with `adbc.arpemsbackup.index=off` or `readonly` in `--sourceconnectstring` (`adbc.arpeorabackup.index` for `backup_rman`). ## With `--sourceconnectstring`[​](#with---sourceconnectstring "Direct link to with---sourceconnectstring") An `adbc.arpemsbackup.index_dir` or `adbc.arpeorabackup.index_dir` option in [`--sourceconnectstring`](/1.6/documentation/cli/connection_parameters.md#source-connection-string) wins over the variable. If that directory cannot be written, the warning tells you to change or remove the option, as the variable would change nothing. ## Encrypted Backups[​](#encrypted-backups "Direct link to Encrypted Backups") The index of an [encrypted backup](/1.6/documentation/cli/connection_parameters.md#encrypted-backups) holds neither a key nor a password, and does not open the backup: the private key of the certificate is needed at every export. --- # FASTBCP\_PERFORMANCE\_COLLECT ## Overview[​](#overview "Direct link to Overview") The `FASTBCP_PERFORMANCE_COLLECT` environment variable controls whether FastBCP collects performance information about the machine (CPU usage, memory usage, etc.) during the run. ## Syntax[​](#syntax "Direct link to Syntax") * Windows * Linux ``` $env:FASTBCP_PERFORMANCE_COLLECT = $True ``` ``` export FASTBCP_PERFORMANCE_COLLECT=True ``` ## Configuration[​](#configuration "Direct link to Configuration") | Property | Value | | ----------- | -------------------------- | | **Type** | Boolean (`True` / `False`) | | **Default** | `False` (disabled) | | **Since** | FastBCP 1.2 | ## Behavior[​](#behavior "Direct link to Behavior") FalseDefault * CollectionNo performance information is collected during the run. True * CollectionFastBCP collects performance information of the machine (CPU, memory usage, etc.) while the run is in progress. tip Use together with [`FASTBCP_SYSTEMINFO_COLLECT`](/1.6/documentation/environment-variables/fastbcp-systeminfo-collect.md) to also capture system information during the run. --- # FASTBCP\_RGSIZE ## Overview[​](#overview "Direct link to Overview") The `FASTBCP_RGSIZE` environment variable controls the row group size for Parquet file exports. Row groups are the primary unit for organizing data within a Parquet file and significantly impact query performance and compression efficiency. ## Syntax[​](#syntax "Direct link to Syntax") * Windows * Linux ``` $env:FASTBCP_RGSIZE = 500000 ``` ``` export FASTBCP_RGSIZE=500000 ``` ## Configuration[​](#configuration "Direct link to Configuration") | Property | Value | | -------------- | ------------------------------ | | **Type** | Integer (> 0) | | **Default** | `max(2^18/sqrt(degree),64000)` | | **Applies to** | Parquet file exports | | **Since** | FastBCP 0.30 | ## What is a Row Group?[​](#what-is-a-row-group "Direct link to What is a Row Group?") A **row group** is a horizontal partition of data in a Parquet file: * Parquet files are divided into one or more row groups * Each row group contains a subset of rows * Column data within a row group is compressed together * Query engines can skip entire row groups based on metadata ``` Parquet File Structure: ├── Row Group 1 (1M rows) │ ├── Column A (compressed) │ ├── Column B (compressed) │ └── Column C (compressed) ├── Row Group 2 (1M rows) │ ├── Column A (compressed) │ ├── Column B (compressed) │ └── Column C (compressed) └── Footer (metadata) ``` --- # FASTBCP\_SYSTEMINFO\_COLLECT ## Overview[​](#overview "Direct link to Overview") The `FASTBCP_SYSTEMINFO_COLLECT` environment variable controls whether FastBCP collects information about the machine it runs on (CPU, memory, OS, etc.) during the run. ## Syntax[​](#syntax "Direct link to Syntax") * Windows * Linux ``` $env:FASTBCP_SYSTEMINFO_COLLECT = $True ``` ``` export FASTBCP_SYSTEMINFO_COLLECT=True ``` ## Configuration[​](#configuration "Direct link to Configuration") | Property | Value | | ----------- | -------------------------- | | **Type** | Boolean (`True` / `False`) | | **Default** | `False` (disabled) | | **Since** | FastBCP 1.2 | ## Behavior[​](#behavior "Direct link to Behavior") FalseDefault * CollectionNo system information is collected during the run. True * CollectionFastBCP collects system information about the machine (CPU, memory, OS, etc.) while the run is in progress. tip Use together with [`FASTBCP_PERFORMANCE_COLLECT`](/1.6/documentation/environment-variables/fastbcp-performance-collect.md) to also capture performance metrics during the run. --- # FASTBCP\_TMPPATH ## Overview[​](#overview "Direct link to Overview") The `FASTBCP_TMPPATH` environment variable specifies the base directory where FastBCP creates temporary files during buffered cloud uploads. ## Syntax[​](#syntax "Direct link to Syntax") * Windows * Linux ``` $env:FASTBCP_TMPPATH = "D:\temp\fastbcp" ``` ``` export FASTBCP_TMPPATH=/tmp/fastbcp ``` ## Configuration[​](#configuration "Direct link to Configuration") | Property | Value | | -------------- | -------------------------------------------------------------------------------------------------------------------------- | | **Type** | Directory path (absolute or relative) | | **Default** | System temp directory (`%TEMP%` on Windows, `$TMPDIR` on Linux/macOS) | | **Applies to** | Cloud uploads when [`FASTBCP_CLOUD_ISBUFFERED=True`](/1.6/documentation/environment-variables/fastbcp-cloud-isbuffered.md) | | **Since** | FastBCP 1.0 | ## Behavior[​](#behavior "Direct link to Behavior") ### Default Behavior (Not Set)[​](#default-behavior-not-set "Direct link to Default Behavior (Not Set)") FastBCP uses the system's default temporary directory: * **Windows**: `%TEMP%` (typically `C:\Users\\AppData\Local\Temp`) * **Linux/macOS**: `$TMPDIR` (typically `/tmp`) ### Custom Path[​](#custom-path "Direct link to Custom Path") When set, FastBCP creates a unique subdirectory per process: ``` /fastbcp_/ ``` **Example:** ``` D:\temp\fastbcp\fastbcp_a1b2c3d4-e5f6-7890-abcd-ef1234567890\ ``` ### Automatic Cleanup[​](#automatic-cleanup "Direct link to Automatic Cleanup") * Subdirectories are created automatically * Temporary files are deleted after successful upload * In case of errors, files may remain and need manual cleanup --- # FASTBCP\_TTU\_PATH ## Overview[​](#overview "Direct link to Overview") The `FASTBCP_TTU_PATH` environment variable tells FastBCP where to find the customer's **Teradata Tools and Utilities (TTU)** for the [`adbc_teradata`](/1.6/documentation/cli/connection_parameters.md#adbc_teradata) connection type. The embedded ArpeTeradata driver needs TTU (CLIv2, `libcliv2.so`) only for the **legacy-port logon**: `sslmode=disable`, or the fallback of the default `sslmode=prefer` when the server has no TLS. The default TLS logon on the HTTPS port never uses TTU. Linux only The lookup only runs on Linux. On Windows, FastBCP passes nothing and the driver finds `wincli32.dll` itself (`ARPETERADATA_TTU_PATH`, its own directory, the registered TTU installation). ## Syntax[​](#syntax "Direct link to Syntax") ``` export FASTBCP_TTU_PATH=/opt/teradata/client/20.00 ``` ## Configuration[​](#configuration "Direct link to Configuration") | Property | Value | | -------------- | ----------------------------------------- | | **Type** | Directory path | | **Default** | Not set | | **Applies to** | `--connectiontype adbc_teradata` on Linux | | **Since** | FastBCP 1.4 | ## Search Order[​](#search-order "Direct link to Search Order") FastBCP looks for TTU in this order and uses the first match: 1. 1`FASTBCP_TTU_PATH`The environment variable. If the directory does not exist or holds no `libcliv2.so`, FastBCP logs a warning and goes on. 2. 2`ttu`A `ttu` directory next to the FastBCP binary. 3. 3`TeradataToolsAndUtilitiesBase`A `TeradataToolsAndUtilitiesBase` directory next to the FastBCP binary (the folder of Teradata's Linux download). 4. 4Nothing foundNo TTU path is passed, and the driver searches itself (`ARPETERADATA_TTU_PATH`, `/opt/teradata/client`, the system library path). The library directory found is passed to the driver as `adbc.arpeteradata.ttu_path` and logged: ``` TTU (adbc_teradata legacy-port logon): /opt/teradata/client/20.00/lib64 (from FASTBCP_TTU_PATH) ``` ## Accepted Layouts[​](#accepted-layouts "Direct link to Accepted Layouts") Give a **full TTU client directory**, not only `libcliv2.so`. Each location can hold: * the client directory itself, e.g. `/opt/teradata/client/20.00` (with its `lib64` directory); * the library directory itself, e.g. `/opt/teradata/client/20.00/lib64`; * a directory above the client directory laid out as `/`, `client//`, `teradata/client//` or `opt/teradata/client//` (the last one is what unpacking the TTU RPMs gives). When several versions are found, the newest wins. Keep the version folder name CLIv2 reaches its own files through `lib64/tdclientdir` (which holds `../..`) and appends its version, so the client directory must keep its version name (for example `20.00`). A copy of an installed TTU next to the binary must be `ttu/20.00`, not `ttu/` alone. ## Using Teradata's TTU Download Without Installing It[​](#using-teradatas-ttu-download-without-installing-it "Direct link to Using Teradata's TTU Download Without Installing It") Teradata's Linux download is a set of RPMs. To use it without installing it, run these commands next to the FastBCP binary. They unpack CLIv2 and its ICU libraries into `TeradataToolsAndUtilitiesBase/opt/teradata/client/20.00` and add the two things the TTU installer would add: `lib64/tdclientdir` and the ICU links. Adapt the file name to your TTU version. ``` tar xzf TeradataToolsAndUtilitiesBase__linux_x8664.20.00.39.00-1.tar.gz cd TeradataToolsAndUtilitiesBase for r in Linux/x8664/cliv2*.rpm Linux/x8664/tdicu*.rpm; do rpm2cpio "$r" | cpio -idm; done cd opt/teradata/client/20.00/lib64 printf '../..' > tdclientdir for f in libicu*td.so.*.*; do ln -sf "$f" "${f%.*}"; ln -sf "$f" "${f%.so.*}.so"; done ``` FastBCP finds this `TeradataToolsAndUtilitiesBase` folder by itself; `FASTBCP_TTU_PATH` is not needed. FastBCP warns at startup when the TTU folder it found lacks `tdclientdir` or the ICU links (`libicu*td.so.65` and `libicu*td.so`), or when the client directory is not named after its version. CLIv2 would otherwise fail at logon with `DBCHINI failed`. ## Example[​](#example "Direct link to Example") ``` export FASTBCP_TTU_PATH=/opt/teradata/client/20.00 ./FastBCP \ --connectiontype adbc_teradata \ --sourceconnectstring "Server=td-host;Port=1025;User Id=FastUser;Password=FastPassword;SSL Mode=disable" \ --sourceschema "TPCH" \ --sourcetable "ORDERS" \ --directory "/data/export/orders" \ --fileoutput "orders.parquet" \ --parallelmethod Ntile \ --distributekeycolumn "o_orderkey" \ --paralleldegree 8 ``` --- # FASTBCP\_UID\_STRING\_CASING ## Overview[​](#overview "Direct link to Overview") The `FASTBCP_UID_STRING_CASING` environment variable controls whether UID (UUID) values are converted to lowercase or uppercase strings in the output. The default is lowercase, which follows [RFC 4122](https://www.rfc-editor.org/rfc/rfc4122) standard formatting (e.g. `550e8400-e29b-41d4-a716-446655440000`). SQL Server backups With `--connectiontype backup_mssql`, the variable applies since FastBCP 1.6.5. Earlier versions always write lowercase from a backup. ## Syntax[​](#syntax "Direct link to Syntax") * Windows * Linux ``` $env:FASTBCP_UID_STRING_CASING = "upper" ``` ``` export FASTBCP_UID_STRING_CASING=upper ``` ## Configuration[​](#configuration "Direct link to Configuration") | Property | Value | | -------------- | -------------------------------------------------------- | | **Type** | `lower` / `upper` | | **Default** | `lower` | | **Applies to** | All output formats that serialize UID columns as strings | | **Since** | FastBCP 1.0 | ## Values[​](#values "Direct link to Values") | Value | Output example | | ----------------- | -------------------------------------- | | `lower` (default) | `550e8400-e29b-41d4-a716-446655440000` | | `upper` | `550E8400-E29B-41D4-A716-446655440000` | ## Examples[​](#examples "Direct link to Examples") ### Export with uppercase UIDs[​](#export-with-uppercase-uids "Direct link to Export with uppercase UIDs") * Windows * Linux ``` $env:FASTBCP_UID_STRING_CASING = "upper" fastbcp -S myserver.database.windows.net ` -d MyDatabase ` -T dbo.MyTable ` --fileoutput "output.csv" ``` ``` export FASTBCP_UID_STRING_CASING=upper fastbcp -S myserver.database.windows.net \ -d MyDatabase \ -T dbo.MyTable \ --fileoutput "output.csv" ``` ### Restore default lowercase (RFC 4122)[​](#restore-default-lowercase-rfc-4122 "Direct link to Restore default lowercase (RFC 4122)") * Windows * Linux ``` $env:FASTBCP_UID_STRING_CASING = "lower" ``` ``` export FASTBCP_UID_STRING_CASING=lower ``` --- # Environment Variables Overview FastBCP supports several environment variables to customize its behavior. This page provides a comprehensive overview of all available environment variables. ## Quick Reference Table[​](#quick-reference-table "Direct link to Quick Reference Table") | Variable | Type | Default | Category | Description | | ---------------------------------------------------------------------------------------------------------------------------------- | ------------------------ | ---------------------------- | ------------ | -------------------------------------------------------------------------------------------------------------------- | | [`FASTBCP_CLOUD_ISBUFFERED`](/1.6/documentation/environment-variables/fastbcp-cloud-isbuffered.md) | `True` / `False` | `False` | Cloud Upload | Enables buffered cloud uploads for better performance | | [`FASTBCP_TMPPATH`](/1.6/documentation/environment-variables/fastbcp-tmppath.md) | Directory path | System temp | Cloud Upload | Base directory for temporary files during buffered uploads | | [`FASTBCP_CLOUD_MAXUPLOADTHREAD_PER_STREAM`](/1.6/documentation/environment-variables/fastbcp-cloud-maxuploadthread-per-stream.md) | Integer (> 0) | `8` or `2` | Cloud Upload | Maximum parallel upload threads per cloud stream | | [`FASTBCP_RGSIZE`](/1.6/documentation/environment-variables/fastbcp-rgsize.md) | Integer (> 0) | max(2^18/sqrt(degree),64000) | Parquet | Row group size for Parquet files | | [`FASTBCP_UID_STRING_CASING`](/1.6/documentation/environment-variables/fastbcp-uid-string-casing.md) | `lower` / `upper` | `lower` | Output | Casing for UID-to-string conversion (RFC 4122) | | [`FASTBCP_DATEFORMAT`](/1.6/documentation/environment-variables/fastbcp-dateformat.md) | Format string | `yyyy-MM-dd HH:mm:sszzz` | Output | Custom date format string for date-to-string conversion | | [`FASTBCP_ADBC_BATCHCELLS`](/1.6/documentation/environment-variables/fastbcp-adbc-batchcells.md) | Integer (> 0) | `500000` | ADBC | Arrow record batch size (in cells) for ADBC connectors | | [`FASTBCP_SYSTEMINFO_COLLECT`](/1.6/documentation/environment-variables/fastbcp-systeminfo-collect.md) | `True` / `False` | `False` | Diagnostics | Collects system information about the machine during the run | | [`FASTBCP_PERFORMANCE_COLLECT`](/1.6/documentation/environment-variables/fastbcp-performance-collect.md) | `True` / `False` | `False` | Diagnostics | Collects performance information about the machine during the run | | [`FASTBCP_DBPARTITION_TARGET_MODE`](/1.6/documentation/environment-variables/fastbcp-dbpartition-target-mode.md) | `CHUNK` / `HIVE` | `CHUNK` | Parallel | Output file layout of the `DBPartition` parallel method | | [`FASTBCP_INDEX_DIR`](/1.6/documentation/environment-variables/fastbcp-index-dir.md) | Directory path | Driver default | Backups | Directory of the index of the backups (`backup_mssql`, `backup_rman`) | | [`FASTBCP_BACKUP_RESTORE_POINT`](/1.6/documentation/environment-variables/fastbcp-backup-restore-point.md) | `latest` / `full` | `latest` | Backups | Which version of a table `backup_mssql` and `backup_rman` read: the latest, or the last full backup | | [`FASTBCP_BACKUP_RESTORE_MODE`](/1.6/documentation/environment-variables/fastbcp-backup-restore-mode.md) | `strict` / `best_effort` | `strict` | Backups | What `backup_mssql` and `backup_rman` do with a backup that could be the newest and cannot be used: fail, or skip it | | [`FASTBCP_TTU_PATH`](/1.6/documentation/environment-variables/fastbcp-ttu-path.md) | Directory path | Not set | ADBC | Teradata Tools and Utilities (TTU) folder for the `adbc_teradata` legacy-port logon (Linux) | --- # Advanced Scenarios Advanced use cases, partition functions, and troubleshooting examples: SQL Server partition functions, date-based partitioning, complex queries, performance tuning and debug logging. ## SQL Server Partition Functions[​](#sql-server-partition-functions "Direct link to SQL Server Partition Functions") Use SQL Server partition functions for efficient parallel exports. ### Using Partition Function with DataDriven[​](#using-partition-function-with-datadriven "Direct link to Using Partition Function with DataDriven") Leverage existing partition functions to distribute work: ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "tpch10_collation_bin2" ` --trusted ` --sourceschema "dbo" ` --sourcetable "orders_part" ` --directory "D:\temp" ` --fileoutput "orders_partitioned.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "DataDriven" ` --distributekeycolumn "`$partition.PF_DATE(o_orderdate)" ` --paralleldegree 10 ` --merge "False" ``` Partition Function Syntax Use `` `$partition.FunctionName(ColumnName) `` to reference a partition function. The backtick escapes the dollar sign in PowerShell. ### Date-based Partitioning[​](#date-based-partitioning "Direct link to Date-based Partitioning") #### Partition by date ranges for time-series data using database partitions:[​](#partition-by-date-ranges-for-time-series-data-using-database-partitions "Direct link to Partition by date ranges for time-series data using database partitions:") ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "TimeSeriesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "SensorReadings" ` --directory "C:\temp" ` --fileoutput "sensor_readings.parquet" ` --parallelmethod "DataDriven" ` --distributekeycolumn "`$partition.PF_Monthly(reading_date)" ` --paralleldegree 12 ` --merge "False" ``` #### Partition by date ranges for time-series data using Timepartition FastBCP parallelmethod :[​](#partition-by-date-ranges-for-time-series-data-using-timepartition-fastbcp-parallelmethod-- "Direct link to Partition by date ranges for time-series data using Timepartition FastBCP parallelmethod :") ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "TimeSeriesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "SensorReadings" ` --directory "s3://mycorpexportbucket/raw/TimeSeriesDB/SensorReadings/" ` --fileoutput "sensor_readings.parquet" ` --cloudprofile "mycorps3profile" ` --parallelmethod "Timepartition" ` --distributekeycolumn "(reading_date,year,month,day)" ` --paralleldegree 12 ` --merge "False" ``` This technique produces one file per day inside a directory structure (local or cloud) as a Hive partitioning directory: `/year=2026/month=11/day=11/sensor_readings.parquet` After a full export, you can use a query to filter your data and overwrite the files that were already generated on the overlapping period. ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "TimeSeriesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "SensorReadings_Part" ` --query "SELECT * FROM dbo.SensorReadings_Part WHERE reading_date >= CAST(GETDATE() - 10 AS DATE)" ` --directory "s3://mycorpexportbucket/raw/TimeSeriesDB/SensorReadings/" ` --fileoutput "sensor_readings.parquet" ` --cloudprofile "mycorps3profile" ` --parallelmethod "Timepartition" ` --distributekeycolumn "(reading_date,year,month,day)" ` --paralleldegree 10 ` --merge "False" ``` ## Complex Queries[​](#complex-queries "Direct link to Complex Queries") ### Multi-table Joins[​](#multi-table-joins "Direct link to Multi-table Joins") Export data with a query with joins: ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --query "SELECT o.order_id, o.order_date, c.customer_name, od.product_id, od.quantity, od.unit_price FROM orders o INNER JOIN customers c ON o.customer_id = c.customer_id INNER JOIN order_details od ON o.order_id = od.order_id WHERE o.order_date >= '2024-01-01'" ` --directory "C:\temp" ` --fileoutput "sales_detail.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Ntile" ` --distributekeycolumn "o.order_id" ` --paralleldegree 8 ` --merge "False" ``` ### Aggregated Data[​](#aggregated-data "Direct link to Aggregated Data") Export pre-aggregated data: ``` .\FastBCP.exe ` --connectiontype "pgsql" ` --server "localhost" ` --port "5432" ` --database "analytics" ` --user "postgres" ` --password "postgres" ` --query "SELECT date_trunc('day', order_date) as order_day, customer_region, COUNT(*) as order_count, SUM(total_amount) as total_sales FROM orders GROUP BY date_trunc('day', order_date), customer_region" ` --directory "C:\temp" ` --fileoutput "daily_sales_by_region.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd" ` --encoding "UTF-8" ` --parallelmethod "None" ``` ## Performance Tuning[​](#performance-tuning "Direct link to Performance Tuning") ### Optimal Parallel Degree[​](#optimal-parallel-degree "Direct link to Optimal Parallel Degree") * Auto-detect * Manual Use negative values to auto-calculate based on CPU cores: ``` # Use all cores minus 2 .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "LargeDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "BigTable" ` --directory "C:\temp" ` --fileoutput "bigtable.parquet" ` --parallelmethod "RangeId" ` --distributekeycolumn "id" ` --paralleldegree -2 ` --merge "False" ``` Specify exact thread count: ``` # Use exactly 16 threads .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "LargeDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "BigTable" ` --directory "C:\temp" ` --fileoutput "bigtable.parquet" ` --parallelmethod "RangeId" ` --distributekeycolumn "id" ` --paralleldegree 16 ` --merge "False" ``` ### Parquet RowGroup Size[​](#parquet-rowgroup-size "Direct link to Parquet RowGroup Size") To reduce memory pressure and, in many cases, improve export performance, you can configure the Parquet row group size by setting the `FASTBCP_RGSIZE` environment variable. A smaller `FASTBCP_RGSIZE` value reduces memory usage during export. However, this comes with a trade-off: smaller row groups may reduce Parquet compression efficiency and can sometimes increase the final file size. Good to know Recommended values range from `1000` to `1_000_000`. In practice, values between 32,000 and 64,000 often provide a good balance between memory usage, performance, and compression efficiency. * Windows * Linux ``` $Env:FASTBCP_RGSIZE=32000 .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "LargeDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "BigTable" ` --directory "C:\temp" ` --fileoutput "bigtable.parquet" ` --parallelmethod "RangeId" ` --distributekeycolumn "id" ` --paralleldegree -2 ` --merge "False" ``` Specify exact thread count: ``` export FASTBCP_RGSIZE=32000 .\FastBCP / --connectiontype "mssql" / --server "mssqlhost.domain.lan,1433" / --database "LargeDB" / --user "FastUSer" / --password "FastPassword" / --sourceschema "dbo" / --sourcetable "BigTable" / --directory "/data/export/bigtable/" / --fileoutput "bigtable.parquet" / --parallelmethod "RangeId" / --distributekeycolumn "id" / --paralleldegree 16 / --merge "False" ``` ### Merge vs No-Merge[​](#merge-vs-no-merge "Direct link to Merge vs No-Merge") With Merge * Parameter`--merge "True"` * Resultsingle file `data_merged.parquet` * Notesslower and only OnPremise Without Merge * Parameter`--merge "False"` * Resultmultiple files `data_part_Chunk000.parquet`, `data_part_Chunk001.parquet`, etc. * Noteskeeps separate files for parallel processing - With Merge - Without Merge Combine parallel outputs into single file: ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "DataDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Data" ` --directory "C:\temp" ` --fileoutput "data_merged.parquet" ` --parallelmethod "RangeId" ` --distributekeycolumn "id" ` --paralleldegree 8 ` --merge "True" ``` Keep separate files for parallel processing: ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "DataDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Data" ` --directory "C:\temp" ` --fileoutput "data_part.parquet" ` --parallelmethod "RangeId" ` --distributekeycolumn "id" ` --paralleldegree 8 ` --merge "False" ``` ### Enable Debug Logging[​](#enable-debug-logging "Direct link to Enable Debug Logging") Get detailed execution information: ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "TestDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "TestTable" ` --directory "C:\temp" ` --fileoutput "debug_export.csv" ` --parallelmethod "Random" ` --distributekeycolumn "id" ` --paralleldegree 4 ` --merge "False" ` --loglevel "Debug" ` --runid "debug_test_run" ``` Debug Mode Use `--loglevel "Debug"` to see detailed execution steps, connection strings (without passwords), and query generation details. tip Build your command with the [Doc Wizard](/latest/wizard.md) Related * [Parallel Parameters](/1.6/documentation/cli/parallel_parameters.md)parallel methods, degree and distribute key column * [FASTBCP\_​RGSIZE](/1.6/documentation/environment-variables/fastbcp-rgsize.md)Parquet row group size * [Parquet Formatting](/1.6/documentation/cli/parquet_formatting.md)compression and row group size * [Logging](/1.6/documentation/logging/Overview.md)log targets (console, database, file) and OpenTelemetry --- # Cloud Storage Examples Examples for exporting data directly to cloud storage platforms: AWS S3, Azure Blob Storage and Azure Data Lake Gen2, plus hourly exports and best practices for cloud exports. ## AWS S3[​](#aws-s3 "Direct link to AWS S3") Export data directly to Amazon S3 buckets using date-based placeholders. ### S3 with Date Placeholders[​](#s3-with-date-placeholders "Direct link to S3 with Date Placeholders") Automatically organize files by date using placeholder tokens: ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "DailySales" ` --directory "s3://my-bucket/data/sales/full/" ` --fileoutput "sales.parquet" ` --parallelmethod "RangeId" ` --distributekeycolumn "sale_id" ` --paralleldegree 8 ` --runid "sales_to_s3_daily" ``` ### S3 with Nested Structure[​](#s3-with-nested-structure "Direct link to S3 with Nested Structure") Create hierarchical folder structures: ``` .\FastBCP.exe ` --connectiontype "pgsql" ` --server "localhost" ` --port "5432" ` --database "ecommerce" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "orders" ` --directory "s3://analytics-bucket/exports/orders/" ` --fileoutput "orders.parquet" ` --parallelmethod "DataDriven" ` --distributekeycolumn "o_orderdate" ` --paralleldegree 10 ` --merge "False" ``` ### S3 with CSV Format[​](#s3-with-csv-format "Direct link to S3 with CSV Format") Export CSV files to S3 with manual date partitioning: ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "LogsDB" ` --trusted ` --query "SELECT * FROM ApplicationLogs WHERE log_date = '2024-05-01'" ` --directory "s3://logs-bucket/app-logs/appdate=2024-05-01/" ` --fileoutput "app_logs.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ``` ## Azure Blob Storage[​](#azure-blob-storage "Direct link to Azure Blob Storage") Export data to Azure Blob Storage containers. ### Azure with Date Partitioning[​](#azure-with-date-partitioning "Direct link to Azure with Date Partitioning") ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "AnalyticsDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Events" ` --directory "abs://mystorageaccount.blob.core.windows.net/datacontainer/events/full/" ` --fileoutput "events.parquet" ` --parallelmethod "Timepartition" ` --distributekeycolumn "event_timestamp(year,month)" ` --paralleldegree 10 ``` ### Azure Data Lake Gen2[​](#azure-data-lake-gen2 "Direct link to Azure Data Lake Gen2") Export to Azure Data Lake Storage Gen2: ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "AnalyticsDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Events" ` --directory "abfss://mystorageaccount.dfs.core.windows.net/datacontainer/events/full/" ` --fileoutput "events.parquet" ` --parallelmethod "Timepartition" ` --distributekeycolumn "event_timestamp(year,month)" ` --paralleldegree 10 ``` ## Hourly Exports[​](#hourly-exports "Direct link to Hourly Exports") Create exports with hourly granularity. ### Hourly Data Partition by Sensor with an incremental time range driven from outside[​](#hourly-data-partition-by-sensor-with-an-incremental-time-range-driven-from-outside "Direct link to Hourly Data Partition by Sensor with an incremental time range driven from outside") ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "StreamingDB" ` --trusted ` --query "SELECT * FROM SensorData WHERE reading_time >= '2024-02-03 14:00:00' and reading_time < '2024-02-03 15:00:00'" ` --directory "s3://iot-bucket/sensor-data/" ` --fileoutput "sensors_20240203140000_20240203150000.parquet" ` --parallelmethod "DataDriven" ` --distributekeycolumn "sensor_id" ` --datadrivenquery "SELECT sensor_id From SensorList" ` --paralleldegree 8 ` --runid "hourly_sensor_export_20240203140000_20240203150000" ``` ## Best for Cloud Exports[​](#best-for-cloud-exports "Direct link to Best for Cloud Exports") ### Performance Tips[​](#performance-tips "Direct link to Performance Tips") * Use Parquet for cloud storagebetter compression and query performance, reduced network traffic. * Enable parallel execution when neededif you need to split data on a business criterion, or if you have a lot of data to extract. * Dynamic parallel degreeuse a negative value for `--paralleldegree` to automatically set threads to (CPU cores / abs(degree)), leaving resources for other processes. For example, `--paralleldegree -2` uses half of the cores of the machine from where FastBCP is launched. * DataDriven queryuse `--datadrivenquery` to speed up the retrieval of the list of elements to extract, or as a technique for incremental extraction, by putting a WHERE clause in `--datadrivenquery` instead of the main `--query`. warning Keep the degree safe for your source, to avoid a total saturation. ### Example with All Best Practices[​](#example-with-all-best-practices "Direct link to Example with All Best Practices") ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "DataWarehouse" ` --trusted ` --sourceschema "dbo" ` --sourcetable "FactSales" ` --directory "s3://analytics-bucket/warehouse/sales/{sourcetable}" ` --fileoutput "FactSales.parquet" ` --parallelmethod "DataDriven" ` --datadrivenquery "SELECT ref_date from calendar where ref_date > cast(getdate()-30 as date)" ` --distributekeycolumn "sale_date" ` --paralleldegree -2 ` --runid "daily_sales_to_s3" ` --loglevel "Information" ``` tip Build your command with the [Doc Wizard](/latest/wizard.md) Related * [Cloud Connectivity](/1.6/documentation/cloud-connectivity/overview.md)supported platforms and authentication setup * [![](/img/logos/aws-s3.png)AWS S3](/1.6/documentation/cloud-connectivity/aws-s3.md)authentication, S3 URI format and required permissions * [![](/img/logos/azure-blob.svg)Azure](/1.6/documentation/cloud-connectivity/azure.md)Azure Blob Storage and Azure Data Lake Gen2 * [![](/img/logos/gcs.png)Google Cloud Storage](/1.6/documentation/cloud-connectivity/google-cloud.md)authentication, GCS URI format and required permissions * [![](/img/logos/onelake.png)OneLake](/1.6/documentation/cloud-connectivity/onelake.md)authentication setup and export * [Cloud Options](/1.6/documentation/cli/cloud_options.md)AWS, Azure and Google Cloud authentication and storage --- # DB2 Examples Comprehensive examples for exporting data from IBM DB2 using the generic `odbc` connection type. DB2 ODBC Driver DB2 is not a native connection type, so FastBCP connects to it through ODBC. Install the IBM DB2 ODBC driver, then provide either a DSN (`--dsn`) or a full connection string (`--sourceconnectstring`) as shown below. ## Connection String[​](#connection-string "Direct link to Connection String") **Single-threaded export:** ``` .\FastBCP.exe ` --connectiontype "odbc" ` --sourceconnectstring "Driver={IBM DB2 ODBC DRIVER};Database=SAMPLE;Hostname=db2server.company.corp;Port=25010;Protocol=TCPIP;Uid=db2user;Pwd=password;CurrentSchema=DB2ADMIN" ` --query "SELECT * FROM DB2ADMIN.ORDERS" ` --directory "C:\temp" ` --fileoutput "db2_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` **Parallel export with Ntile method:** ``` .\FastBCP.exe ` --connectiontype "odbc" ` --sourceconnectstring "Driver={IBM DB2 ODBC DRIVER};Database=SAMPLE;Hostname=db2server.company.corp;Port=25010;Protocol=TCPIP;Uid=db2user;Pwd=password;CurrentSchema=DB2ADMIN" ` --query "SELECT * FROM DB2ADMIN.ORDERS" ` --directory "C:\temp" ` --fileoutput "db2_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Ntile" ` --distributekeycolumn "ORDER_ID" ` --paralleldegree -2 ` --merge "False" ``` **Parallel export with Random method:** ``` .\FastBCP.exe ` --connectiontype "odbc" ` --sourceconnectstring "Driver={IBM DB2 ODBC DRIVER};Database=SAMPLE;Hostname=db2server.company.corp;Port=25010;Protocol=TCPIP;Uid=db2user;Pwd=password;CurrentSchema=DB2ADMIN" ` --query "SELECT * FROM DB2ADMIN.ORDERS" ` --directory "C:\temp" ` --fileoutput "db2_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "ORDER_ID" ` --paralleldegree 8 ` --merge "False" ``` ## DSN Connection[​](#dsn-connection "Direct link to DSN Connection") If a DSN is already configured on the machine, you can use `--dsn` instead of `--sourceconnectstring`. ``` .\FastBCP.exe ` --connectiontype "odbc" ` --dsn "DB2_DSN" ` --query "SELECT * FROM DB2ADMIN.ORDERS" ` --directory "C:\temp" ` --fileoutput "db2_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` Good to know **Quoting special identifiers**: if your DB2 schema or table name contains special characters (e.g. `HCR_BI."APER@XPSAHISTO"`), keep the double quotes around the identifier inside your `--query` value so DB2 treats it as a delimited identifier. tip Build your command with the [Doc Wizard](/latest/wizard.md) Related * [Connection Parameters](/1.6/documentation/cli/connection_parameters.md)DSN, source connection string and authentication * [Parallel Parameters](/1.6/documentation/cli/parallel_parameters.md)parallel methods, degree and distribute key column --- # MySQL Examples Examples for exporting data from MySQL databases with the `mysql` connection type: single-threaded, parallel (Random and DataDriven) and Parquet output. ## Single-threaded Export[​](#single-threaded-export "Direct link to Single-threaded Export") Simple export without parallelization. ``` .\FastBCP.exe ` --connectiontype "mysql" ` --server "localhost" ` --port "3306" ` --database "test" ` --user "root" ` --password "password" ` --query "SELECT * FROM test_table LIMIT 1000" ` --directory "C:\temp" ` --fileoutput "mysql_test.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` ## Parallel Export - Random Method[​](#parallel-export---random-method "Direct link to Parallel Export - Random Method") Export using Random distribution. ``` .\FastBCP.exe ` --connectiontype "mysql" ` --server "localhost" ` --port "3306" ` --database "test" ` --user "root" ` --password "password" ` --sourceschema "test" ` --sourcetable "orders" ` --directory "C:\temp" ` --fileoutput "mysql_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "order_id" ` --paralleldegree 8 ` --merge "False" ` --runid "mysql_to_csv_parallel8_random" ``` ## Parallel Export - DataDriven Method[​](#parallel-export---datadriven-method "Direct link to Parallel Export - DataDriven Method") Export using DataDriven distribution based on distinct column values. ``` .\FastBCP.exe ` --connectiontype "mysql" ` --server "localhost" ` --port "3306" ` --database "test" ` --user "root" ` --password "password" ` --sourceschema "test" ` --sourcetable "orders" ` --directory "C:\temp" ` --fileoutput "mysql_orders_dd.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "DataDriven" ` --distributekeycolumn "status" ` --paralleldegree 10 ` --merge "False" ` --runid "mysql_to_csv_parallel10_datadriven" ``` ## Export to Parquet[​](#export-to-parquet "Direct link to Export to Parquet") Export MySQL data to Parquet format. ``` .\FastBCP.exe ` --connectiontype "mysql" ` --server "localhost" ` --port "3306" ` --database "test" ` --user "root" ` --password "password" ` --sourceschema "test" ` --sourcetable "orders" ` --directory "C:\temp" ` --fileoutput "mysql_orders.parquet" ` --parallelmethod "Random" ` --distributekeycolumn "order_id" ` --paralleldegree 6 ` --merge "False" ``` tip Build your command with the [Doc Wizard](/latest/wizard.md) Related * [Connection Parameters](/1.6/documentation/cli/connection_parameters.md)connection types, authentication and connection strings * [Parallel Parameters](/1.6/documentation/cli/parallel_parameters.md)parallel methods, degree and distribute key column * [![](/img/logos/mysql.svg)MySQL datatype mappings](/1.6/datatypes-conversion/mysql/parquet.md)how MySQL types map to Parquet --- # Oracle Examples Comprehensive examples for exporting data from Oracle databases, from a single-threaded export to each parallel method, Parquet output, ADBC and RMAN backup sets. ## Connection Types[​](#connection-types "Direct link to Connection Types") Oracle exports support multiple connection types: oraodpRecommended * Connects withNative Oracle Data Provider oledb * Connects withOracle OLEDB Provider (OraOLEDB) odbc * Connects withODBC DSN adbc\_oracleUltra-fast * Connects withADBC FastDriver * OutputParquet only (see [ADBC Examples](#adbc-examples)) backup\_rman * Readstables straight from **RMAN backup sets**, full and incremental, without Oracle and without a restore * OutputParquet only (see [Oracle RMAN Backup Sets](#oracle-rman-backup-sets-backup_rman)) Good to know The `adbc_oracle` connection type uses the Arpe.io ADBC FastDriver for ultra-fast, Arrow-native Parquet exports, and also supports the `Physical` parallel method (resolved to Rowid). Output is Parquet-only — see the [ADBC Examples](#adbc-examples) section below. ## Single-threaded Export[​](#single-threaded-export "Direct link to Single-threaded Export") Simple export without parallelization. * Oracle Data Provider * OLEDB Provider ``` .\FastBCP.exe ` --connectiontype "oraodp" ` --server "localhost:1521/ORCLPDB1" ` --user "system" ` --password "password" ` --query "SELECT * FROM customers WHERE ROWNUM <= 1000" ` --directory "C:\temp" ` --fileoutput "oracle_customers.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` ``` .\FastBCP.exe ` --connectiontype "oledb" ` --provider "OraOLEDB.Oracle" ` --server "localhost:1521/ORCLPDB1" ` --user "system" ` --password "password" ` --query "SELECT * FROM customers WHERE ROWNUM <= 1000" ` --directory "C:\temp" ` --fileoutput "oracle_customers.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` ## Parallel Export - Physical Method[​](#parallel-export---physical-method "Direct link to Parallel Export - Physical Method") Parallel export using the physical row identifier (ROWID). Good to know **Physical on Oracle**: with an Oracle connection type (`oraodp`, `adbc_oracle`), the `Physical` method resolves to the Oracle ROWID strategy (formerly `--parallelmethod Rowid`, now deprecated). It is very efficient for full table exports and does not require a distribute key column. `--sourceschema` and `--sourcetable` are required. **Full table export:** ``` .\FastBCP.exe ` --connectiontype "oraodp" ` --server "localhost:1521/ORCLPDB1" ` --user "system" ` --password "password" ` --sourceschema "SYSTEM" ` --sourcetable "ORDERS" ` --directory "C:\temp" ` --fileoutput "oracle_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Physical" ` --paralleldegree 8 ` --merge "False" ` --runid "oraodp_to_csv_parallel8_physical" ``` **With query filter:** ``` .\FastBCP.exe ` --connectiontype "oraodp" ` --server "localhost:1521/ORCLPDB1" ` --user "system" ` --password "password" ` --sourceschema "SYSTEM" ` --sourcetable "ORDERS" ` --query "SELECT * FROM SYSTEM.ORDERS WHERE order_date >= TO_DATE('2024-01-01', 'YYYY-MM-DD')" ` --directory "C:\temp" ` --fileoutput "oracle_orders_2024.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Physical" ` --paralleldegree 8 ` --merge "False" ` --runid "oraodp_to_csv_parallel8_physical_filtered" ``` ## Parallel Export - Random Method[​](#parallel-export---random-method "Direct link to Parallel Export - Random Method") Export using Random distribution with modulo operation. ``` .\FastBCP.exe ` --connectiontype "oraodp" ` --server "localhost:1521/ORCLPDB1" ` --user "system" ` --password "password" ` --sourceschema "SYSTEM" ` --sourcetable "ORDERS" ` --directory "C:\temp" ` --fileoutput "oracle_orders_random.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "order_id" ` --paralleldegree 8 ` --merge "False" ` --runid "oraodp_to_csv_parallel8_random" ``` ## Parallel Export - DataDriven Method[​](#parallel-export---datadriven-method "Direct link to Parallel Export - DataDriven Method") Export using DataDriven distribution based on distinct column values. ``` .\FastBCP.exe ` --connectiontype "oraodp" ` --server "localhost:1521/ORCLPDB1" ` --user "system" ` --password "password" ` --sourceschema "SYSTEM" ` --sourcetable "ORDERS" ` --directory "C:\temp" ` --fileoutput "oracle_orders_dd.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "DataDriven" ` --distributekeycolumn "order_status" ` --paralleldegree 10 ` --merge "False" ` --runid "oraodp_to_csv_parallel10_datadriven" ``` ## Export to Parquet[​](#export-to-parquet "Direct link to Export to Parquet") Export Oracle data to Parquet format. **Single-threaded:** ``` .\FastBCP.exe ` --connectiontype "oraodp" ` --server "localhost:1521/ORCLPDB1" ` --user "system" ` --password "password" ` --sourceschema "SYSTEM" ` --sourcetable "ORDERS" ` --directory "C:\temp" ` --fileoutput "oracle_orders.parquet" ` --parallelmethod "None" ``` **Parallel with Physical (Rowid):** ``` .\FastBCP.exe ` --connectiontype "oraodp" ` --server "localhost:1521/ORCLPDB1" ` --user "system" ` --password "password" ` --sourceschema "SYSTEM" ` --sourcetable "ORDERS" ` --directory "C:\temp" ` --fileoutput "oracle_orders.parquet" ` --parallelmethod "Physical" ` --paralleldegree 10 ` --merge "False" ``` ## OLEDB Connection Examples[​](#oledb-connection-examples "Direct link to OLEDB Connection Examples") Using Oracle OLEDB Provider for connections. **Single-threaded:** ``` .\FastBCP.exe ` --connectiontype "oledb" ` --provider "OraOLEDB.Oracle" ` --server "localhost:1521/ORCLPDB1" ` --user "system" ` --password "password" ` --query "SELECT * FROM SYSTEM.ORDERS WHERE ROWNUM <= 10000" ` --directory "C:\temp" ` --fileoutput "oracle_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` **Parallel Random:** ``` .\FastBCP.exe ` --connectiontype "oledb" ` --provider "OraOLEDB.Oracle" ` --server "localhost:1521/ORCLPDB1" ` --user "system" ` --password "password" ` --query "SELECT * FROM SYSTEM.ORDERS" ` --directory "C:\temp" ` --fileoutput "oracle_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "order_id" ` --paralleldegree 6 ` --merge "False" ``` **Parallel DataDriven:** ``` .\FastBCP.exe ` --connectiontype "oledb" ` --provider "OraOLEDB.Oracle" ` --server "localhost:1521/ORCLPDB1" ` --user "system" ` --password "password" ` --query "SELECT * FROM SYSTEM.ORDERS" ` --directory "C:\temp" ` --fileoutput "oracle_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "DataDriven" ` --distributekeycolumn "order_status" ` --paralleldegree 6 ` --merge "False" ``` ## ADBC Examples[​](#adbc-examples "Direct link to ADBC Examples") The `adbc_oracle` connection type uses the Arpe.io ADBC FastDriver for ultra-fast, Arrow-native exports. **Output is Parquet-only**, and the `Physical` parallel method (resolved to Rowid) is also supported — see [Connection Parameters](/1.6/documentation/cli/connection_parameters.md#connection-type) and [Parallel Parameters](/1.6/documentation/cli/parallel_parameters.md#parallel-method) for details. ``` ./FastBCP \ --connectiontype "adbc_oracle" \ --server "localhost:1521/orclpdb1" \ --user "MIG_EXPRESS" \ --password "FastPassword" \ --sourceschema "TPCH10" \ --sourcetable "LINEITEM" \ --directory "./" \ --fileoutput "{sourcetable}.parquet" \ --method "None" ``` ## Oracle RMAN Backup Sets (backup\_rman)[​](#oracle-rman-backup-sets-backup_rman "Direct link to Oracle RMAN Backup Sets (backup_rman)") The `backup_rman` connection type reads a table straight from **RMAN backup sets**, full and incremental, without restoring them and without an Oracle instance: on a backup server, from an archive, or for a database that is gone. `--server` is the directory of the backup pieces and `--database` their names or patterns. **Output is Parquet-only** — see [Oracle RMAN backup sets](/1.6/documentation/cli/connection_parameters.md#oracle-rman-backup-sets-backup_rman) for what is supported. **A full backup, parallel export (Physical resolves to Pages):** * Windows * Linux ``` .\FastBCP.exe ` --connectiontype "backup_rman" ` --server "D:\Backups\RMAN\ORCL" ` --database "full_*" ` --sourceschema "TPCH10" ` --sourcetable "LINEITEM" ` --directory "D:\export\{sourcetable}" ` --fileoutput "{sourcetable}.parquet" ` --parallelmethod "Physical" ` --paralleldegree 8 ``` ``` ./FastBCP \ --connectiontype "backup_rman" \ --server "/backup/rman/orcl" \ --database "full_*" \ --sourceschema "TPCH10" \ --sourcetable "LINEITEM" \ --directory "/export/{sourcetable}" \ --fileoutput "{sourcetable}.parquet" \ --parallelmethod "Physical" \ --paralleldegree 8 ``` **Pieces of several backup sets** (several channels, `FILESPERSET`, `MAXPIECESIZE`, or a separate control file backup): every piece, by patterns separated by `;`, in any order. A compressed backup (`AS COMPRESSED BACKUPSET`, BASIC, LOW, MEDIUM or HIGH) is read the same way: ``` ./FastBCP \ --connectiontype "backup_rman" \ --server "/backup/rman/orcl" \ --database "db_*;ctl_*" \ --sourceschema "SALES" \ --sourcetable "ORDERS" \ --directory "/export/{sourcetable}" \ --fileoutput "{sourcetable}.parquet" \ --parallelmethod "Physical" \ --paralleldegree 8 ``` **A table of another PDB, a few columns** (`CONTAINER.OWNER.TABLE` in `--query`; the columns of types that cannot be read, such as a LOB, are simply left out): ``` ./FastBCP \ --connectiontype "backup_rman" \ --server "/backup/rman/cdb1" \ --database "full_*" \ --query "SELECT EMPLOYEE_ID, LAST_NAME, HIRE_DATE FROM HRPDB.HR.EMPLOYEES" \ --directory "/export/employees" \ --fileoutput "employees.parquet" \ --parallelmethod "None" ``` **A level 0 and its incremental backups** (since FastBCP 1.6.8): name the whole chain, in any order. The latest version of the table is read, the whole table. Here the level 0 is in `l0` and the level 1 backups in a directory per day below `l1`: * Windows * Linux ``` .\FastBCP.exe ` --connectiontype "backup_rman" ` --server "D:\Backups\RMAN\ORCL" ` --database "l0\*;l1\**" ` --sourceschema "SALES" ` --sourcetable "ORDERS" ` --directory "D:\export\{sourcetable}" ` --fileoutput "{sourcetable}.parquet" ` --parallelmethod "Physical" ` --paralleldegree 8 ``` ``` ./FastBCP \ --connectiontype "backup_rman" \ --server "/backup/rman/orcl" \ --database "l0/*;l1/**" \ --sourceschema "SALES" \ --sourcetable "ORDERS" \ --directory "/export/{sourcetable}" \ --fileoutput "{sourcetable}.parquet" \ --parallelmethod "Physical" \ --paralleldegree 8 ``` **Every backup below the directory**, whatever its level (`**`): older backups can match too, only the latest version is read: ``` ./FastBCP \ --connectiontype "backup_rman" \ --server "/backup/rman/orcl" \ --database "**" \ --sourceschema "SALES" \ --sourcetable "ORDERS" \ --directory "/export/{sourcetable}" \ --fileoutput "{sourcetable}.parquet" \ --parallelmethod "Physical" \ --paralleldegree 8 ``` **The level 0 only**, the incremental backups ignored, with [`FASTBCP_BACKUP_RESTORE_POINT`](/1.6/documentation/environment-variables/fastbcp-backup-restore-point.md): ``` export FASTBCP_BACKUP_RESTORE_POINT=full ./FastBCP \ --connectiontype "backup_rman" \ --server "/backup/rman/orcl" \ --database "l0/*;l1/**" \ --sourceschema "SALES" \ --sourcetable "ORDERS" \ --directory "/export/{sourcetable}" \ --fileoutput "{sourcetable}.parquet" \ --parallelmethod "None" ``` See [Incremental backups](/1.6/documentation/cli/connection_parameters.md#incremental-rman-backups) for what is read, [Naming the backup pieces](/1.6/documentation/cli/connection_parameters.md#naming-the-backup-pieces) for the patterns, and [Backups that cannot be used](/1.6/documentation/cli/connection_parameters.md#rman-backups-that-cannot-be-used) for when an export fails. Good to know An incremental backup without its level 0, a backup set without one of its pieces and an encrypted backup set (`SET ENCRYPTION`) fail the export, naming the backup. Image copies are not read. tip Build your command with the [Doc Wizard](/latest/wizard.md) Related * [Connection Parameters](/1.6/documentation/cli/connection_parameters.md)connection types, authentication and Oracle RMAN backup sets * [Parallel Parameters](/1.6/documentation/cli/parallel_parameters.md)parallel methods, degree and distribute key column * [![](/img/logos/oracle.svg)Oracle datatype mappings](/1.6/datatypes-conversion/oracle/parquet.md)how Oracle types map to Parquet * [Datatypes Conversion](/1.6/datatypes-conversion/overview.md)mappings for every source and connection type --- # Other Databases Examples for exporting data from Clickhouse, SAP HANA, Netezza and Teradata databases. ## Clickhouse[​](#clickhouse "Direct link to Clickhouse") Export data from Clickhouse database. **Single-threaded export:** ``` .\FastBCP.exe ` --connectiontype "clickhouse" ` --server "localhost" ` --port "9000" ` --database "default" ` --user "default" ` --password "password" ` --query "SELECT * FROM orders LIMIT 1000" ` --directory "C:\temp" ` --fileoutput "clickhouse_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` **Parallel export with Random method:** ``` .\FastBCP.exe ` --connectiontype "clickhouse" ` --server "localhost" ` --port "9000" ` --database "default" ` --user "default" ` --password "password" ` --sourceschema "default" ` --sourcetable "orders" ` --directory "C:\temp" ` --fileoutput "clickhouse_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "order_id" ` --paralleldegree 8 ` --merge "False" ``` ## SAP HANA[​](#sap-hana "Direct link to SAP HANA") Export data from SAP HANA database using two connection types. hana * ConnectionStandard HANA connection * Best forgeneral exports hanaexportLarge datasets * ConnectionOptimized HANA connection using SAP HANA's native EXPORT statement for optimized bulk data transfer * Best forfaster bulk exports; recommended for large datasets ### HANA Connection Type[​](#hana-connection-type "Direct link to HANA Connection Type") Standard HANA connection for general exports. **Single-threaded export:** ``` .\FastBCP.exe ` --connectiontype "hana" ` --server "hanaserver:30015" ` --user "SYSTEM" ` --password "password" ` --query "SELECT * FROM ORDERS WHERE ORDER_DATE >= '2024-01-01'" ` --directory "C:\temp" ` --fileoutput "hana_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` **Parallel export with Random method:** ``` .\FastBCP.exe ` --connectiontype "hana" ` --server "hanaserver:30015" ` --user "SYSTEM" ` --password "password" ` --sourceschema "SYSTEM" ` --sourcetable "ORDERS" ` --directory "C:\temp" ` --fileoutput "hana_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "ORDER_ID" ` --paralleldegree 8 ` --merge "False" ``` ### HANA Export Connection Type[​](#hana-export-connection-type "Direct link to HANA Export Connection Type") Optimized HANA connection using native EXPORT functionality for faster bulk exports. **Single-threaded export:** ``` .\FastBCP.exe ` --connectiontype "hanaexport" ` --server "hanaserver:30015" ` --user "SYSTEM" ` --password "password" ` --query "SELECT * FROM ORDERS WHERE ORDER_DATE >= '2024-01-01'" ` --directory "C:\temp" ` --fileoutput "hana_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` **Parallel export with Random method:** ``` .\FastBCP.exe ` --connectiontype "hanaexport" ` --server "hanaserver:30015" ` --user "SYSTEM" ` --password "password" ` --sourceschema "SYSTEM" ` --sourcetable "ORDERS" ` --directory "C:\temp" ` --fileoutput "hana_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "ORDER_ID" ` --paralleldegree 8 ` --merge "False" ``` ## Netezza[​](#netezza "Direct link to Netezza") Export data from Netezza database using OLEDB provider. **Single-threaded export:** ``` .\FastBCP.exe ` --connectiontype "oledb" ` --provider "NZOLEDB" ` --server "netezza_server" ` --database "SYSTEM" ` --user "admin" ` --password "password" ` --query "SELECT * FROM orders" ` --directory "C:\temp" ` --fileoutput "netezza_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` **Parallel export with Random method:** ``` .\FastBCP.exe ` --connectiontype "oledb" ` --provider "NZOLEDB" ` --server "netezza_server" ` --database "SYSTEM" ` --user "admin" ` --password "password" ` --query "SELECT * FROM orders" ` --directory "C:\temp" ` --fileoutput "netezza_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "order_id" ` --paralleldegree 6 ` --merge "False" ``` **Parallel export with DataDriven method:** ``` .\FastBCP.exe ` --connectiontype "oledb" ` --provider "NZOLEDB" ` --server "netezza_server" ` --database "SYSTEM" ` --user "admin" ` --password "password" ` --query "SELECT * FROM orders" ` --directory "C:\temp" ` --fileoutput "netezza_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "DataDriven" ` --distributekeycolumn "region" ` --paralleldegree 6 ` --merge "False" ``` **Parallel export with Physical method (native Netezza connection):** With a native Netezza connection type (`nzsql`, `nzcopy`, `nzoledb`, `adbc_netezza`), `--parallelmethod Physical` resolves to the Netezza data slices (formerly `NZDataSlice`, now deprecated). Good to know `--parallelmethod Physical` does not work through the generic `oledb` connection type, because FastBCP cannot know which engine is behind the provider. ``` .\FastBCP.exe ` --connectiontype "nzsql" ` --server "netezza_server" ` --database "SYSTEM" ` --user "admin" ` --password "password" ` --sourceschema "ADMIN" ` --sourcetable "ORDERS" ` --directory "C:\temp" ` --fileoutput "netezza_orders.parquet" ` --parallelmethod "Physical" ` --paralleldegree 8 ` --merge "False" ``` ## Teradata[​](#teradata "Direct link to Teradata") Export data from Teradata with the embedded .NET provider (`teradata`) or the embedded ArpeTeradata ADBC driver (`adbc_teradata`, Parquet output only). teradata * Driverembedded .NET provider adbc\_teradata * Driverembedded ArpeTeradata ADBC driver * OutputParquet only Good to know `--parallelmethod Physical` is not available for Teradata. Use `Ntile`, `RangeId`, `Random`, `DataDriven`, `Timepartition` or `DBPartition`. **Single-threaded export (`teradata`):** ``` .\FastBCP.exe ` --connectiontype "teradata" ` --server "td-host:443" ` --database "TPCH" ` --user "FastUser" ` --password "FastPassword" ` --query "SELECT * FROM TPCH.ORDERS" ` --directory "C:\temp\teradata" ` --fileoutput "teradata_orders.parquet" ` --parallelmethod "None" ``` **Parallel export with RangeId (`teradata`):** ``` .\FastBCP.exe ` --connectiontype "teradata" ` --server "td-host:1025" ` --database "TPCH" ` --user "FastUser" ` --password "FastPassword" ` --query "SELECT * FROM TPCH.ORDERS" ` --directory "C:\temp\teradata" ` --fileoutput "teradata_orders.parquet" ` --parallelmethod "RangeId" ` --distributekeycolumn "o_orderkey" ` --paralleldegree 16 ``` **Parallel export with Ntile (`adbc_teradata`):** ``` .\FastBCP.exe ` --connectiontype "adbc_teradata" ` --server "td-host" ` --database "TPCH" ` --user "FastUser" ` --password "FastPassword" ` --sourceschema "TPCH" ` --sourcetable "ORDERS" ` --directory "C:\temp\teradata" ` --fileoutput "teradata_orders.parquet" ` --parallelmethod "Ntile" ` --distributekeycolumn "o_orderkey" ` --paralleldegree 8 ``` The default `adbc_teradata` logon uses TLS and needs no Teradata client software. For the legacy-port logon (no TLS on the server, or `SSL Mode=disable`), see [FASTBCP\_TTU\_PATH](/1.6/documentation/environment-variables/fastbcp-ttu-path.md) and [Connection Parameters](/1.6/documentation/cli/connection_parameters.md#adbc_teradata). tip Build your command with the [Doc Wizard](/latest/wizard.md) Related * [Connection Parameters](/1.6/documentation/cli/connection_parameters.md)connection types, providers and ADBC connection strings * [Parallel Parameters](/1.6/documentation/cli/parallel_parameters.md)parallel methods, degree and distribute key column * [FASTBCP\_​TTU\_​PATH](/1.6/documentation/environment-variables/fastbcp-ttu-path.md)legacy-port logon for `adbc_teradata` * [![](/img/logos/sap.svg)SAP HANA datatype mappings](/1.6/datatypes-conversion/saphana/parquet.md)how SAP HANA types map to Parquet * [![](/img/logos/teradata.svg)Teradata datatype mappings](/1.6/datatypes-conversion/teradata/parquet.md)how Teradata types map to Parquet --- # Output Formats Examples demonstrating different output formats supported by FastBCP. The extension of `--fileoutput` in the examples below matches the format. CSV * File`.csv` * Formatstandard comma/delimiter-separated values Parquet * File`.parquet` * Formatcolumnar storage optimized for analytical queries Excel * File`.xlsx` * FormatMicrosoft Excel ## CSV Format[​](#csv-format "Direct link to CSV Format") Standard comma/delimiter-separated values format. ### Basic CSV Export[​](#basic-csv-export "Direct link to Basic CSV Export") ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Sales" ` --directory "C:\temp" ` --fileoutput "sales.csv" ` --decimalseparator "." ` --delimiter "," ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` ### CSV with Custom Delimiter[​](#csv-with-custom-delimiter "Direct link to CSV with Custom Delimiter") Using pipe delimiter for better data separation: ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Sales" ` --directory "C:\temp" ` --fileoutput "sales.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "sale_id" ` --paralleldegree 8 ` --merge "False" ``` ### CSV with European Format[​](#csv-with-european-format "Direct link to CSV with European Format") Using comma as decimal separator (common in European countries): ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Sales" ` --directory "C:\temp" ` --fileoutput "sales_european.csv" ` --decimalseparator "," ` --delimiter ";" ` --dateformat "dd/MM/yyyy HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "sale_id" ` --paralleldegree 8 ` --merge "False" ``` ## Parquet Format[​](#parquet-format "Direct link to Parquet Format") Columnar storage format optimized for analytical queries. ### Basic Parquet Export[​](#basic-parquet-export "Direct link to Basic Parquet Export") ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Sales" ` --directory "C:\temp" ` --fileoutput "sales.parquet" ` --parallelmethod "None" ``` ### Parallel Parquet Export[​](#parallel-parquet-export "Direct link to Parallel Parquet Export") Maximize performance with parallel execution: ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Sales" ` --directory "C:\temp" ` --fileoutput "sales.parquet" ` --parallelmethod "RangeId" ` --distributekeycolumn "sale_id" ` --paralleldegree 12 ` --merge "False" ``` ### Parquet with PostgreSQL[​](#parquet-with-postgresql "Direct link to Parquet with PostgreSQL") ``` .\FastBCP.exe ` --connectiontype "pgcopy" ` --server "localhost" ` --port "5432" ` --database "salesdb" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "sales" ` --directory "C:\temp" ` --fileoutput "pg_sales.parquet" ` --parallelmethod "Physical" ` --paralleldegree 10 ` --merge "False" ``` ### Parquet with Oracle[​](#parquet-with-oracle "Direct link to Parquet with Oracle") ``` .\FastBCP.exe ` --connectiontype "oraodp" ` --server "localhost:1521/ORCLPDB1" ` --user "system" ` --password "password" ` --sourceschema "SYSTEM" ` --sourcetable "SALES" ` --directory "C:\temp" ` --fileoutput "oracle_sales.parquet" ` --parallelmethod "Physical" ` --paralleldegree 8 ` --merge "False" ``` ## Excel Format[​](#excel-format "Direct link to Excel Format") Export data to Microsoft Excel format (.xlsx). Good to know Excel exports automatically format data for spreadsheet applications. Large datasets may be split across multiple sheets if they exceed Excel's row limits. ### Basic Excel Export[​](#basic-excel-export "Direct link to Basic Excel Export") ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Sales" ` --directory "C:\temp" ` --fileoutput "sales.xlsx" ` --parallelmethod "None" ``` ### Parallel Excel Export[​](#parallel-excel-export "Direct link to Parallel Excel Export") ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Sales" ` --directory "C:\temp" ` --fileoutput "sales.xlsx" ` --parallelmethod "RangeId" ` --distributekeycolumn "sale_id" ` --paralleldegree 6 ` --merge "False" ``` ### Excel with Custom Query[​](#excel-with-custom-query "Direct link to Excel with Custom Query") Export filtered data to Excel: ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --query "SELECT * FROM dbo.Sales WHERE sale_date >= '2024-01-01' AND sale_date < '2025-01-01'" ` --directory "C:\temp" ` --fileoutput "sales_2024.xlsx" ` --parallelmethod "Ntile" ` --distributekeycolumn "sale_id" ` --paralleldegree 4 ` --merge "False" ``` tip Build your command with the [Doc Wizard](/latest/wizard.md) Related * [CSV Formatting](/1.6/documentation/cli/csv_formatting.md)delimiter, quotes, date format, decimal separator, header and booleans * [Parquet Formatting](/1.6/documentation/cli/parquet_formatting.md)compression and row group size * [Output Info](/1.6/documentation/cli/output_info.md)directory, output file, tokens and encoding * [Datatypes Conversion](/1.6/datatypes-conversion/overview.md)how source types map to Parquet --- # PostgreSQL Examples Comprehensive examples for exporting data from PostgreSQL using native connectors (pgsql, pgcopy). ## Connection Types[​](#connection-types "Direct link to Connection Types") PostgreSQL exports support three connection types. Most examples below show `pgsql` and `pgcopy` side by side in tabs. pgsql * ProtocolStandard PostgreSQL protocol pgcopyFastest for bulk exports * ProtocolPostgreSQL COPY protocol adbc\_pgsqlUltra-fast * ProtocolADBC FastDriver * OutputParquet only (see [ADBC Examples](#adbc-examples)) Good to know The `adbc_pgsql` connection type uses the Arpe.io ADBC FastDriver for ultra-fast, Arrow-native Parquet exports. Output is Parquet-only — see the [ADBC Examples](#adbc-examples) section below. ## Single-threaded Export[​](#single-threaded-export "Direct link to Single-threaded Export") Simple export without parallelization. * Standard Protocol * COPY Protocol ``` .\FastBCP.exe ` --connectiontype "pgsql" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --query "SELECT * FROM lineitem LIMIT 1000" ` --directory "C:\temp" ` --fileoutput "pg_lineitem.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` ``` .\FastBCP.exe ` --connectiontype "pgcopy" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --query "SELECT * FROM lineitem LIMIT 1000" ` --directory "C:\temp" ` --fileoutput "pg_lineitem.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` ## Parallel Export - Random Method[​](#parallel-export---random-method "Direct link to Parallel Export - Random Method") Export using Random distribution with modulo operation. * Standard Protocol * COPY Protocol ``` .\FastBCP.exe ` --connectiontype "pgsql" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --query "SELECT * FROM lineitem" ` --directory "C:\temp" ` --fileoutput "pg_lineitem_random.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "l_linenumber" ` --paralleldegree 8 ` --merge "False" ` --runid "pgsql_to_csv_parallel8_random" ``` ``` .\FastBCP.exe ` --connectiontype "pgcopy" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --query "SELECT * FROM lineitem" ` --directory "C:\temp" ` --fileoutput "pg_lineitem_random.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "l_linenumber" ` --paralleldegree 8 ` --merge "False" ` --runid "pgcopy_to_csv_parallel8_random" ``` ## Parallel Export - DataDriven Method[​](#parallel-export---datadriven-method "Direct link to Parallel Export - DataDriven Method") Export using DataDriven distribution based on distinct column values. * Standard Protocol * COPY Protocol ``` .\FastBCP.exe ` --connectiontype "pgsql" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "lineitem" ` --directory "C:\temp" ` --fileoutput "pg_lineitem_dd.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "DataDriven" ` --distributekeycolumn "l_shipmode" ` --paralleldegree 10 ` --merge "False" ` --runid "pgsql_to_csv_parallel10_datadriven" ``` ``` .\FastBCP.exe ` --connectiontype "pgcopy" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "lineitem" ` --directory "C:\temp" ` --fileoutput "pg_lineitem_dd.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "DataDriven" ` --distributekeycolumn "l_shipmode" ` --paralleldegree 10 ` --merge "False" ` --runid "pgcopy_to_csv_parallel10_datadriven" ``` ## Parallel Export - Ntile Method[​](#parallel-export---ntile-method "Direct link to Parallel Export - Ntile Method") Export using Ntile for evenly distributed chunks. * Standard Protocol * COPY Protocol **Full table:** ``` .\FastBCP.exe ` --connectiontype "pgsql" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "lineitem" ` --directory "C:\temp" ` --fileoutput "pg_lineitem_ntile.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Ntile" ` --distributekeycolumn "l_orderkey" ` --paralleldegree 12 ` --merge "False" ` --runid "pgsql_to_csv_parallel12_ntile" ``` **With query filter:** ``` .\FastBCP.exe ` --connectiontype "pgsql" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --query "SELECT * FROM lineitem WHERE l_shipdate BETWEEN '1995-01-01' AND '1995-12-31'" ` --directory "C:\temp" ` --fileoutput "pg_lineitem_ntile.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Ntile" ` --distributekeycolumn "l_orderkey" ` --paralleldegree 12 ` --merge "False" ` --runid "pgsql_to_csv_parallel12_ntile_filtered" ``` **Full table:** ``` .\FastBCP.exe ` --connectiontype "pgcopy" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "lineitem" ` --directory "C:\temp" ` --fileoutput "pg_lineitem_ntile.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Ntile" ` --distributekeycolumn "l_orderkey" ` --paralleldegree 12 ` --merge "False" ` --runid "pgcopy_to_csv_parallel12_ntile" ``` **With query filter:** ``` .\FastBCP.exe ` --connectiontype "pgcopy" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --query "SELECT * FROM lineitem WHERE l_shipdate BETWEEN '1995-01-01' AND '1995-12-31'" ` --directory "C:\temp" ` --fileoutput "pg_lineitem_ntile.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Ntile" ` --distributekeycolumn "l_orderkey" ` --paralleldegree 12 ` --merge "False" ` --runid "pgcopy_to_csv_parallel12_ntile_filtered" ``` ## Parallel Export - Physical Method[​](#parallel-export---physical-method "Direct link to Parallel Export - Physical Method") Parallel export using the physical row identifier (ctid). Good to know **Physical on PostgreSQL**: with a PostgreSQL connection type (`pgsql`, `pgcopy`, `adbc_pgsql`), the `Physical` method resolves to the ctid strategy (formerly `--parallelmethod Ctid`, now deprecated). It is very efficient for full table exports and does not require a distribute key column. `--sourceschema` and `--sourcetable` are required. * Standard Protocol * COPY Protocol ``` .\FastBCP.exe ` --connectiontype "pgsql" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "lineitem" ` --directory "C:\temp" ` --fileoutput "pg_lineitem_physical.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Physical" ` --paralleldegree 8 ` --merge "False" ` --runid "pgsql_to_csv_parallel8_physical" ``` ``` .\FastBCP.exe ` --connectiontype "pgcopy" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "lineitem" ` --directory "C:\temp" ` --fileoutput "pg_lineitem_physical.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Physical" ` --paralleldegree 8 ` --merge "False" ` --runid "pgcopy_to_csv_parallel8_physical" ``` ## Export to Parquet[​](#export-to-parquet "Direct link to Export to Parquet") Export PostgreSQL data to Parquet format. * Standard Protocol * COPY Protocol **Single-threaded:** ``` .\FastBCP.exe ` --connectiontype "pgsql" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "lineitem" ` --directory "C:\temp" ` --fileoutput "pg_lineitem.parquet" ` --parallelmethod "None" ``` **Parallel with Physical (Ctid):** ``` .\FastBCP.exe ` --connectiontype "pgsql" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "lineitem" ` --directory "C:\temp" ` --fileoutput "pg_lineitem.parquet" ` --parallelmethod "Physical" ` --paralleldegree 10 ` --merge "False" ``` **Single-threaded:** ``` .\FastBCP.exe ` --connectiontype "pgcopy" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "lineitem" ` --directory "C:\temp" ` --fileoutput "pg_lineitem.parquet" ` --parallelmethod "None" ``` **Parallel with Physical (Ctid):** ``` .\FastBCP.exe ` --connectiontype "pgcopy" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "lineitem" ` --directory "C:\temp" ` --fileoutput "pg_lineitem.parquet" ` --parallelmethod "Physical" ` --paralleldegree 10 ` --merge "False" ``` ## ODBC Connection[​](#odbc-connection "Direct link to ODBC Connection") Using ODBC DSN for PostgreSQL connection. **Single-threaded:** ``` .\FastBCP.exe ` --connectiontype "odbc" ` --dsn "PostgreSQL_DSN" ` --directory "C:\temp" ` --fileoutput "pg_test.csv" ` --query "SELECT * FROM public.test_table" ` --parallelmethod "None" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ``` **Parallel Random:** ``` .\FastBCP.exe ` --connectiontype "odbc" ` --dsn "PostgreSQL_DSN" ` --directory "C:\temp" ` --fileoutput "pg_test.csv" ` --query "SELECT * FROM public.test_table" ` --parallelmethod "Random" ` --distributekeycolumn "id" ` --paralleldegree 6 ` --merge "False" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ``` **Parallel DataDriven:** ``` .\FastBCP.exe ` --connectiontype "odbc" ` --dsn "PostgreSQL_DSN" ` --directory "C:\temp" ` --fileoutput "pg_test.csv" ` --query "SELECT * FROM public.test_table" ` --parallelmethod "DataDriven" ` --distributekeycolumn "category" ` --paralleldegree 6 ` --merge "False" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ``` ## ADBC Examples[​](#adbc-examples "Direct link to ADBC Examples") The `adbc_pgsql` connection type uses the Arpe.io ADBC FastDriver for ultra-fast, Arrow-native exports. **Output is Parquet-only** — see [Connection Parameters](/1.6/documentation/cli/connection_parameters.md#connection-type) for details. ``` ./FastBCP \ --connectiontype "adbc_pgsql" \ --server "localhost:5432" \ --user "pytabextract_pguser" \ --password "FastPassword" \ --database "tpch" \ --sourceschema "tpch10" \ --sourcetable "lineitem" \ --directory "./" \ --fileoutput "{sourcetable}.parquet" \ --method "None" ``` tip Build your command with the [Doc Wizard](/latest/wizard.md) Related * [Connection Parameters](/1.6/documentation/cli/connection_parameters.md)connection types, authentication and connection strings * [Parallel Parameters](/1.6/documentation/cli/parallel_parameters.md)parallel methods, degree and distribute key column * [![](/img/logos/postgresql.svg)PostgreSQL datatype mappings](/1.6/datatypes-conversion/postgresql/parquet.md)`pgsql` types mapped to Parquet * [![](/img/logos/postgresql.svg)PostgreSQL COPY datatype mappings](/1.6/datatypes-conversion/postgresql-copy/parquet.md)`pgcopy` types mapped to Parquet --- # SQL Server Examples Comprehensive examples for exporting data from SQL Server (MSSQL, OLEDB, ODBC), from a single-threaded export to each parallel method, Parquet output, ADBC and SQL Server backup files. Good to know SQL Server also supports the `adbc_mssql` connection type, powered by the Arpe.io ADBC FastDriver for ultra-fast, Arrow-native Parquet exports. Output is Parquet-only — see the [ADBC Examples](#adbc-examples) section below. ## Single-threaded Export[​](#single-threaded-export "Direct link to Single-threaded Export") Simple export without parallelization for smaller datasets. ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "FASTExportData" ` --trusted ` --query "SELECT top 1000 * FROM dbo.TEST_71_1M_12m" ` --directory "C:\temp" ` --fileoutput "TEST1000.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` ## Parallel Export - Random Method[​](#parallel-export---random-method "Direct link to Parallel Export - Random Method") Export using Random distribution based on modulo operation. * Windows Authentication * SQL Authentication ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "FASTExportData" ` --trusted ` --query "SELECT * FROM dbo.TEST_71_1M_12m" ` --directory "C:\temp" ` --fileoutput "TEST_71c_1Mr.csv" ` --decimalseparator "," ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "ID_ARTICLE" ` --paralleldegree 8 ` --merge "False" ` --runid "mssql_to_csv_parallel8_random" ``` ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "FASTExportData" ` --user "FastUser" ` --password "FastPassword" ` --query "SELECT * FROM dbo.TEST_71_1M_12m" ` --directory "C:\temp" ` --fileoutput "TEST_71c_1Mr.csv" ` --decimalseparator "," ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "ID_ARTICLE" ` --paralleldegree 8 ` --merge "False" ` --runid "mssql_to_csv_parallel8_random" ``` ## Parallel Export - Physical Method[​](#parallel-export---physical-method "Direct link to Parallel Export - Physical Method") Parallel export using the physical row location (`%%physloc%%`), without a distribute key column. Good to know **Physical on SQL Server**: with a SQL Server connection type (`mssql`, `msoledbsql`, `adbc_mssql`), the `Physical` method resolves to the Physloc strategy (formerly `--parallelmethod Physloc`, now deprecated). `--sourceschema` and `--sourcetable` are required. On a clustered columnstore table, FastBCP detects it and splits on the columnstore row id. ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "tpch10_collation_bin2" ` --trusted ` --sourceschema "dbo" ` --sourcetable "orders" ` --directory "D:\temp" ` --fileoutput "mssql_orders.parquet" ` --parallelmethod "Physical" ` --paralleldegree -2 ` --merge "False" ` --runid "mssql_to_parquet_parallel-2_physical" ``` ## Parallel Export - RangeId Method[​](#parallel-export---rangeid-method "Direct link to Parallel Export - RangeId Method") Export using RangeId distribution for evenly distributed integer keys. **Using table name:** ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "tpch10_collation_bin2" ` --trusted ` --sourceschema "dbo" ` --sourcetable "orders" ` --directory "D:\temp" ` --fileoutput "mssql_orders.csv" ` --decimalseparator "," ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "RangeId" ` --distributekeycolumn "o_orderkey" ` --paralleldegree -2 ` --merge "False" ` --runid "mssql_to_csv_parallel-2_rangeid" ``` **Using query with filter:** ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "tpch10_collation_bin2" ` --trusted ` --query "select * from orders WHERE o_orderdate between '19950101' and '19951231'" ` --directory "D:\temp" ` --fileoutput "mssql_orders.csv" ` --decimalseparator "," ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "RangeId" ` --distributekeycolumn "o_orderkey" ` --paralleldegree -2 ` --merge "False" ` --runid "mssql_to_csv_parallel-2_rangeid_using_query" ``` ## Parallel Export - Ntile Method[​](#parallel-export---ntile-method "Direct link to Parallel Export - Ntile Method") Export using Ntile distribution for evenly distributed chunks. **Full table export:** ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "tpch10_collation_bin2" ` --trusted ` --sourceschema "dbo" ` --sourcetable "orders" ` --directory "D:\temp" ` --fileoutput "mssql_orders.csv" ` --decimalseparator "," ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Ntile" ` --distributekeycolumn "o_orderkey" ` --paralleldegree 12 ` --merge "False" ` --runid "mssql_to_csv_parallel12_Ntile" ``` **Filtered export with date column:** ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "tpch10_collation_bin2" ` --trusted ` --query "select * from orders WHERE o_orderdate between '19950101' and '19951231'" ` --directory "D:\temp" ` --fileoutput "mssql_orders.csv" ` --decimalseparator "," ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Ntile" ` --distributekeycolumn "o_orderdate" ` --paralleldegree 12 ` --merge "False" ` --runid "mssql_to_csv_parallel12_Ntile_using_query" ``` ## Parallel Export - DataDriven Method[​](#parallel-export---datadriven-method "Direct link to Parallel Export - DataDriven Method") Export using DataDriven distribution based on distinct values of a column. **Using partition function:** ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "tpch10_collation_bin2" ` --directory "D:\temp" ` --fileoutput "mssql_orders.csv" ` --trusted ` --sourceschema "dbo" ` --sourcetable "orders_part" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "DataDriven" ` --distributekeycolumn "`$partition.PF_DATE(o_orderdate)" ` --merge "False" ` --paralleldegree 10 ``` ## Export to Parquet[​](#export-to-parquet "Direct link to Export to Parquet") Export SQL Server data to Parquet format. **Single-threaded:** ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "faker" ` --trusted ` --sourceschema "dbo" ` --sourcetable "faker_s1000" ` --directory "D:\temp" ` --fileoutput "mssql_faker_s1000.parquet" ` --parallelmethod "None" ` --runid "mssql_to_parquet_NoParallel" ``` **Parallel with RangeId:** ``` .\FastBCP.exe ` --connectiontype "mssql" ` --trusted ` --server "localhost" ` --database "tpch10_collation_bin2" ` --directory "D:\temp" ` --fileoutput "mssql_orders.parquet" ` --parallelmethod "RangeId" ` --distributekeycolumn "o_orderkey" ` --paralleldegree 7 ` --sourceschema "dbo" ` --sourcetable "orders" ` --merge "False" ``` **Parallel with Ntile and query:** ``` .\FastBCP.exe ` --connectiontype "mssql" ` --trusted ` --server "localhost" ` --database "tpch10_collation_bin2" ` --directory "D:\temp" ` --fileoutput "mssql_orders_1995.parquet" ` --parallelmethod "Ntile" ` --distributekeycolumn "o_orderkey" ` --paralleldegree 7 ` --query "select * from dbo.orders where o_orderdate between '1995-01-01' and '1995-12-31'" ` --merge "False" ``` ## OLEDB Connection[​](#oledb-connection "Direct link to OLEDB Connection") Alternative connection method using OLEDB provider. **Single-threaded:** ``` $query="SELECT top 10000 * FROM FASTExportData.dbo.TEST_71_1M_12m" $target="localhost" .\FastBCP.exe ` --connectiontype "oledb" ` --provider "MSOLEDBSQL" ` --server $target ` --directory "C:\temp" ` --fileoutput "TEST.CSV" ` --paralleldegree 1 ` --trusted ` --query $query ` --parallelmethod "None" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ``` **Parallel Random with Windows Auth:** ``` .\FastBCP.exe ` --connectiontype "oledb" ` --provider "MSOLEDBSQL" ` --server $target ` --directory "C:\temp" ` --fileoutput "TEST.CSV" ` --paralleldegree 6 ` --trusted ` --query $query ` --parallelmethod "Random" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --distributekeycolumn "ID_ARTICLE" ` --merge "False" ``` **Parallel Random with SQL Auth:** ``` .\FastBCP.exe ` --connectiontype "oledb" ` --provider "MSOLEDBSQL" ` --server $target ` --directory "C:\temp" ` --fileoutput "TEST.CSV" ` --paralleldegree 6 ` --user "FastUser" ` --password "FastPassword" ` --query $query ` --parallelmethod "Random" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --distributekeycolumn "ID_ARTICLE" ` --merge "False" ``` **Parallel DataDriven:** ``` .\FastBCP.exe ` --connectiontype "oledb" ` --provider "MSOLEDBSQL" ` --server $target ` --directory "C:\temp" ` --fileoutput "TEST.CSV" ` --paralleldegree 6 ` --trusted ` --query $query ` --parallelmethod "DataDriven" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --distributekeycolumn "ID_DECOUPE_GEO" ` --merge "False" ``` ## ODBC Connection[​](#odbc-connection "Direct link to ODBC Connection") Using ODBC DSN for connection. **Single-threaded:** ``` .\FastBCP.exe ` --connectiontype "odbc" ` --dsn "DSN4FastBCP" ` --directory "C:\temp" ` --fileoutput "TEST.CSV" ` --paralleldegree 1 ` --trusted ` --query "SELECT * FROM [TEST_71_1M_12m]" ` --parallelmethod "None" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ``` **Parallel Random with Windows Auth:** ``` .\FastBCP.exe ` --connectiontype "odbc" ` --dsn "DSN4FastBCP" ` --directory "C:\temp" ` --fileoutput "TEST.CSV" ` --paralleldegree 6 ` --trusted ` --query "SELECT * FROM [TEST_71_1M_12m]" ` --parallelmethod "Random" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --distributekeycolumn "ID_ARTICLE" ` --merge "False" ``` **Parallel Random with SQL Auth:** ``` .\FastBCP.exe ` --connectiontype "odbc" ` --dsn "DSN4FastBCP" ` --directory "C:\temp" ` --fileoutput "TEST.CSV" ` --paralleldegree 6 ` --user "FastUser" ` --password "FastPassword" ` --query "SELECT * FROM [TEST_71_1M_12m]" ` --parallelmethod "Random" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --distributekeycolumn "ID_ARTICLE" ` --merge "False" ``` **Parallel DataDriven:** ``` .\FastBCP.exe ` --connectiontype "odbc" ` --dsn "DSN4FastBCP" ` --directory "C:\temp" ` --fileoutput "TEST.CSV" ` --paralleldegree 6 ` --trusted ` --query "SELECT * FROM [TEST_71_1M_12m]" ` --parallelmethod "DataDriven" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --distributekeycolumn "ID_GEO" ` --merge "False" ``` ## ADBC Examples[​](#adbc-examples "Direct link to ADBC Examples") The `adbc_mssql` connection type uses the Arpe.io ADBC FastDriver for ultra-fast, Arrow-native exports. **Output is Parquet-only** — see [Connection Parameters](/1.6/documentation/cli/connection_parameters.md#connection-type) for details. **Single-threaded export:** ``` ./FastBCP \ --connectiontype "adbc_mssql" \ --server "localhost,1433" \ --database "tpch" \ --user "migadmin" \ --password "FastPassword" \ --sourceschema "tpch10" \ --sourcetable "lineitem" \ --directory "./" \ --fileoutput "{sourcetable}.parquet" \ --method "None" ``` **Parallel export with RangeId and license file:** ``` .\FastBCP.exe ` --connectiontype "adbc_mssql" ` --server "localhost" ` --trusted ` --database "TPCH_SF100_NOBACKUP" ` --sourceschema "dbo" ` --sourcetable "lineitem_ci" ` --fileoutput "{sourcetable}.parquet" ` --directory "B:\export\{sourcetable}\" ` --parquetcompression "None" ` --parallelmethod "RangeId" ` --distributekeycolumn "l_orderkey" ` --degree 32 ` --runid "1.2.0" ` --licence "C:\Sources\FastBCP\FastBCP_AetP.lic" ``` ## SQL Server Backup Files (backup\_mssql)[​](#sql-server-backup-files-backup_mssql "Direct link to SQL Server Backup Files (backup_mssql)") The `backup_mssql` connection type reads a table straight from SQL Server **full and differential backups** (`.bak`), without restoring them and without a SQL Server instance. `--server` is the directory of the backups and `--database` the backup files. **Output is Parquet-only** — see [SQL Server backup files](/1.6/documentation/cli/connection_parameters.md#sql-server-backup-files-backup_mssql) for what is supported. **One backup file, parallel export (Physical resolves to Pages):** * Windows * Linux ``` .\FastBCP.exe ` --connectiontype "backup_mssql" ` --server "D:\Backups\MSSQL" ` --database "tpch_full.bak" ` --sourceschema "dbo" ` --sourcetable "orders" ` --directory "D:\export\{sourcetable}" ` --fileoutput "{sourcetable}.parquet" ` --parallelmethod "Physical" ` --paralleldegree 8 ``` ``` ./FastBCP \ --connectiontype "backup_mssql" \ --server "/var/opt/mssql/backup" \ --database "tpch_full.bak" \ --sourceschema "dbo" \ --sourcetable "orders" \ --directory "/export/{sourcetable}" \ --fileoutput "{sourcetable}.parquet" \ --parallelmethod "Physical" \ --paralleldegree 8 ``` **Striped backup** (`BACKUP DATABASE tpch TO DISK = 'tpch_1.bak', DISK = 'tpch_2.bak', DISK = 'tpch_3.bak'`): a pattern matching the stripes, or the stripes separated by `;`, in any order: ``` ./FastBCP \ --connectiontype "backup_mssql" \ --server "/var/opt/mssql/backup" \ --database "tpch_*.bak" \ --sourceschema "dbo" \ --sourcetable "lineitem" \ --directory "/export/lineitem" \ --fileoutput "lineitem.parquet" \ --parallelmethod "Physical" \ --paralleldegree 8 ``` ``` --database "tpch_1.bak;tpch_2.bak;tpch_3.bak" ``` **A query on one table** (column list, no filter: `SELECT * | columns FROM [schema.]table`): ``` .\FastBCP.exe ` --connectiontype "backup_mssql" ` --server "D:\Backups\MSSQL" ` --database "sales_full.bak" ` --query "SELECT OrderID, CustomerID, OrderDate FROM Sales.Orders" ` --directory "D:\export\orders" ` --fileoutput "orders.parquet" ``` **An encrypted backup** (`WITH ENCRYPTION`, or a TDE database): the private key of the server certificate, and its password if it has one (since FastBCP 1.6.6): * Windows * Linux ``` .\FastBCP.exe ` --connectiontype "backup_mssql" ` --server "D:\Backups\MSSQL" ` --database "sales_encrypted.bak" ` --sourceuser "D:\Secure\Keys\MyCert.pvk" ` --sourcepassword "KeyPassword" ` --sourceschema "dbo" ` --sourcetable "orders" ` --directory "D:\export\orders" ` --fileoutput "orders.parquet" ` --parallelmethod "Physical" ` --paralleldegree 8 ``` ``` ./FastBCP \ --connectiontype "backup_mssql" \ --server "/var/opt/mssql/backup" \ --database "sales_encrypted.bak" \ --sourceuser "/secure/keys/MyCert.pvk" \ --sourcepassword "KeyPassword" \ --sourceschema "dbo" \ --sourcetable "orders" \ --directory "/export/orders" \ --fileoutput "orders.parquet" \ --parallelmethod "Physical" \ --paralleldegree 8 ``` See [Encrypted backups](/1.6/documentation/cli/connection_parameters.md#encrypted-backups) for the key formats and how to export the key. **A full backup and its differential:** name both, or a pattern matching them, in any order. The latest version of the table is read, the whole table (since FastBCP 1.6.7): * Windows * Linux ``` .\FastBCP.exe ` --connectiontype "backup_mssql" ` --server "D:\Backups\MSSQL" ` --database "sales_full.bak;sales_diff.bak" ` --sourceschema "dbo" ` --sourcetable "orders" ` --directory "D:\export\orders" ` --fileoutput "orders.parquet" ` --parallelmethod "Physical" ` --paralleldegree 8 ``` ``` ./FastBCP \ --connectiontype "backup_mssql" \ --server "/var/opt/mssql/backup" \ --database "sales_*.bak" \ --sourceschema "dbo" \ --sourcetable "orders" \ --directory "/export/orders" \ --fileoutput "orders.parquet" \ --parallelmethod "Physical" \ --paralleldegree 8 ``` See [Differential backups](/1.6/documentation/cli/connection_parameters.md#differential-backups) for what is read, and [Backups that cannot be used](/1.6/documentation/cli/connection_parameters.md#backups-that-cannot-be-used) for when an export fails. Good to know A file holding several backups (`WITH NOINIT`) is read at the latest version it holds: its newest full backup, and the newest differential taken from it. tip Build your command with the [Doc Wizard](/latest/wizard.md) Related * [Connection Parameters](/1.6/documentation/cli/connection_parameters.md)connection types, authentication and SQL Server backup files * [Parallel Parameters](/1.6/documentation/cli/parallel_parameters.md)parallel methods, degree and distribute key column * [![](/img/logos/sqlserver.svg)SQL Server datatype mappings](/1.6/datatypes-conversion/mssql/parquet.md)how SQL Server types map to Parquet * [Datatypes Conversion](/1.6/datatypes-conversion/overview.md)mappings for every source and connection type --- # Configuration Examples Here are sample configuration files for different logging scenarios: Samples on this page * [FastBCP\_​Settings.json](#fastbcp_settingsjson---sinks-on-console--files-windows-path-style--mssql)Console + Files (Windows path style) + MSSQL * [FastBCP\_​Settings\_​Linux\_​Console\_​Files.json](#fastbcp_settings_linux_console_filesjson)Linux with Console + Daily rolling Files * [FastBCP\_​Settings\_​Map\_​for\_​Windows.json](#fastbcp_settings_map_for_windowsjson)Console and dynamically named log file targets (Windows) * [FastBCP\_​Settings\_​Map\_​for\_​Linux\_​and\_​Container.json](#fastbcp_settings_map_for_linux_and_containerjson)Console and dynamically named log file targets (Linux/Container) * [FastBCP\_​Settings\_​Log\_​to\_​PGSQL.json](#fastbcp_settings_log_to_pgsqljson--console--postgresql-log-database)Console + PostgreSQL log database * [FastBCP\_​Settings\_​OpenTelemetry.json](#fastbcp_settings_opentelemetryjson)Console with trace correlation and OpenTelemetry log export ## FastBCP\_Settings.json : Sinks on Console + Files (Windows path style) + MSSQL[​](#fastbcp_settingsjson---sinks-on-console--files-windows-path-style--mssql "Direct link to FastBCP_Settings.json : Sinks on Console + Files (Windows path style) + MSSQL") For logs with Console + Files stored on Windows machine + MSSQL sinks: ``` { "ConnectionStrings": { "MS_FastBCPLogs": "Server=localhost;Database=FastBCPLogs;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\\FastBCP_.json", "retainedFileCountLimit": 10, "rollingInterval": "Day", "rollOnFileSizeLimit": true } }, { "Name": "MSSqlServer", "Args": { "connectionString": "MS_FastBCPLogs", "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": "FastBCP" } } } ``` ## FastBCP\_Settings\_Linux\_Console\_Files.json[​](#fastbcp_settings_linux_console_filesjson "Direct link to FastBCP_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/FastBCP_.json", "retainedFileCountLimit": 10, "rollingInterval": "Day", "rollOnFileSizeLimit": true } } ], "Enrich": [ "FromLogContext", "WithMachineName", "WithProcessId", "WithThreadId" ], "Properties": { "Application": "FastBCP" } } } ``` ## FastBCP\_Settings\_Map\_for\_Windows.json[​](#fastbcp_settings_map_for_windowsjson "Direct link to FastBCP_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}\\FastBCP-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": "FastBCP" } } } ``` ## FastBCP\_Settings\_Map\_for\_Linux\_and\_Container.json[​](#fastbcp_settings_map_for_linux_and_containerjson "Direct link to FastBCP_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}/FastBCP-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": "FastBCP" } } } ``` ## FastBCP\_Settings\_Log\_to\_PGSQL.json : Console + PostgreSQL log database[​](#fastbcp_settings_log_to_pgsqljson--console--postgresql-log-database "Direct link to FastBCP_Settings_Log_to_PGSQL.json : Console + PostgreSQL log database") ``` { "ConnectionStrings": { "PG_FastBCPLogs": "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_FastBCPLogs", "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": "FastBCP" } } } ``` ## FastBCP\_Settings\_OpenTelemetry.json[​](#fastbcp_settings_opentelemetryjson "Direct link to FastBCP_Settings_OpenTelemetry.json") For Console with trace correlation and OpenTelemetry log export (e.g., to [Jaeger](https://www.jaegertracing.io/)): ``` { "Serilog": { "MinimumLevel": { "Default": "Debug", "Override": { "Microsoft": "Warning", "System": "Warning" } }, "Properties": { "LogDirectory": "logs" }, "Enrich": [ "FromLogContext", "WithEnvironmentUserName", "WithProcessId", "WithThreadId", "WithMachineName", "fulltargetname" ], "WriteTo": [ { "Name": "Console", "Args": { "restrictedToMinimumLevel": "Information", "outputTemplate": "{Timestamp:yyyy-MM-ddTHH:mm:ss.fff zzz} -|- {Application} -|- {Level:u12} -|- {fulltargetname} -|- TraceId={TraceId} SpanId={SpanId} -|- {Message}{NewLine}{Exception}", "theme": "Serilog.Sinks.SystemConsole.Themes.SystemConsoleTheme::Literate, Serilog.Sinks.Console" } }, { "Name": "OpenTelemetry", "Args": { "Endpoint": "http://localhost:4317", "Protocol": "Grpc", "ResourceAttributes": { "service.name": "FastBCP", "deployment.environment": "local-test" } } } ] } } ``` Usage with the `--traceparent` parameter to correlate with an upstream caller: ``` ./FastBCP \ --connectiontype mssql \ --server localhost \ --database "tpch10" \ --trusted \ --query "SELECT * FROM dbo.orders" \ --directory "/data/temp" \ --fileoutput "orders.csv" \ --traceparent "00-abcdef1234567890abcdef1234567890-1234567890abcdef-01" \ --settingsfile "/config/FastBCP_Settings_OpenTelemetry.json" ``` **Result in Jaeger UI:** ![FastBCP OpenTelemetry result in Jaeger UI](/assets/images/FastBCP_OpenTelemetry_result_sample-729a1de4f4ccde92a0856f3f4e8b9468.jpg) --- # Log Database FastBCP 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 `FastBCP_settings.json` * You can specify a custom settings file using the `--settingsfile` parameter Good to know * **The log table is created automatically if it does not exist, but it is not indexed.** It is up to you to choose the column(s) you prefer to index. We advise indexing the `event_timestamp` and `run_id` columns. * There is no internal purge of the log table: it is up to you to decide when and how to filter the log table. warning **If the database is not reachable, FastBCP will fail and will refuse to continue.** If you want to continue without logging in the database, you can rename the `FastBCP_settings.json` file to something else (like `FastBCP_settings.json.save`) and FastBCP will use the console log only. Configuration examples Complete configuration examples for both MSSQL and PostgreSQL * [Console + Files + MSSQL](/1.6/documentation/logging/examples.md#fastbcp_settingsjson---sinks-on-console--files-windows-path-style--mssql)`FastBCP_Settings.json`, Windows path style * [Console + PostgreSQL log database](/1.6/documentation/logging/examples.md#fastbcp_settings_log_to_pgsqljson--console--postgresql-log-database)`FastBCP_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 `FastBCP_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}/FastBCP-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: | 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 generated at runtime | Complete configuration examples For both Windows and Linux * [FastBCP\_​Settings\_​Map\_​for\_​Windows.json](/1.6/documentation/logging/examples.md#fastbcp_settings_map_for_windowsjson)Windows * [FastBCP\_​Settings\_​Map\_​for\_​Linux\_​and\_​Container.json](/1.6/documentation/logging/examples.md#fastbcp_settings_map_for_linux_and_containerjson)Linux/Container --- # Log Levels FastBCP 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") 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. CRITICAL `Critical`: severe errors causing termination. Use case: fatal application errors. ## Configuration[​](#configuration "Direct link to Configuration") You can also configure the log level in the `FastBCP_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\\FastBCP_.json", "rollingInterval": "Day" } } ] } } ``` --- # OpenTelemetry FastBCP supports [OpenTelemetry](https://opentelemetry.io/) for distributed tracing and log correlation. This allows you to correlate FastBCP operations with upstream callers (orchestrators, APIs, pipelines) and export structured logs to any OpenTelemetry-compatible backend such as [Jaeger](https://www.jaegertracing.io/), [Zipkin](https://zipkin.io/), or [Grafana Tempo](https://grafana.com/oss/tempo/). ## The `--traceparent` Parameter[​](#the---traceparent-parameter "Direct link to the---traceparent-parameter") The `--traceparent` parameter accepts a [W3C Trace Context](https://www.w3.org/TR/trace-context/) traceparent identifier. When provided, FastBCP uses this trace context to link its internal spans and logs to the calling system's trace, enabling end-to-end distributed tracing. **Syntax:** * Long form only: `--traceparent ""` **Format:** The traceparent value follows the W3C Trace Context specification: ``` {version}-{trace-id}-{parent-id}-{trace-flags} ``` | Field | Format | Description | | --------------- | ------------- | --------------------------------------------- | | **version** | 2 hex digits | Version of the trace context (currently `00`) | | **trace-id** | 32 hex digits | Globally unique trace identifier | | **parent-id** | 16 hex digits | Identifier of the calling span | | **trace-flags** | 2 hex digits | Trace flags (e.g., `01` for sampled) | **Example:** * Windows * Linux ``` .\FastBCP.exe ` ... --traceparent "00-abcdef1234567890abcdef1234567890-1234567890abcdef-01" ` ... ``` ``` ./FastBCP \ ... --traceparent "00-abcdef1234567890abcdef1234567890-1234567890abcdef-01" \ ... ``` Tips Pass the traceparent from your orchestrator (Airflow, Kestra, CI/CD pipeline, or any OpenTelemetry-instrumented caller) so that FastBCP operations appear as child spans in your distributed traces. ## Configuring the OpenTelemetry Endpoint[​](#configuring-the-opentelemetry-endpoint "Direct link to Configuring the OpenTelemetry Endpoint") FastBCP uses the Serilog OpenTelemetry sink to export logs. You can configure the endpoint using either **environment variables** or a **`FastBCP_Settings.json`** file. ### Using Environment Variables[​](#using-environment-variables "Direct link to Using Environment Variables") Set the `OTEL_EXPORTER_OTLP_ENDPOINT` environment variable to point to your OpenTelemetry collector: * Windows * Linux ``` $env:OTEL_EXPORTER_OTLP_ENDPOINT = "http://localhost:4317" ``` ``` export OTEL_EXPORTER_OTLP_ENDPOINT="http://localhost:4317" ``` ### Using `FastBCP_Settings.json`[​](#using-fastbcp_settingsjson "Direct link to using-fastbcp_settingsjson") Add the OpenTelemetry sink to the `WriteTo` section of your `FastBCP_Settings.json` file. This gives you full control over the protocol, endpoint, and resource attributes. ``` { "Serilog": { "MinimumLevel": { "Default": "Debug", "Override": { "Microsoft": "Warning", "System": "Warning" } }, "Properties": { "LogDirectory": "logs" }, "Enrich": [ "FromLogContext", "WithEnvironmentUserName", "WithProcessId", "WithThreadId", "WithMachineName", "fulltargetname" ], "WriteTo": [ { "Name": "Console", "Args": { "restrictedToMinimumLevel": "Information", "outputTemplate": "{Timestamp:yyyy-MM-ddTHH:mm:ss.fff zzz} -|- {Application} -|- {Level:u12} -|- {fulltargetname} -|- TraceId={TraceId} SpanId={SpanId} -|- {Message}{NewLine}{Exception}", "theme": "Serilog.Sinks.SystemConsole.Themes.SystemConsoleTheme::Literate, Serilog.Sinks.Console" } }, { "Name": "OpenTelemetry", "Args": { "Endpoint": "http://localhost:4317", "Protocol": "Grpc", "ResourceAttributes": { "service.name": "FastBCP", "deployment.environment": "local-test" } } } ] } } ``` **Key settings in the OpenTelemetry sink:** | Setting | Description | | ---------------------- | ----------------------------------------------------------------------------- | | **Endpoint** | URL of your OpenTelemetry collector (default: `http://localhost:4317`) | | **Protocol** | Transport protocol: `Grpc` (default) or `HttpProtobuf` | | **ResourceAttributes** | Key-value pairs attached to every log entry (e.g., service name, environment) | Good to know The `TraceId` and `SpanId` fields in the console output template allow you to see trace correlation directly in the console logs, even without an OpenTelemetry backend. Good to know When both an environment variable and a `FastBCP_Settings.json` configuration are present, the settings file takes precedence for the OpenTelemetry sink configuration. See also * [FastBCP\_​Settings\_​OpenTelemetry.json](/1.6/documentation/logging/examples.md#fastbcp_settings_opentelemetryjson)complete sample with trace correlation and OpenTelemetry log export, and the result in Jaeger UI --- # Logging Overview ## Parameter Logs targets using FastBCP\_settings.json[​](#parameter-logs-targets-using-fastbcp_settingsjson "Direct link to Parameter Logs targets using FastBCP_settings.json") FastBCP can log information in 3 modes. It also supports OpenTelemetry for distributed tracing and log export to any OpenTelemetry-compatible backend. Log targets * [Console](/1.6/documentation/logging/logs-level.md)log levels and console output * [Database](/1.6/documentation/logging/log-database.md)MSSQL and PostgreSQL only * [File (or Map)](/1.6/documentation/logging/log-files-names-mapping-using-variables.md)log file paths and names built from variables * [OpenTelemetry](/1.6/documentation/logging/OpenTelemetry.md)distributed tracing and log export to any OpenTelemetry-compatible backend Tips You can use several targets (sinks) at the same time. You can adapt what and where you want to log using the `FastBCP_settings.json` file. By default, if no custom path is provided, FastBCP looks for the settings file in: * the current directory (the working directory) * the same directory where the FastBCP executable is located (the executable directory). If this file is not present, FastBCP will use the console log only. You can specify a custom path to the settings file using the `--settingsfile` parameter (short form `-f`). * Windows * Linux ``` .\FastBCP.exe ` --connectiontype mssql ` --server localhost ` --database "tpch10_collation_bin2" ` --trusted ` --query "SELECT * FROM dbo.orders" ` --directory "D:\temp" ` --fileoutput "mssql_orders.csv" ` --parallelmethod Ntile ` --distributekeycolumn "o_orderkey" ` --paralleldegree 7 ` --settingsfile "D:\logs\config\FastBCP_settings.json" ``` ``` ./FastBCP \ --connectiontype mssql \ --server localhost \ --database "tpch10_collation_bin2" \ --trusted \ --query "SELECT * FROM dbo.orders" \ --directory "/data/temp" \ --fileoutput "mssql_orders.csv" \ --parallelmethod Ntile \ --distributekeycolumn "o_orderkey" \ --paralleldegree 7 \ --settingsfile "/etc/fastbcp/FastBCP_settings.json" ``` See also * [Configuration Examples](/1.6/documentation/logging/examples.md)sample settings files --- # Installation ## Instructions[​](#instructions "Direct link to Instructions") * Windows * Linux * Docker/MacOS To start using FastBCP, first **[request a trial](https://arpe.io/get-trial?product=FastBCP)** to download the latest version. Once downloaded, unzip FastBCP to a directory of your choice. ``` Expand-Archive -Path .\FastBCP.zip -DestinationPath .\FastBCP ``` You can verify the installation by checking the version: ``` .\FastBCP.exe --version ``` To start using FastBCP, first **[request a trial](https://arpe.io/get-trial?product=FastBCP)** to download the latest version. Once downloaded, unzip FastBCP to a directory of your choice. ``` unzip FastBCP.zip -d FastBCP ``` On **Linux**, you need to give execution rights to the FastBCP binary: ``` chmod +x FastBCP ``` You can verify the installation by checking the version: ``` ./FastBCP --version ``` FastBCP is available as a Docker image on **[Docker Hub](https://hub.docker.com/repository/docker/arpeio/fastbcp/general)**. Pull the latest version: ``` docker pull arpeio/fastbcp ``` Or pull a specific version: ``` docker pull arpeio/fastbcp:v0.0.0 ``` You can verify the installation by checking the version: ``` docker run --rm arpeio/fastbcp:latest --version ``` You are now ready to run FastBCP Build your first command with the [Doc Wizard](/latest/wizard.md), or follow [Getting Started](/1.6/.md). License Information After the trial period you will need a valid license. By default, FastBCP will try to find a `FastBCP.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 FastBCP : | 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 in order to use it with ODBC or OLEDB connection type. --- # Apache Airflow [Apache Airflow](https://airflow.apache.org/) is a powerful open-source platform for developing, scheduling, and monitoring batch-oriented workflows. FastBCP 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 providerWith pip, see [Prerequisites](#prerequisites) 2. 2Create the connectionsSource database and cloud storage, see [Configure Airflow Connections](#configure-airflow-connections) 3. 3Add the DAGA `DockerOperator` task that runs the FastBCP 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") FastBCP provides an official Docker image available on Docker Hub: `arpeio/fastbcp:latest`. * [arpeio/fastbcp on DockerHub](https://hub.docker.com/repository/docker/arpeio/fastbcp/general)the prebuilt image * [Docker integration](/1.6/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 FastBCP 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. FastBCP integration requires connections for your source database and cloud storage. 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** | `host.docker.internal` (your database host) | | **Port** | `11433` (your database port) | | **Login** | Your database username (e.g., `FastLogin`) | | **Password** | Your database password | | **Extra** | `{"database":"tpch10"}` | 2. AWS connection (for S3 export) 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 **Amazon Web Services** 4. Configure the connection with the settings below | Field | Value | | ------------------------- | -------------------------------------------------------- | | **Connection Id** | `aws_fastbcp` (or your preferred name) | | **Connection Type** | `Amazon Web Services` (select this from the dropdown) | | **AWS Access Key ID** | Your AWS access key (in the Login field) | | **AWS Secret Access Key** | Your AWS secret key (in the Password field) | | **Extra** | `{"region_name":"eu-west-1"}` (or your preferred region) | Good to know * For ODBC connections, the database name should be specified in the Extra JSON field using `{"database":"your_database_name"}`. * Airflow AWS providers commonly use `region_name` in Extra JSON. Alternatively, you can use `{"region":"eu-west-1"}` or `{"aws_default_region":"eu-west-1"}`. ## 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 FastBCP 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., `fastbcp_orders_mssql_to_s3.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 _mssql_parts(conn_id: str): """ Extract MSSQL connection details from Airflow connection. Expected Airflow connection (using ODBC): - Conn Id: mssql_tpch10 (conn_type: odbc) - Host: host.docker.internal - Port: 11433 - Login/Password: FastLogin / FastPassword - Extra JSON: {"database":"tpch10"} """ c = BaseHook.get_connection(conn_id) host = c.host port = c.port user = c.login pwd = c.password # For ODBC MSSQL, the database is typically stored in Extra JSON # (because the UI may not expose a dedicated "Database" field). db = c.extra_dejson.get("database") or c.schema if not db: raise ValueError( f"Connection '{conn_id}': missing database. Put it in Extra JSON " f'{{"database":"tpch10"}} (recommended for ODBC).' ) return host, port, user, pwd, db def _aws_env(conn_id: str): """ Extract AWS credentials from Airflow connection and map to container env vars. Expected Airflow AWS connection: - Conn Id: aws_fastbcp - Conn Type: Amazon Web Services - Login -> AWS_ACCESS_KEY_ID - Password -> AWS_SECRET_ACCESS_KEY - Extra -> {"region_name":"eu-west-1"} (or your region) Returns a dictionary with: - AWS_ACCESS_KEY_ID - AWS_SECRET_ACCESS_KEY - AWS_DEFAULT_REGION """ c = BaseHook.get_connection(conn_id) # Keys can be in login/password or in Extra JSON access_key = c.login or c.extra_dejson.get("aws_access_key_id") secret_key = c.password or c.extra_dejson.get("aws_secret_access_key") # Airflow AWS providers commonly use "region_name" in Extra JSON region = ( c.extra_dejson.get("region_name") or c.extra_dejson.get("region") or c.extra_dejson.get("aws_default_region") ) missing = [ k for k, v in { "AWS_ACCESS_KEY_ID": access_key, "AWS_SECRET_ACCESS_KEY": secret_key, "AWS_DEFAULT_REGION": region, }.items() if not v ] if missing: raise ValueError( f"Connection '{conn_id}': missing AWS fields: {missing}. " f"Set login/password and add Extra.region_name (or region)." ) return { "AWS_ACCESS_KEY_ID": access_key, "AWS_SECRET_ACCESS_KEY": secret_key, "AWS_DEFAULT_REGION": region, } with DAG( dag_id="fastbcp_export_orders_parquet_to_s3", start_date=datetime(2025, 1, 1), schedule=None, catchup=False, tags=["fastbcp", "mssql", "s3", "docker"], ) as dag: mssql_host, mssql_port, mssql_user, mssql_pwd, mssql_db = _mssql_parts("mssql_tpch10") aws_env = _aws_env("aws_fastbcp") DockerOperator( task_id="export_orders_parquet_to_s3", image="arpeio/fastbcp: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, environment=aws_env, command=[ "--connectiontype", "mssql", "--server", f"{mssql_host},{mssql_port}", "--user", mssql_user, "--password", mssql_pwd, "--database", mssql_db, "--sourceschema", "dbo", "--sourcetable", "orders", "--fileoutput", "orders.parquet", "--directory", "s3://fastbcp-export/orders/parquet", "--parallelmethod", "Ntile", "--paralleldegree", "12", "--distributekeycolumn", "o_orderkey", "--merge", "false", "--nobanner", ], network_mode="bridge", ) ``` ### Key Parameters[​](#key-parameters "Direct link to Key Parameters") `image` Specifies the FastBCP Docker image `docker_url` Docker daemon endpoint `environment` Dictionary of environment variables (AWS credentials in this case) `command` List of FastBCP CLI arguments `auto_remove` Automatically remove the container after successful execution ### Helper Functions Explained[​](#helper-functions-explained "Direct link to Helper Functions Explained") The DAG includes two utility functions: `_mssql_parts(conn_id)` Extracts connection details from an Airflow ODBC connection: * Retrieves host, port, username, and password * Extracts the database name from the Extra JSON field * Returns all components needed to build the FastBCP connection string `_aws_env(conn_id)` Extracts AWS credentials from an Airflow AWS connection and maps them to the environment variables expected by FastBCP: `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY` and `AWS_DEFAULT_REGION`. It supports multiple Extra JSON formats for flexibility. ## Logging[​](#logging "Direct link to Logging") All FastBCP 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., `fastbcp_export_orders_parquet_to_s3`) 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: * FastBCP 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 16:15:37] INFO - Settings file not found in the working directory nor in the executable directory [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.882 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- The "FastBCP_Settings.json" file does not exist. Using default settings. Console Only with loglevel=Information [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.892 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- FastBCP Trial – will expires on "2026‑03‑27" (24 day(s) left). [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.892 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Starting [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- FastBCP Version : "0.29.2.0" Architecture : "X64" - Framework : ".NET 8.0.24" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Internal Trace ID : "5ccea857-1538-4a28-8b1c-cfe5c51fbd43" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Internal Run ID : "5ccea857-1538-4a28-8b1c-cfe5c51fbd43" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- OS : "Debian GNU/Linux 13 (trixie)" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Connection Type : "mssql" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Source SqlInstance : "sql22,1433" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Source Database : "tpch" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Source Schema : "tpch10" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Source Table : "orders" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Trusted Connection : False [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- User : "migadmin" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Output File : "orders.parquet" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Output Directory : /data/parquet [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Degree : 12 [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Distribute Method : "Ntile" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Distribute Column : "o_orderkey" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Decimal Separator : "," [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Delimiter : "|" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Use quotes : False [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Date format: "yyyy-MM-dd" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Encoding : "UTF-8" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- No Header : False [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Timestamped : False [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Boolean Format : "automatic" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Cloud Profile : "" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Application Intent : "ReadOnly" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.906 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- file extension is ".parquet" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.909 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Encoding used : Unicode (UTF-8) - 65001 - utf-8 [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.965 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- 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=FastBCP;Application Intent=ReadOnly" [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.086 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- 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 16:15:38] INFO - 2026-03-02T15:15:38.110 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Get DataTypes with header end : Elapsed=6 ms [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Data Segments Computation Completed in 260 ms [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Distribute Column Type : "Int32" [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 0 : 1 : 1 - 5000001 or "o_orderkey" is null [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 1 : 2 : 5000002 - 10000002 [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 2 : 3 : 10000003 - 15000003 [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 3 : 4 : 15000004 - 20000004 [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 4 : 5 : 20000005 - 25000005 [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 5 : 6 : 25000006 - 30000006 [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 6 : 7 : 30000007 - 35000007 [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 7 : 8 : 35000032 - 40000032 [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 8 : 9 : 40000033 - 45000033 [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 9 : 10 : 45000034 - 50000034 [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 10 : 11 : 50000035 - 55000035 [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 11 : 12 : 55000036 - 60000000 [2026-03-02 16:15:46] INFO - 2026-03-02T15:15:46.611 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 002 for o_orderkey between 10000003 and 15000003 into /data/parquet/orders_chunk_002.parquet : 1250001 rows x 9 columns in 8234ms [2026-03-02 16:15:46] INFO - 2026-03-02T15:15:46.611 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 011 for o_orderkey between 55000036 and 60000000 into /data/parquet/orders_chunk_011.parquet : 1249989 rows x 9 columns in 8234ms [2026-03-02 16:15:46] INFO - 2026-03-02T15:15:46.790 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 003 for o_orderkey between 15000004 and 20000004 into /data/parquet/orders_chunk_003.parquet : 1250001 rows x 9 columns in 8413ms [2026-03-02 16:15:46] INFO - 2026-03-02T15:15:46.797 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 005 for o_orderkey between 25000006 and 30000006 into /data/parquet/orders_chunk_005.parquet : 1250001 rows x 9 columns in 8420ms [2026-03-02 16:15:46] INFO - 2026-03-02T15:15:46.936 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 008 for o_orderkey between 40000033 and 45000033 into /data/parquet/orders_chunk_008.parquet : 1250001 rows x 9 columns in 8559ms [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.139 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 010 for o_orderkey between 50000035 and 55000035 into /data/parquet/orders_chunk_010.parquet : 1250001 rows x 9 columns in 8763ms [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.154 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 000 for o_orderkey between 1 and 5000001 into /data/parquet/orders_chunk_000.parquet : 1250001 rows x 9 columns in 8777ms [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.247 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 009 for o_orderkey between 45000034 and 50000034 into /data/parquet/orders_chunk_009.parquet : 1250001 rows x 9 columns in 8870ms [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.308 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 006 for o_orderkey between 30000007 and 35000007 into /data/parquet/orders_chunk_006.parquet : 1250001 rows x 9 columns in 8931ms [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.309 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 001 for o_orderkey between 5000002 and 10000002 into /data/parquet/orders_chunk_001.parquet : 1250001 rows x 9 columns in 8932ms [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.363 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 007 for o_orderkey between 35000032 and 40000032 into /data/parquet/orders_chunk_007.parquet : 1250001 rows x 9 columns in 8986ms [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.366 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 004 for o_orderkey between 20000005 and 25000005 into /data/parquet/orders_chunk_004.parquet : 1250001 rows x 9 columns in 8989ms [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- files generation end : Elapsed=9257 ms - maxdop=12 [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total data rows : 15000000 [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total data columns : 9 [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total cells : 135000000 [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Throughput rows : 1568531 rows/s [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Throughput cells : 14116787 cells/s [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total time : Elapsed=9563 ms [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total data rows : 15000000 [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total data columns : 9 [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total cells : 135000000 [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Final Throughput rows : 1568482 rows/s [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Final Throughput cells : 14116346 cells/s [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Completed Load [2026-03-02 16:15:47] INFO - Task instance in success state [2026-03-02 16:15:47] INFO - Previous state of the Task instance: TaskInstanceState.RUNNING [2026-03-02 16:15:47] INFO - Task operator: ``` ## Related pages[​](#related-pages "Direct link to Related pages") Related pages * [Docker](/1.6/integration/docker-integration.md)the FastBCP image, its volumes and logging settings * [Kestra](/1.6/integration/kestra-integration.md)run the same image from a Kestra flow * [![](/img/logos/aws-s3.png)AWS S3](/1.6/documentation/cloud-connectivity/aws-s3.md)credentials and options for S3 exports --- # Docker Minimal, production-ready container image to run FastBCP, a high-performance bulk copy 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/FastBCP` | | **Publishing** | Published automatically via GitHub Actions for each new release and weekly security updates | * [arpeio/fastbcp on DockerHub](https://hub.docker.com/repository/docker/arpeio/fastbcp/general)the prebuilt image * [FastBCP-Image on GitHub](https://github.com/arpe-io/FastBCP-Image)Dockerfile and sample settings files ## Prerequisites[​](#prerequisites "Direct link to Prerequisites") 1. Docker 24+ (or Podman) A container engine to pull and run the image. 2. FastBCP Linux x64 ≥ 0.28.0 binaryOptional Only needed to build the image yourself. 3. FastBCP\_Settings.jsonOptional To mount or copy into `/config` for custom logging settings. ## Using the Prebuilt Image from DockerHub[​](#using-the-prebuilt-image-from-dockerhub "Direct link to Using the Prebuilt Image from DockerHub") You can use a prebuilt image from DockerHub that already includes the FastBCP binary. You must provide your own license at runtime. ### Available Tags[​](#available-tags "Direct link to Available Tags") * Version-specific tagsAligned with FastBCP releases (e.g., `v0.28.3`) * `latest` tagAlways points to the most recent FastBCP version ### Automatic Updates[​](#automatic-updates "Direct link to Automatic Updates") * New releasesImages are automatically built when new FastBCP versions are released * Security updatesThe latest version of each minor branch (e.g., latest v0.27.x, v0.28.x, v0.29.x) is rebuilt every Monday with the latest base image and security patches Good to know All actively used versions stay secure without breaking compatibility. For example, if you use `v0.28.8` (latest of the 0.28.x branch), it still gets security updates after `v0.29.0` is released. ### Pull and Run[​](#pull-and-run "Direct link to Pull and Run") * Pull the image * Basic commands ``` # Latest version docker pull arpeio/fastbcp:latest # Specific version docker pull arpeio/fastbcp:v0.28.3 ``` ``` # Get command line help docker run --rm arpeio/fastbcp:latest # Check version docker run --rm arpeio/fastbcp:latest --version ``` ### License Requirement[​](#license-requirement "Direct link to License Requirement") Since version 0.28.0, pass the license content directly via `--license "…"`. ``` export licenseContent=$(cat ./FastBCP.lic) # Use $licenseContent in your docker run commands docker run --rm arpeio/fastbcp: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. ## Usage Examples[​](#usage-examples "Direct link to Usage Examples") The Docker image uses the FastBCP binary as its entrypoint, so you can run it directly with parameters as defined in the [FastBCP documentation](/latest/.md). * SQL Server → Parquet on S3 * SQL Server → CSV with logging * PostgreSQL → Parquet on ADLS * Oracle → Parquet on GCS ``` export licenseContent=$(cat ./FastBCP.lic) docker run --rm \ -e AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID} \ -e AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY} \ -e AWS_REGION=${AWS_REGION} \ arpeio/fastbcp:latest \ --connectiontype "mssql" \ --server "host.docker.internal,1433" \ --user "FastUser" \ --password "FastPassword" \ --database "tpch_test" \ --query "SELECT * FROM dbo.orders WHERE year(o_orderdate)=1998" \ --fileoutput "orders.parquet" \ --directory "s3://arpeioftoutput/dockertest/" \ --paralleldegree 12 \ --parallelmethod "Ntile" \ --distributekeycolumn "o_orderkey" \ --merge false \ --license "$licenseContent" ``` ``` export licenseContent=$(cat ./FastBCP.lic) docker run --rm \ -v fastbcp-config:/config \ -v fastbcp-data:/data \ -v fastbcp-logs:/logs \ arpeio/fastbcp:latest \ --settingsfile "/config/FastBCP_Settings_Logs_To_Files.json" \ --connectiontype "mssql" \ --server "host.docker.internal,1433" \ --user "FastUser" \ --password "FastPassword" \ --database "tpch_test" \ --query "SELECT * FROM dbo.orders WHERE year(o_orderdate)=1998" \ --fileoutput "orders.csv" \ --directory "/data/orders/csv" \ --delimiter "|" \ --decimalseparator "." \ --dateformat "yyyy-MM-dd HH:mm:ss" \ --paralleldegree 12 \ --parallelmethod "Ntile" \ --distributekeycolumn "o_orderkey" \ --merge false \ --license "$licenseContent" ``` ``` export licenseContent=$(cat ./FastBCP.lic) export adlscontainer="arpeioadlseu" docker run --rm \ -e AZURE_CLIENT_ID=${AZURE_CLIENT_ID} \ -e AZURE_TENANT_ID=${AZURE_TENANT_ID} \ -e AZURE_CLIENT_SECRET=${AZURE_CLIENT_SECRET} \ arpeio/fastbcp:latest \ --connectiontype "pgcopy" \ --server "host.docker.internal:15432" \ --user "FastUser" \ --password "FastPassword" \ --database "tpch" \ --sourceschema "tpch_10" \ --sourcetable "orders" \ --query "SELECT * FROM tpch_10.orders WHERE o_orderdate >= '1998-01-01' AND o_orderdate < '1999-01-01'" \ --fileoutput "orders.parquet" \ --directory "abfss://${adlscontainer}.dfs.core.windows.net/fastbcpoutput/testdfs/orders" \ --paralleldegree -2 \ --parallelmethod "Physical" \ --license "$licenseContent" ``` ``` export licenseContent=$(cat ./FastBCP.lic) export gcsbucket="arpeio-gcs-bucket" export GOOGLE_APPLICATION_CREDENTIALS_JSON=$(cat ./gcp-credentials.json) docker run --rm \ -e GOOGLE_APPLICATION_CREDENTIALS="${GOOGLE_APPLICATION_CREDENTIALS_JSON}" \ arpeio/fastbcp:latest \ --connectiontype "oraodp" \ --server "host.docker.internal:1521/FREEPDB1" \ --user "TPCH_IN" \ --password "TPCH_IN" \ --database "FREEPDB1" \ --sourceschema "TPCH_IN" \ --sourcetable "ORDERS" \ --fileoutput "orders.parquet" \ --directory "gs://${gcsbucket}/fastbcpoutput/testgs/orders" \ --parallelmethod "Physical" \ --paralleldegree -2 \ --license "$licenseContent" ``` ## 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. Stores imported or exported data files. `/work`Read-many / Write-many Temporary working directory (container WORKDIR). Used for temporary processing. `/logs`Read-many / Write-many Log output directory (per-run or aggregated logs). Stores runtime and execution logs. ## Configuring FastBCP Logging[​](#configuring-fastbcp-logging "Direct link to Configuring FastBCP Logging") info Available starting from version v0.28.3 FastBCP supports custom logging configuration through an external Serilog settings file in JSON format. This allows you to control how and where logs are written: to the console, to files, or dynamically per run. 1. 1Download a sampleGet [FastBCP\_Settings\_Logs\_To\_Files.json](https://raw.githubusercontent.com/aetperf/FastBCP-Image/main/FastBCP_Settings_Logs_To_Files.json) from GitHub 2. 2Mount itCustom settings files go under `/config` in the container 3. 3Point to itPass `--settingsfile "/config/.json"` to the container ### 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") The following configuration is recommended for most production or Airflow environments. It writes: * ConsoleLogs to the console for real-time visibility * AirflowRun summary logs to `/airflow/xcom/return.json` for Airflow integration * Per-run filesLogs under `/logs`, automatically named with `{LogTimestamp}` and `{TraceId}` FastBCP\_Settings\_Logs\_To\_Files.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": "FastBCP" } } } ``` Good to know * If a target directory (such as `/logs` or `/airflow/xcom`) does not exist, FastBCP 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") You can use the following placeholders to dynamically generate log file names or directories: `{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") Your Serilog configuration file (for example, `FastBCP_Settings_Logs_To_Files.json`) must be placed in `/config`, either by mounting a local directory or by using a Docker named volume. Example with named volumes: ``` # First, copy your config file to a volume location cp ~/FastBCP_Settings_Logs_To_Files.json /volumes/fastbcp-config/ # Then run FastBCP with mounted volumes docker run --rm \ -v fastbcp-config:/config \ -v fastbcp-data:/data \ -v fastbcp-logs:/logs \ arpeio/fastbcp:latest \ --settingsfile "/config/FastBCP_Settings_Logs_To_Files.json" \ --connectiontype "mssql" \ --server "host.docker.internal,1433" \ --user "FastUser" \ --password "FastPassword" \ --database "tpch_test" \ --query "SELECT * FROM dbo.orders" \ --fileoutput "orders.csv" \ --directory "/data" \ --paralleldegree 12 \ --parallelmethod "Ntile" \ --distributekeycolumn "o_orderkey" \ --merge false \ --license "$licenseContent" ``` Good to know If the `--settingsfile` argument is not provided, FastBCP will use its built-in default logging configuration. ## Orchestrate the container[​](#orchestrate-the-container "Direct link to Orchestrate the container") Run the image from an orchestrator * [Apache Airflow](/1.6/integration/airflow-integration.md)DockerOperator in a DAG * [Kestra](/1.6/integration/kestra-integration.md)`io.kestra.plugin.docker.Run` task in a flow --- # Kestra [Kestra](https://kestra.io/) is a powerful open-source orchestration platform that can be used to automate and schedule FastBCP data export workflows. FastBCP can be seamlessly integrated into Kestra flows using its Docker image. ## Docker Image[​](#docker-image "Direct link to Docker Image") FastBCP provides an official Docker image available on Docker Hub: `arpeio/fastbcp:latest`. * [arpeio/fastbcp on DockerHub](https://hub.docker.com/repository/docker/arpeio/fastbcp/general)the prebuilt image * [Docker integration](/1.6/integration/docker-integration.md)tags, volumes and logging settings of the image ## Integration with Docker Run Plugin[​](#integration-with-docker-run-plugin "Direct link to Integration with Docker Run Plugin") The [`io.kestra.plugin.docker.Run`](https://kestra.io/plugins/plugin-docker/io.kestra.plugin.docker.run) plugin provides a direct way to execute FastBCP commands in a Docker container. This is the recommended method for integrating FastBCP with Kestra. ### Basic Example[​](#basic-example "Direct link to Basic Example") ``` id: fastbcp_export_orders namespace: arpe.io tasks: - id: export_orders_parquet type: io.kestra.plugin.docker.Run containerImage: arpeio/fastbcp:latest host: "tcp://host.docker.internal:2375" commands: - --connectiontype - mssql - --server - "host.docker.internal,11433" - --user - FastLogin - --password - FastPassword - --database - tpch10 - --sourceschema - dbo - --sourcetable - orders - --fileoutput - orders.parquet - --directory - /data/export - --parallelmethod - Ntile - --paralleldegree - "12" - --distributekeycolumn - o_orderkey - --nobanner ``` ### Key Parameters[​](#key-parameters "Direct link to Key Parameters") `containerImage` Specifies the FastBCP Docker image `host` Docker daemon endpoint (required for Docker Run plugin) `commands` Array of FastBCP CLI arguments ## Environment Variables for Cloud Storage[​](#environment-variables-for-cloud-storage "Direct link to Environment Variables for Cloud Storage") When exporting data to cloud storage (AWS S3, Azure Blob, Google Cloud Storage), you can pass cloud credentials using environment variables (see [Cloud Connectivity](/1.6/documentation/cloud-connectivity/overview.md) for more details). ### Example with AWS S3[​](#example-with-aws-s3 "Direct link to Example with AWS S3") ``` id: fastbcp_export_to_s3 namespace: arpe.io tasks: - id: export_orders_to_s3 type: io.kestra.plugin.docker.Run containerImage: arpeio/fastbcp:latest host: "tcp://host.docker.internal:2375" env: AWS_ACCESS_KEY_ID: "AKIAIOSFODNN7EXAMPLE" AWS_SECRET_ACCESS_KEY: "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY" AWS_DEFAULT_REGION: "us-east-1" commands: - --connectiontype - mssql - --server - "host.docker.internal,11433" - --user - FastLogin - --password - FastPassword - --database - tpch10 - --sourceschema - dbo - --sourcetable - orders - --fileoutput - orders.parquet - --directory - s3://my-bucket/exports/orders - --parallelmethod - Ntile - --paralleldegree - "12" - --distributekeycolumn - o_orderkey - --merge - "false" - --nobanner ``` warning This example puts the credentials in clear text in the flow. Store them as Kestra secrets instead, as shown below. ## 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, connection strings, and cloud credentials, 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 FastBCP secrets Kestra UI›Tenant›Secrets 1. Navigate to the Kestra UI 2. Go to **Tenant** → **Secrets** 3. Add your secrets with appropriate keys: * `FASTBCP_MSSQL_USER` * `FASTBCP_MSSQL_PASSWORD` * `FASTBCP_AWS_ACCESS_KEY_ID` * `FASTBCP_AWS_SECRET_ACCESS_KEY` * `FASTBCP_AWS_DEFAULT_REGION` ### Example with Secrets[​](#example-with-secrets "Direct link to Example with Secrets") ``` id: fastbcp_export_orders_s3_secret namespace: arpe.io tasks: - id: export_orders_parquet_to_s3 type: io.kestra.plugin.docker.Run containerImage: arpeio/fastbcp:latest host: "tcp://host.docker.internal:2375" env: AWS_ACCESS_KEY_ID: "{{ secret('FASTBCP_AWS_ACCESS_KEY_ID') }}" AWS_SECRET_ACCESS_KEY: "{{ secret('FASTBCP_AWS_SECRET_ACCESS_KEY') }}" AWS_DEFAULT_REGION: "{{ secret('FASTBCP_AWS_DEFAULT_REGION') }}" commands: - --connectiontype - mssql - --server - "host.docker.internal,11433" - --user - "{{ secret('FASTBCP_MSSQL_USER') }}" - --password - "{{ secret('FASTBCP_MSSQL_PASSWORD') }}" - --database - tpch10 - --sourceschema - dbo - --sourcetable - orders - --fileoutput - orders.parquet - --directory - s3://fastbcp-export/orders/parquet - --parallelmethod - Ntile - --paralleldegree - "12" - --distributekeycolumn - o_orderkey - --merge - "false" - --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 FastBCP 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 export process: * Configuration parameters * Connection details * Data export progress * Performance metrics Full log of an example execution ``` 2026-03-02T15:15:37.882 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- The "FastBCP_Settings.json" file does not exist. Using default settings. Console Only with loglevel=Information 2026-03-02 16:15:37.8922026-03-02T15:15:37.892 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- FastBCP Trial – will expires on "2026‑03‑27" (24 day(s) left). 2026-03-02 16:15:37.8922026-03-02T15:15:37.892 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Starting 2026-03-02 16:15:37.8932026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- FastBCP Version : "0.29.2.0" Architecture : "X64" - Framework : ".NET 8.0.24" 2026-03-02 16:15:37.8932026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Internal Trace ID : "5ccea857-1538-4a28-8b1c-cfe5c51fbd43" 2026-03-02 16:15:37.8932026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Internal Run ID : "5ccea857-1538-4a28-8b1c-cfe5c51fbd43" 2026-03-02 16:15:37.8932026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- OS : "Debian GNU/Linux 13 (trixie)" 2026-03-02 16:15:37.8932026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Connection Type : "mssql" 2026-03-02 16:15:37.8932026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Source SqlInstance : "sql22,1433" 2026-03-02 16:15:37.8932026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Source Database : "tpch" 2026-03-02 16:15:37.8932026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Source Schema : "tpch10" 2026-03-02 16:15:37.8932026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Source Table : "orders" 2026-03-02 16:15:37.8932026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Trusted Connection : False 2026-03-02 16:15:37.8932026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- User : "migadmin" 2026-03-02 16:15:37.8932026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Output File : "orders.parquet" 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Output Directory : /data/parquet 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Degree : 12 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Distribute Method : "Ntile" 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Distribute Column : "o_orderkey" 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Decimal Separator : "," 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Delimiter : "|" 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Use quotes : False 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Date format: "yyyy-MM-dd" 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Encoding : "UTF-8" 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- No Header : False 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Timestamped : False 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Boolean Format : "automatic" 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Cloud Profile : "" 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Application Intent : "ReadOnly" 2026-03-02 16:15:37.9062026-03-02T15:15:37.906 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- file extension is ".parquet" 2026-03-02 16:15:37.9092026-03-02T15:15:37.909 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Encoding used : Unicode (UTF-8) - 65001 - utf-8 2026-03-02 16:15:37.9652026-03-02T15:15:37.965 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- 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=FastBCP;Application Intent=ReadOnly" 2026-03-02 16:15:38.0862026-03-02T15:15:38.086 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- 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 16:15:38.1102026-03-02T15:15:38.110 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Get DataTypes with header end : Elapsed=6 ms 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Data Segments Computation Completed in 260 ms 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Distribute Column Type : "Int32" 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 0 : 1 : 1 - 5000001 or "o_orderkey" is null 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 1 : 2 : 5000002 - 10000002 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 2 : 3 : 10000003 - 15000003 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 3 : 4 : 15000004 - 20000004 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 4 : 5 : 20000005 - 25000005 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 5 : 6 : 25000006 - 30000006 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 6 : 7 : 30000007 - 35000007 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 7 : 8 : 35000032 - 40000032 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 8 : 9 : 40000033 - 45000033 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 9 : 10 : 45000034 - 50000034 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 10 : 11 : 50000035 - 55000035 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 11 : 12 : 55000036 - 60000000 2026-03-02 16:15:46.6112026-03-02T15:15:46.611 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 002 for o_orderkey between 10000003 and 15000003 into /data/parquet/orders_chunk_002.parquet : 1250001 rows x 9 columns in 8234ms 2026-03-02 16:15:46.6112026-03-02T15:15:46.611 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 011 for o_orderkey between 55000036 and 60000000 into /data/parquet/orders_chunk_011.parquet : 1249989 rows x 9 columns in 8234ms 2026-03-02 16:15:46.7902026-03-02T15:15:46.790 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 003 for o_orderkey between 15000004 and 20000004 into /data/parquet/orders_chunk_003.parquet : 1250001 rows x 9 columns in 8413ms 2026-03-02 16:15:46.7972026-03-02T15:15:46.797 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 005 for o_orderkey between 25000006 and 30000006 into /data/parquet/orders_chunk_005.parquet : 1250001 rows x 9 columns in 8420ms 2026-03-02 16:15:46.9362026-03-02T15:15:46.936 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 008 for o_orderkey between 40000033 and 45000033 into /data/parquet/orders_chunk_008.parquet : 1250001 rows x 9 columns in 8559ms 2026-03-02 16:15:47.1392026-03-02T15:15:47.139 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 010 for o_orderkey between 50000035 and 55000035 into /data/parquet/orders_chunk_010.parquet : 1250001 rows x 9 columns in 8763ms 2026-03-02 16:15:47.1542026-03-02T15:15:47.154 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 000 for o_orderkey between 1 and 5000001 into /data/parquet/orders_chunk_000.parquet : 1250001 rows x 9 columns in 8777ms 2026-03-02 16:15:47.2472026-03-02T15:15:47.247 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 009 for o_orderkey between 45000034 and 50000034 into /data/parquet/orders_chunk_009.parquet : 1250001 rows x 9 columns in 8870ms 2026-03-02 16:15:47.3082026-03-02T15:15:47.308 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 006 for o_orderkey between 30000007 and 35000007 into /data/parquet/orders_chunk_006.parquet : 1250001 rows x 9 columns in 8931ms 2026-03-02 16:15:47.3092026-03-02T15:15:47.309 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 001 for o_orderkey between 5000002 and 10000002 into /data/parquet/orders_chunk_001.parquet : 1250001 rows x 9 columns in 8932ms 2026-03-02 16:15:47.3632026-03-02T15:15:47.363 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 007 for o_orderkey between 35000032 and 40000032 into /data/parquet/orders_chunk_007.parquet : 1250001 rows x 9 columns in 8986ms 2026-03-02 16:15:47.3662026-03-02T15:15:47.366 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 004 for o_orderkey between 20000005 and 25000005 into /data/parquet/orders_chunk_004.parquet : 1250001 rows x 9 columns in 8989ms 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- files generation end : Elapsed=9257 ms - maxdop=12 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total data rows : 15000000 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total data columns : 9 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total cells : 135000000 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Throughput rows : 1568531 rows/s 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Throughput cells : 14116787 cells/s 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total time : Elapsed=9563 ms 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total data rows : 15000000 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total data columns : 9 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total cells : 135000000 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Final Throughput rows : 1568482 rows/s 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Final Throughput cells : 14116346 cells/s 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Completed Load ``` ## Related pages[​](#related-pages "Direct link to Related pages") Related pages * [Docker](/1.6/integration/docker-integration.md)the FastBCP image, its volumes and logging settings * [Apache Airflow](/1.6/integration/airflow-integration.md)run the same image from an Airflow DAG * [Cloud connectivity](/1.6/documentation/cloud-connectivity/overview.md)credentials for S3, Azure, GCS and OneLake --- # PostgreSQL The **pg\_fastbcp** extension allows you to run the FastBCP tool directly from an SQL function, enabling fast data export from databases to various formats (CSV, Parquet) and cloud storage directly from PostgreSQL. ## Extension Overview[​](#extension-overview "Direct link to Extension Overview") | Item | Value | | ------------------ | ------------------------------------------------------------ | | **Repository** | [arpe-io/pg\_fastbcp](https://github.com/arpe-io/pg_fastbcp) | | **License** | MIT | | **Latest version** | v0.30.0 | | **Platforms** | Linux (Debian/Ubuntu) and Windows | ![pg\_fastbcp Demo](/assets/images/pg_fastbcp-e5e0b5519f8de77a14a8f8cba33d251c.gif) ## Features[​](#features "Direct link to Features") * Native PostgreSQL IntegrationExecute FastBCP commands directly from SQL * Secure Password ManagementBuilt-in encryption for sensitive credentials * Detailed Result ReturnGet export statistics and performance metrics as SQL results * Cross-PlatformAvailable for both Linux and Windows environments * Flexible ConfigurationSupport for all FastBCP parameters * Multiple Output FormatsExport to CSV, Parquet, or directly to cloud storage (AWS S3, Azure Blob, Google Cloud Storage, OneLake) ## 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 FastBCP license Request a trial license. * [Trial license](https://arpe.io/get-trial?product=FastBCP) 4. FastBCP binaries FastBCP 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 `FastBCP` 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\_fastbcp releases page](https://github.com/arpe-io/pg_fastbcp/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_fastbcp.so`, `pg_fastbcp.control`, `pg_fastbcp--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_fastbcp.so /usr/lib/postgresql//lib/ sudo cp pg_fastbcp.control pg_fastbcp--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 FastBCP binary sudo chmod +x /path/to/FastBCP sudo chown postgres:postgres /path/to/FastBCP sudo chmod 750 /path/to/FastBCP # 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_fastbcp.dll`, `pg_fastbcp.control`, `pg_fastbcp--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_fastbcp.dll` file into the `lib` folder 4. Copy the `pg_fastbcp.control` and `pg_fastbcp--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 `FastBCP.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_fastbcp CASCADE; ``` ### Create the extension[​](#create-the-extension "Direct link to Create the extension") ``` CREATE EXTENSION pg_fastbcp CASCADE; ``` ## Functions[​](#functions "Direct link to Functions") ### pg\_fastbcp\_encrypt[​](#pg_fastbcp_encrypt "Direct link to pg_fastbcp_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_RunFastBcp_secure` function will automatically decrypt any values passed to its `password` argument. **Syntax:** ``` pg_fastbcp_encrypt(text_to_encrypt text) RETURNS text ``` **Example:** ``` SELECT pg_fastbcp_encrypt('MySecurePassword'); -- Returns: A base64-encoded encrypted string, e.g., "PgP...base64encodedstring==" ``` ### xp\_RunFastBcp\_secure[​](#xp_runfastbcp_secure "Direct link to xp_RunFastBcp_secure") This is the main function to execute the FastBCP tool. It takes various parameters to configure the data export operation. Password arguments (`password`) will be automatically decrypted. **Syntax:** ``` xp_RunFastBcp_secure( connectiontype text DEFAULT NULL, sourceconnectstring text DEFAULT NULL, dsn text DEFAULT NULL, provider text DEFAULT NULL, server text DEFAULT NULL, user_ text DEFAULT NULL, password text DEFAULT NULL, trusted boolean DEFAULT NULL, database_name text DEFAULT NULL, applicationintent text DEFAULT NULL, fileinput text DEFAULT NULL, query text DEFAULT NULL, sourceschema text DEFAULT NULL, sourcetable text DEFAULT NULL, fileoutput text DEFAULT NULL, directory text DEFAULT NULL, timestamped boolean DEFAULT NULL, encoding text DEFAULT NULL, delimiter text DEFAULT NULL, usequotes boolean DEFAULT NULL, dateformat text DEFAULT NULL, decimalseparator text DEFAULT NULL, boolformat text DEFAULT NULL, noheader boolean DEFAULT NULL, parquetcompression text DEFAULT NULL, cloudprofile text DEFAULT NULL, parallelmethod text DEFAULT NULL, paralleldegree integer DEFAULT NULL, distributekeycolumn text DEFAULT NULL, datadrivenquery text DEFAULT NULL, merge boolean DEFAULT NULL, loglevel text DEFAULT NULL, runid text DEFAULT NULL, settingsfile text DEFAULT NULL, config text DEFAULT NULL, nobanner boolean DEFAULT NULL, license text DEFAULT NULL, fastbcp_path text DEFAULT NULL ) RETURNS TABLE ( exit_code integer, output text, total_rows bigint, total_columns integer, total_time bigint ) ``` ## Usage Examples[​](#usage-examples "Direct link to Usage Examples") ### Linux Example - PostgreSQL to CSV[​](#linux-example---postgresql-to-csv "Direct link to Linux Example - PostgreSQL to CSV") Export data from PostgreSQL to CSV files: ``` SELECT * FROM xp_RunFastBcp_secure( connectiontype := 'pgsql', server := 'localhost:5432', user_ := 'postgres', password := pg_fastbcp_encrypt('MyActualPassword'), database_name := 'tpch', sourceschema := 'tpch_1', sourcetable := 'orders', fileoutput := 'orders.csv', directory := '/tmp/export', paralleldegree := 4, parallelmethod := 'Ntile', distributekeycolumn := 'o_orderkey', noheader := false, delimiter := ',', license := '/tmp/FastBCP_linux-x64_v0.30.0/FastBCP.lic', loglevel := 'information', nobanner := false, fastbcp_path := '/tmp/FastBCP_linux-x64_v0.30.0' ); ``` ## 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 FastBCP process. `output`text The full log output from the FastBCP tool. `total_rows`bigint The total number of rows transferred. `total_columns`integer The total number of columns transferred. `total_time`bigint The total execution time in milliseconds. ## Output[​](#output "Direct link to Output") You can view the full FastBCP output using the `output` column returned by the function. ## Resources[​](#resources "Direct link to Resources") Resources * [pg\_​fastbcp GitHub Repository](https://github.com/arpe-io/pg_fastbcp) * [pg\_​fastbcp releases](https://github.com/arpe-io/pg_fastbcp/releases)download the extension * [Get a Trial License](https://arpe.io/get-trial?product=FastBCP) * [Report Issues](https://github.com/arpe-io/pg_fastbcp/issues) --- # Release Notes 0.32 ## New Features[​](#new-features "Direct link to New Features") ### OpenTelemetry Support[​](#opentelemetry-support "Direct link to OpenTelemetry Support") FastBCP now supports [OpenTelemetry](https://opentelemetry.io/) for distributed tracing and log correlation. **New parameter:** * `--traceparent`: Accept a [W3C Trace Context](https://www.w3.org/TR/trace-context/) traceparent identifier from an external caller, enabling end-to-end trace correlation across distributed systems. **OpenTelemetry log export:** * Logs can be exported to any OpenTelemetry-compatible collector (e.g., Jaeger, Zipkin, Grafana Tempo) via the Serilog OpenTelemetry sink. * Configuration through environment variables or the `FastBCP_Settings.json` file. See the [OpenTelemetry logging documentation](/1.6/documentation/logging/OpenTelemetry.md) for setup details and examples. ### Gzip Compression[​](#gzip-compression "Direct link to Gzip Compression") **Streamed gzip compression** is now possible by adding `.gz` to file extension. For csv, tsv and json only. * use `--fileoutput file.csv.gz` ### BREAKING CHANGE[​](#breaking-change "Direct link to BREAKING CHANGE") * `--merge` default is Switched from `true` to `false` ### Others[​](#others "Direct link to Others") * Better datatypes coverage for csv and json --- # Release Notes 1.0 ## What's Changed[​](#whats-changed "Direct link to What's Changed") ### ADBC Parquet Export - 2x Faster Performance[​](#adbc-parquet-export---2x-faster-performance "Direct link to ADBC Parquet Export - 2x Faster Performance") FastBCP now supports ADBC (Arrow Database Connectivity) for Parquet exports via the `--connectiontype adbc_mssql` connector, powered by ArrowTDS. **Performance improvements:** * 2x faster Parquet generation compared to traditional methods * Native columnar data format (Arrow) eliminates conversion overhead * Optimized for SQL Server data types **Usage:** ``` fastbcp --server myserver.database.windows.net \ --database MyDatabase \ --query "SELECT * FROM Sales.Orders" \ --connectiontype adbc_mssql \ --fileoutput "orders.parquet" ``` See [Connection Parameters documentation](/1.6/documentation/cli/connection_parameters.md#connection-type) for more details. ### Buffered Cloud Uploads[​](#buffered-cloud-uploads "Direct link to Buffered Cloud Uploads") New environment variables enable buffered cloud uploads for significantly improved Azure Data Lake Storage and OneLake performance. **New environment variables:** * `FASTBCP_CLOUD_ISBUFFERED`: When `True`, ADLS/OneLake writes are buffered to a local temp file, then uploaded in parallel. When `False`, data is streamed directly to the cloud. * `FASTBCP_TMPPATH`: Base directory for temporary files created during buffered cloud uploads. Default: System temp (`%TEMP%` / `$TMPDIR`). * `FASTBCP_CLOUD_MAXUPLOADTHREAD_PER_STREAM`: Maximum number of parallel upload threads per cloud stream. Default: `8` if `parallelmethod=None`, `2` otherwise. * `FASTBCP_UID_STRING_CASING`: Controls UID-to-string casing. Values: `lower` or `upper`. Default: `lower` (RFC 4122). **Example — Buffered cloud uploads:** ``` # Enable buffered uploads for Azure $env:FASTBCP_CLOUD_ISBUFFERED = "True" $env:FASTBCP_TMPPATH = "D:\temp\fastbcp" fastbcp --server myserver --database MyDB --sourceschema Sales --sourcetable Orders ` --fileoutput "abfss://container@storage.dfs.core.windows.net/orders.parquet" ``` **Example — UID string casing (PowerShell):** ``` # Output UIDs in uppercase $env:FASTBCP_UID_STRING_CASING = "upper" fastbcp --server myserver --database MyDB --sourcetable MyTable --fileoutput "output.parquet" ``` **Example — UID string casing (Linux):** ``` # Output UIDs in uppercase export FASTBCP_UID_STRING_CASING=upper fastbcp --server myserver --database MyDB --sourcetable MyTable --fileoutput "output.parquet" ``` See the [Environment Variables](/1.6/documentation/environment-variables/overview.md) documentation for detailed configuration. ### Move to .NET 10[​](#move-to-net-10 "Direct link to Move to .NET 10") FastBCP now runs on .NET 10: * Performance improvements in runtime and GC * Enhanced security and stability * Continued long-term support * Compatibility: Windows, Linux, macOS (x64, ARM64) ### Improved SBOM Generation[​](#improved-sbom-generation "Direct link to Improved SBOM Generation") Enhanced Software Bill of Materials (SBOM) generation for better supply chain security and compliance. ### SLSA Build Provenance[​](#slsa-build-provenance "Direct link to SLSA Build Provenance") Added SLSA (Supply-chain Levels for Software Artifacts) build provenance in CI for enhanced supply chain security and compliance. ### Early Cleanup of Temp Files[​](#early-cleanup-of-temp-files "Direct link to Early Cleanup of Temp Files") When uploading to cloud storage, temporary files are now cleaned up earlier in the process to reduce disk space requirements. ## ArrowTDS ARPE.IO Driver[​](#arrowtds-arpeio-driver "Direct link to ArrowTDS ARPE.IO Driver") FastBCP 1.0 includes the ArrowTDS ARPE.IO driver for high-performance ADBC connectivity. **Key features:** * TDS 7.4 protocol compatibility * Native Arrow columnar format support * Optimized for SQL Server 2012 and later --- # Release Notes 1.1 ## What's Changed[​](#whats-changed "Direct link to What's Changed") ### ADBC PostgreSQL — Arpe.io ADBC FastDriver[​](#adbc-postgresql--arpeio-adbc-fastdriver "Direct link to ADBC PostgreSQL — Arpe.io ADBC FastDriver") FastBCP now supports ADBC for PostgreSQL via the `--connectiontype adbc_pgsql` connector, powered by the new ADBC Arrow\_FEBE drivers (Arpe.io ADBC FastDriver). **Key highlights:** * Ultra-fast Parquet exports from PostgreSQL * Native Arrow columnar format eliminates conversion overhead * Same high-performance ADBC approach as the existing `adbc_mssql` connector **Usage:** ``` fastbcp --server pg-server:5432 \ --database MyDatabase \ --query "SELECT * FROM public.orders" \ --connectiontype adbc_pgsql \ --fileoutput "orders.parquet" ``` See [Connection Parameters documentation](/1.6/documentation/cli/connection_parameters.md#connection-type) for more details. ### \[Breaking] New Default Date Format[​](#breaking-new-default-date-format "Direct link to \[Breaking] New Default Date Format") The default `--dateformat` value for CSV, JSON, and XLSX outputs has changed from `yyyy-MM-dd` to `yyyy-MM-dd HH:mm:sszzz`. **Auto-adaptive behavior:** The format automatically adapts based on the column type: * **Date-only** columns remain formatted as `yyyy-MM-dd` * **Timestamp/DateTime** columns are formatted as `yyyy-MM-dd HH:mm:ss` even if a timezone token (`zzz`) is in the format string * **DateTimeOffset** columns include the full timezone offset This change also fixes date-only format handling and adds timezone support for CSV date formatting. **Migration:** If your pipeline depends on the previous default (`yyyy-MM-dd`), explicitly set `--dateformat "yyyy-MM-dd"` in your command. ### New Boolean Format Values[​](#new-boolean-format-values "Direct link to New Boolean Format Values") The `--boolformat` parameter now supports additional formats: | Format | Example output | | ------------ | --------------- | | `True/False` | `True`, `False` | | `yes/no` | `yes`, `no` | | `y/n` | `y`, `n` | These are in addition to the existing `true/false`, `t/f`, and `1/0` formats. **Example:** ``` fastbcp --server myserver \ --database MyDatabase \ --query "SELECT * FROM products" \ --fileoutput "products.csv" \ --boolformat "True/False" ``` ### Environment Variables Guardrails[​](#environment-variables-guardrails "Direct link to Environment Variables Guardrails") Security hardening of environment variable handling (internal improvement), with no user-facing impact. --- # Release Notes 1.2 ## What's Changed[​](#whats-changed "Direct link to What's Changed") ### ADBC Oracle — Arpe.io ADBC FastDriver[​](#adbc-oracle--arpeio-adbc-fastdriver "Direct link to ADBC Oracle — Arpe.io ADBC FastDriver") FastBCP now supports ADBC for Oracle via the `--connectiontype adbc_oracle` connector, powered by the new ADBC Arrow\_TTC driver (Arpe.io ADBC FastDriver). It speaks Oracle's TNS/TTC wire protocol natively — no Oracle Client / Instant Client required. **Key highlights:** * Ultra-fast Parquet exports from Oracle * Native Arrow columnar format eliminates conversion overhead * Same high-performance ADBC approach as the existing `adbc_mssql` and `adbc_pgsql` connectors * EZConnect source syntax (`host[:port]/service`) * Supports the `Rowid` parallel method for parallel extraction, in addition to `oraodp` * Parquet is the only supported output format for this connector See [Connection Parameters documentation](/1.6/documentation/cli/connection_parameters.md#connection-type) for more details. ### New Environment Variables[​](#new-environment-variables "Direct link to New Environment Variables") Added three new environment variables: * `FASTBCP_ADBC_BATCHCELLS`: controls the size (in cells, i.e. rows × columns) of the Arrow record batches fetched by the ADBC connectors (`adbc_mssql`, `adbc_pgsql`). **Default:** `500000` (500,000 cells). Sizing by cell count keeps batch memory usage predictable across tables of different widths. See the [FASTBCP\_ADBC\_BATCHCELLS documentation](/1.6/documentation/environment-variables/fastbcp-adbc-batchcells.md) for details. * `FASTBCP_SYSTEMINFO_COLLECT`: collects system information (CPU, memory, OS, etc.) while a run is in progress. **Disabled by default.** See the [FASTBCP\_SYSTEMINFO\_COLLECT documentation](/1.6/documentation/environment-variables/fastbcp-systeminfo-collect.md) for details. * `FASTBCP_PERFORMANCE_COLLECT`: collects performance information (CPU usage, memory usage, etc.) while a run is in progress. **Disabled by default.** See the [FASTBCP\_PERFORMANCE\_COLLECT documentation](/1.6/documentation/environment-variables/fastbcp-performance-collect.md) for details. To enable system and performance diagnostics collection: * Windows * Linux ``` $env:FASTBCP_SYSTEMINFO_COLLECT = $True $env:FASTBCP_PERFORMANCE_COLLECT = $True ``` ``` export FASTBCP_SYSTEMINFO_COLLECT=True export FASTBCP_PERFORMANCE_COLLECT=True ``` ## Bug Fixes[​](#bug-fixes "Direct link to Bug Fixes") ### ODBC with DSN — Login/Password Authentication[​](#odbc-with-dsn--loginpassword-authentication "Direct link to ODBC with DSN — Login/Password Authentication") Fixed an issue where the `odbc` connection type with a DSN (`--dsn`) only worked with integrated (Windows/trusted) authentication. Providing explicit `--user` / `--password` credentials had no effect and the connection silently fell back to integrated authentication. DSN connections now correctly authenticate with the supplied login/password. ### ADBC MSSQL — Column Limit Raised[​](#adbc-mssql--column-limit-raised "Direct link to ADBC MSSQL — Column Limit Raised") Fixed a limitation in the `adbc_mssql` connector that restricted exports to tables with fewer than 256 columns. The limit has been raised to support standard tables with up to 1024 columns. --- # Release Notes 1.3 ## New Features[​](#new-features "Direct link to New Features") ### ADBC Netezza — `--connectiontype adbc_netezza`[​](#adbc-netezza----connectiontype-adbc_netezza "Direct link to adbc-netezza----connectiontype-adbc_netezza") FastBCP now supports Netezza / IBM NPS through the embedded **ArpeNetezza** ADBC driver, via the new `--connectiontype adbc_netezza` connection type. The driver is used for both the metadata step and the data step. **Key highlights:** * No NZdotNET installation needed * Works with **IBM Cloud NPS** * Parquet output only, like the other `adbc_*` connection types * Supported parallel methods: `None`, `NZDataSlice`, `Ntile`, `Random`, `RangeId` and `DataDriven` * `Application Name` defaults to `FastBCP` * NPS 7.x: TLS 1.0/1.1 supported (`tls_min_version=1.0`, ArpeNetezza 0.3.2) **Connection string keys:** `--sourceconnectstring` keys no longer need the `adbc.arpenz.` prefix. The following are all accepted: * Friendly / ADO.NET keys: `Server`, `Host`, `host:port`, `Port`, `Database`, `User ID`, `Password`, `SSL Mode`, `Application Name`, … * Plain driver keys: `sslmode`, `tls_min_version`, `char_encoding`, `login_timeout`, … * `uri` and `connection_string` Keys the driver does not support (e.g. `propagate`, `Pooling`) are ignored, with a single warning. * Windows * Linux ``` .\FastBCP.exe ` --connectiontype adbc_netezza ` --sourceconnectstring "Server=nps-host;Port=5480;Database=SALES;User ID=admin;Password=FastPassword" ` --sourceschema "ADMIN" ` --sourcetable "ORDERS" ` --directory "D:\export\orders" ` --fileoutput "orders.parquet" ` --parallelmethod NZDataSlice ` --paralleldegree 8 ``` ``` ./FastBCP \ --connectiontype adbc_netezza \ --sourceconnectstring "Server=nps-host;Port=5480;Database=SALES;User ID=admin;Password=FastPassword" \ --sourceschema "ADMIN" \ --sourcetable "ORDERS" \ --directory "/data/export/orders" \ --fileoutput "orders.parquet" \ --parallelmethod NZDataSlice \ --paralleldegree 8 ``` NPS 7 pre-releases Files exported from NPS 7 with the pre-releases `v1.3.0-netezza.1` / `v1.3.0-netezza.2` may contain wrong values in `NUMERIC` columns. This is fixed in ArpeNetezza 0.3.3, shipped with FastBCP 1.3. Re-export the affected tables. See [Connection Parameters](/1.6/documentation/cli/connection_parameters.md#connection-type) for more details. ### New Parallel Method — `DBPartition`[​](#new-parallel-method--dbpartition "Direct link to new-parallel-method--dbpartition") The new `--parallelmethod DBPartition` parallel method runs one extraction per native partition / subpartition of the source table. **Supported sources:** | Source | Partitioning used | | ---------- | --------------------------------------------- | | SQL Server | `$PARTITION` | | PostgreSQL | Leaf tables | | Oracle | `PARTITION (...)` | | MySQL | `PARTITION (...)` | | Teradata | Row partitioning, single- and multi-level PPI | The `adbc_*` counterparts are supported too. * Requires `--sourceschema` and `--sourcetable`. * Falls back to `None`, with a warning, when the table is not partitioned, has a single partition, or the source is not supported. * Optimised partition scheduling (internal improvement). * `FASTBCP_DOP_EQUERY` also applies to `DBPartition`. The output layout is controlled by the new [`FASTBCP_DBPARTITION_TARGET_MODE`](/1.6/documentation/environment-variables/fastbcp-dbpartition-target-mode.md) environment variable: | Value | Output layout | | ----------------- | --------------------------------------------------------------------------------------------------------------------- | | `CHUNK` (default) | `_chunk_NNN.` | | `HIVE` | `partition=

/[subpartition=/].` (SQL Server uses `bounds=_`, Teradata `L1=/L2=`) | `--merge` works in both modes. See [Parallel Parameters](/1.6/documentation/cli/parallel_parameters.md#available-methods) for more details. ### Azure Blob Storage — Authentication and Container Access[​](#azure-blob-storage--authentication-and-container-access "Direct link to Azure Blob Storage — Authentication and Container Access") For direct commit to Azure Blob Storage: * **Authentication:** besides `DefaultAzureCredential` (still the fallback), FastBCP now accepts `AZURE_STORAGE_CONNECTION_STRING` or `AZURE_STORAGE_SAS_URL`. The selected authentication method is logged. * **Container access:** a missing *create* permission on the container (HTTP 403/409) is tolerated when the container already exists. 403 errors now give a clearer message (firewall, RBAC or SAS permissions). See [Azure Configuration](/1.6/documentation/cloud-connectivity/azure.md#authentication-methods) for more details. ### ADBC Connectors Improvements[​](#adbc-connectors-improvements "Direct link to ADBC Connectors Improvements") * **`--applicationintent` with `--connectiontype adbc_mssql`:** `--applicationintent` (default `ReadOnly`) and an `ApplicationIntent` key in `--sourceconnectstring` now reach the ArpeMSSQL driver. An Availability Group listener with read-only routing sends the export to a readable secondary, as with `--connectiontype mssql`. * **`--connectiontype adbc_pgsql` honours the libpq environment:** `PGUSER`, `PGPASSWORD`, `PGPASSFILE` / `~/.pgpass` and `PGSSLROOTCERT` are used when `--user` / `--password` / `--sourceconnectstring` do not provide them, like `--connectiontype pgsql` (ArpePGSQL 0.4.5). * **`--connectiontype adbc_oracle` resolves TNS aliases** through `tnsnames.ora` (`TNS_ADMIN`, `$ORACLE_HOME/network/admin`), like `--connectiontype oraodp` (ArpeOracle 0.3.11). ## Behaviour Changes[​](#behaviour-changes "Direct link to Behaviour Changes") ### `adbc_mssql` / `adbc_pgsql` / `adbc_oracle` Run Fully on ADBC[​](#adbc_mssql--adbc_pgsql--adbc_oracle-run-fully-on-adbc "Direct link to adbc_mssql--adbc_pgsql--adbc_oracle-run-fully-on-adbc") The metadata and planning step (row counts, column types, `Ntile`, `Random`, `Timepartition`, `DBPartition`, …) now runs on the ADBC driver instead of SqlClient, Npgsql or ODP.NET. A single connection string is used for both steps. * `--sourceconnectstring` accepts the native syntax, explicit `adbc.*` / `arpeio.*` keys (they win over translated keys), or a whole-connection `uri` / `adbc..connection_string`. * Native keys with no driver equivalent (e.g. `Pooling=false`) are dropped with a warning. With a whole-connection `uri` / `connection_string`, native keys are dropped with a warning saying to put them inside the URI / connection string. * A `Driver=` path in `--sourceconnectstring` is used by both steps. ### Oracle Network Encryption with `--connectiontype adbc_oracle`[​](#oracle-network-encryption-with---connectiontype-adbc_oracle "Direct link to oracle-network-encryption-with---connectiontype-adbc_oracle") FastBCP now sends `encryption=accepted` and `data_integrity=accepted`, so the server decides, as with `--connectiontype oraodp`. `FASTBCP_ADBC_ENCRYPTION` / `FASTBCP_ADBC_DATA_INTEGRITY` or explicit keys still override this. ### `--connectiontype adbc_pgsql` NUMERIC NaN[​](#--connectiontype-adbc_pgsql-numeric-nan "Direct link to --connectiontype-adbc_pgsql-numeric-nan") A `NaN` in a decimal column now fails the read instead of becoming `NULL`. Set `adbc.arpepgsql.numeric_special=null` in `--sourceconnectstring` to keep the previous behaviour (ArpePGSQL 0.4.2+). ### `adbc_oracle` DataDriven Keys[​](#adbc_oracle-datadriven-keys "Direct link to adbc_oracle-datadriven-keys") A scale-0 `NUMBER(<=18)` key is now treated as an integer, as with `--connectiontype oraodp`, so predicates and Hive paths are identical between both connection types. ### `NZDataSlice` Scheduling[​](#nzdataslice-scheduling "Direct link to nzdataslice-scheduling") Faster on uneven slices (internal improvement). After the first failure, no new slice starts. Output files are unchanged. ## Bug Fixes[​](#bug-fixes "Direct link to Bug Fixes") * **Ntile lost rows** (pre-existing): rows could be missing from the export in some cases; on Oracle, string keys failed. Fixed (internal improvement). * **Passwords in logs:** quoted passwords containing `;` (e.g. `Password="p;w=1"`) are now fully masked in logs and telemetry, for every connection type. * **`--connectiontype adbc_mssql` with a named instance:** `host\INSTANCE` connected to the instance on port 1433 instead of resolving the named instance through the SQL Server Browser. * **Oracle TNS alias with `--user` / `--password`:** `--connectiontype oraodp --server ALIAS --user u --password p` failed with `ORA-50008: 'USERNAME' is an invalid connection string attribute` (same for `adbc_oracle`). * **`--connectiontype nzoledb`** connection type fixed (internal improvement). * **`--connectiontype nzcopy --parallelmethod Timepartition`** generated invalid SQL for Netezza. Fixed (internal improvement). * **`NZDataSlice` with `--timestamped`:** all chunks of one export now share the same timestamp prefix (long exports were split across several prefixes). * **`NZDataSlice`** log message fix. ## Documentation[​](#documentation "Direct link to Documentation") * [AWS S3](/1.6/documentation/cloud-connectivity/aws-s3.md#required-permissions): IAM roles / policies needed by FastBCP and SSE-KMS support. * [FASTBCP\_DBPARTITION\_TARGET\_MODE](/1.6/documentation/environment-variables/fastbcp-dbpartition-target-mode.md): new environment variable. * [Connection Parameters](/1.6/documentation/cli/connection_parameters.md#connection-type): `adbc_netezza` connection type. --- # Release Notes 1.4 **One parallel method to rule them all.** FastBCP 1.4 picks the fastest physical split for your engine on its own, brings Teradata to the high-performance ADBC family, and makes SQL Server parallel exports up to 2.6× faster. 1 parallel method, 4 engines `Physical` resolves to Ctid, Rowid, Physloc or NZDataSlice from the connection type. 2.6× faster Physloc exports At degree 8 on a 60M-row SQL Server heap, the export went from 126 s to 48 s. 0 Teradata client software The ADBC Teradata driver logs on over TLS by default, with no TTU to install. ## What's New: At a Glance[​](#whats-new-at-a-glance "Direct link to What's New: At a Glance") | | | | | - | ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ | | | **New parallel method** | [`--parallelmethod Physical`](#physical-one-parallel-method-for-every-engine): FastBCP picks the physical split of the source engine | | | **New source** | [`--connectiontype adbc_teradata`](#adbc-teradata----connectiontype-adbc_teradata): Teradata to Parquet through the embedded ArpeTeradata driver | | | **Faster exports** | `Physloc` 1.6× to 2.6× faster, better load balancing for `Timepartition` | | | **Data correctness** | Fixes for rows skipped or duplicated by `Ntile`, `Timepartition` and filters with `OR` — [see the fixes](#bug-fixes) | | | **Deprecations** | `Ctid`, `Rowid`, `Physloc` and `NZDataSlice` will be removed in 2.0 — [use `Physical`](#deprecations) | ## Physical: One Parallel Method for Every Engine[​](#physical-one-parallel-method-for-every-engine "Direct link to Physical: One Parallel Method for Every Engine") No more remembering which engine-specific method applies to which database. With `--parallelmethod Physical`, FastBCP splits the table on the physical row location of the source and picks the right strategy from the connection type. | Source | Connection types | Resolved strategy | | ---------- | -------------------------------------------- | ----------------- | | PostgreSQL | `pgsql`, `pgcopy`, `adbc_pgsql` | `Ctid` | | Oracle | `oraodp`, `adbc_oracle` | `Rowid` | | SQL Server | `mssql`, `msoledbsql`, `adbc_mssql` | `Physloc` | | Netezza | `nzsql`, `nzcopy`, `nzoledb`, `adbc_netezza` | `NZDataSlice` | * Windows * Linux ``` .\FastBCP.exe ` --connectiontype pgsql ` --server "localhost:5432" ` --database "tpch" ` --user "FastUser" ` --password "FastPassword" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --directory "D:\export\orders" ` --fileoutput "orders.parquet" ` --parallelmethod Physical ` --paralleldegree 8 ``` ``` ./FastBCP \ --connectiontype pgsql \ --server "localhost:5432" \ --database "tpch" \ --user "FastUser" \ --password "FastPassword" \ --sourceschema "tpch_10" \ --sourcetable "orders" \ --directory "/data/export/orders" \ --fileoutput "orders.parquet" \ --parallelmethod Physical \ --paralleldegree 8 ``` The resolved strategy is logged, and OpenTelemetry spans carry it in `fastbcp.method` (with `Physical` in the new `fastbcp.method.requested` tag): ``` Distribute Method : Physical (Ctid) ``` Good to know * `--sourceschema` and `--sourcetable` are required. `--query` can be added to filter the table (simple query with a `WHERE` clause). `--distributekeycolumn` is not used. * Any other source (`odbc`, `oledb`, `mysql`, `clickhouse`, `hana`, `teradata`, `adbc_teradata`) stops with an explicit error. With `odbc` and `oledb`, the error asks for a native connection type, because FastBCP cannot know which engine is behind the driver. **See also:** [Parallel Parameters](/1.6/documentation/cli/parallel_parameters.md#physical-method) ## ADBC Teradata — `--connectiontype adbc_teradata`[​](#adbc-teradata----connectiontype-adbc_teradata "Direct link to adbc-teradata----connectiontype-adbc_teradata") Teradata joins the high-performance ADBC family. The embedded **ArpeTeradata** driver handles both the metadata and the data steps with the Teradata SQL dialect — and by default it needs **no Teradata client software at all**. | | | Supported | | - | ----------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | **Platforms** | Windows x64 and Linux x64, **Parquet output only** (like every `adbc_*` connection type) | | | **Parallel methods** | Every method of `--connectiontype teradata`: `Random`, `Ntile`, `DataDriven`, `RangeId`, `Timepartition`, and `DBPartition` on PPI tables | | | **Connection** | `--server host[:port]` (legacy port, default `1025`), `--user`, `--password`, optional `--database` — or a `--sourceconnectstring` in the Teradata provider spelling (`Server`, `Port`, `Database`, `User Id`, `Password`, `SSL Mode`, `HTTPS Port`, `TMODE`, `TTU Path`, …). Explicit `adbc.arpeteradata.*` keys win | | | **TLS logon (default)** | `sslmode=prefer` uses TLS on the HTTPS port (443): **no Teradata client software needed** | | | **Legacy port** | When the server has no TLS, or with `SSL Mode=disable`, the driver uses the legacy port through your Teradata Tools and Utilities (TTU), on Linux and Windows | | | **Logon mechanisms** | `LDAP`, `JWT`, `KRB5` and `TDNEGO` (ArpeTeradata 0.3.4). `JWT` and Kerberos work over TLS, without TTU | Good to know * Trusted authentication (`--trusted`) is not supported. * **Finding TTU for the legacy port on Linux:** FastBCP looks in the new [`FASTBCP_TTU_PATH`](/1.6/documentation/environment-variables/fastbcp-ttu-path.md) environment variable, then in a `ttu` or `TeradataToolsAndUtilitiesBase` directory next to the FastBCP binary; otherwise the driver searches `ARPETERADATA_TTU_PATH`, `/opt/teradata/client` and the system library path. Teradata's TTU download can be [unpacked next to the binary without installing it](/1.6/documentation/environment-variables/fastbcp-ttu-path.md#using-teradatas-ttu-download-without-installing-it). FastBCP warns at startup when the TTU folder lacks `tdclientdir` or the ICU links, or when the client directory is not named after its version. * **On Windows**, the driver finds `wincli32.dll` itself (`ARPETERADATA_TTU_PATH`, its own directory, the registered TTU installation). - Windows - Linux ``` .\FastBCP.exe ` --connectiontype adbc_teradata ` --server "td-host" ` --database "TPCH" ` --user "FastUser" ` --password "FastPassword" ` --sourceschema "TPCH" ` --sourcetable "ORDERS" ` --directory "D:\export\orders" ` --fileoutput "orders.parquet" ` --parallelmethod Ntile ` --distributekeycolumn "o_orderkey" ` --paralleldegree 8 ``` ``` export FASTBCP_TTU_PATH=/opt/teradata/client/20.00 ./FastBCP \ --connectiontype adbc_teradata \ --server "td-host" \ --database "TPCH" \ --user "FastUser" \ --password "FastPassword" \ --sourceschema "TPCH" \ --sourcetable "ORDERS" \ --directory "/data/export/orders" \ --fileoutput "orders.parquet" \ --parallelmethod Ntile \ --distributekeycolumn "o_orderkey" \ --paralleldegree 8 ``` **See also:** [Connection Parameters](/1.6/documentation/cli/connection_parameters.md#adbc_teradata) ## Performance[​](#performance "Direct link to Performance") | | Before | 1.4 | | -------------------------------------------- | ------ | -------- | | `Physloc`, degree 8, 60M-row SQL Server heap | 126 s | **48 s** | * **`Physloc` is 1.6× to 2.6× faster at even degrees of parallelism**, thanks to the new [`Physloc` distribution](#physloc-distribution). * **`Timepartition` load balancing:** internal improvement. * **`Timepartition` with quoted or case-sensitive date columns:** columns such as `"OrderDate"` or `[OrderDate]` now work. ## Deprecations[​](#deprecations "Direct link to Deprecations") `Ctid`, `Rowid`, `Physloc` and `NZDataSlice` will be removed in FastBCP 2.0 Use `--parallelmethod Physical` instead: it resolves to the same strategy from the connection type. The old values are still accepted — FastBCP runs the export as before and logs a warning: ``` Parallel method Ctid is deprecated and will be removed in 2.0 ==> use --parallelmethod Physical ``` ## Behaviour Changes[​](#behaviour-changes "Direct link to Behaviour Changes") ### `Physloc` and `Rowid` Require `--sourceschema` and `--sourcetable`[​](#physloc-and-rowid-require---sourceschema-and---sourcetable "Direct link to physloc-and-rowid-require---sourceschema-and---sourcetable") Like `Ctid`, the `Physloc` and `Rowid` methods, used directly or through `Physical`, now require `--sourceschema` and `--sourcetable`. Without them, FastBCP stops at the parameter check: ``` ERROR in command line parameters : With Physical (Physloc) Method you must define source schema (--sourceschema) and source table (--sourcetable) ==> With Physical (Physloc) Method --sourceschema and --sourcetable are both mandatory ``` Before 1.4, `Rowid` crashed when they were missing. A `Physloc` export based on `--query` alone must now also give the schema and table. ### `Physloc` Distribution[​](#physloc-distribution "Direct link to physloc-distribution") `Physloc` now splits both rowstore and clustered columnstore tables into even chunks, whatever the degree of parallelism (internal improvement). A clustered columnstore is logged as `Physloc : .

is a clustered columnstore, splitting on the columnstore row id`. ### ArpeOracle 0.4.1 Security Defaults (`--connectiontype adbc_oracle`)[​](#arpeoracle-041-security-defaults---connectiontype-adbc_oracle "Direct link to arpeoracle-041-security-defaults---connectiontype-adbc_oracle") * TCPS now verifies the server certificate by default. * Kerberos no longer forwards the TGT unless `krb5_forward=true` is set, and requires mutual authentication. * Token and OAuth2 logons require TCPS. ### `--help`[​](#--help "Direct link to --help") * `-?, --help` is now listed in the usage. * `--help`, `/?` and `/help` now behave like `-?`: they print the usage only, without the banner, and exit with code `0`. Before, they printed the usage, then the banner and four `ERROR in command line parameters` lines, and exited with code `1`. ## Bug Fixes[​](#bug-fixes "Direct link to Bug Fixes") * **`Physloc` only parallelised with an odd `--paralleldegree`:** with a degree of 2, 4, 8 or 16, one chunk held every row and the other workers exported nothing; with 6 or 12, only three chunks got rows. Fixed by the new [`Physloc` distribution](#physloc-distribution): on rowstore tables, the chunks stay within 3% of even up to degree 192. * **`Random` and `Physloc` row counts:** the per-chunk log lines and the final `Total data rows` were wrong. Fixed (internal improvement). * **`Ntile` dropped rows with sub-millisecond timestamp keys:** this affected SQL Server `datetime2(4..7)`, PostgreSQL `timestamp` and Oracle `TIMESTAMP(4..9)`. Rows could be silently skipped; every row is now exported exactly once whatever its precision (internal improvement). A bucket whose minimum is `NULL` no longer throws, and numeric bounds no longer depend on the regional settings (no more `1,5` with `fr-FR`). * **Source filter with `OR`:** rows outside the source filter could be exported when the filter contained an `OR`, with every parallel method that rewrites the `WHERE` clause. Fixed (internal improvement). * **`Timepartition` skipped rows with a `NULL` date:** they are now exported to a `=NULL` directory. * **`Timepartition` with week granularity duplicated rows:** fixed on every engine (SQL Server, PostgreSQL, Netezza, MySQL, Oracle, SAP HANA, Teradata, ClickHouse) (internal improvement). * **`Performance Output Files Size` and `Disk Write Throughput` showed `unknown`** with `DataDriven`, `Timepartition` and `DBPartition`. The size now covers every file written by the run, and still ignores unrelated files already in the directory. ## Driver Improvements[​](#driver-improvements "Direct link to Driver Improvements") * **ArpeMSSQL 0.7.6** — reads `sql_variant` and the SQL Server 2025 `JSON` type; an unreadable column no longer drops the connection. * **ArpeTeradata 0.3.4** — new driver behind `--connectiontype adbc_teradata`. * **ArpeOracle 0.4.1** — stricter security defaults, see [above](#arpeoracle-041-security-defaults---connectiontype-adbc_oracle). ## Dependencies[​](#dependencies "Direct link to Dependencies") | Component | Version | | ---------------------------- | ----------------------------------------------------------------------------------------- | | .NET packages | 10.0.13 | | Microsoft.Data.SqlClient | 7.1.1 | | SAP HANA .NET driver | 2.30.27 (`Sap.Data.Hana.Net.v10.0`, native client libraries from SAP HANA Client 2.30.27) | | ArpeMSSQL ADBC driver | 0.7.6 | | ArpePGSQL ADBC driver | 0.4.7 | | ArpeOracle ADBC driver | 0.4.1 | | ArpeNetezza ADBC driver | 0.3.7 | | ArpeTeradata ADBC driver | 0.3.4 **(new)** | | AdbcFileExport | 0.5.4 | | AWSSDK.S3 | 4.0.104.4 | | Azure.Storage.Files.DataLake | 12.28.0 | ## Documentation[​](#documentation "Direct link to Documentation") * [Parallel Parameters](/1.6/documentation/cli/parallel_parameters.md#physical-method): `Physical` method, deprecation of `Ctid`, `Rowid`, `Physloc` and `NZDataSlice`. * [Connection Parameters](/1.6/documentation/cli/connection_parameters.md#adbc_teradata): `adbc_teradata` connection type. * [FASTBCP\_TTU\_PATH](/1.6/documentation/environment-variables/fastbcp-ttu-path.md): new environment variable. * [Examples](/1.6/documentation/examples/sql-server.md): the parallel examples use `Physical` for PostgreSQL, Oracle, SQL Server and Netezza; new Teradata examples in [Other Databases](/1.6/documentation/examples/other-databases.md#teradata). --- # Release Notes 1.5 **Your SQL Server backups are now a data source.** FastBCP 1.5 reads tables straight from `.bak` files and exports them to Parquet — no restore, no SQL Server instance, no extra disk space. 0 SQL Server instance needed Point FastBCP at a backup directory. No server to provision, no credentials, no restore window. 5 M rows/s from an uncompressed backup Faster than reading the live database: 1.5× `adbc_mssql`, 3.6× `mssql`. 128–256 MB per thread The backup is read in place, out of core, and never loaded in memory. ## What's New: At a Glance[​](#whats-new-at-a-glance "Direct link to What's New: At a Glance") | | | | | - | ------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | **New source** | [`--connectiontype backup_mssql`](#sql-server-backup-files----connectiontype-backup_mssql): export tables from SQL Server full backups (`.bak`), striped or not, compressed or not | | | **Doc Wizard** | `backup_mssql` in the ADBC connectors, and **→** to accept a suggested value | | | **Licence** | A licence file is now always required, the 30-day trial included — [see what changes](#licence) | | | **Faster drivers** | ArpeMSSQL 4-way parallel reads up to **2× faster**, faster Oracle `NUMBER` reads | ## SQL Server Backup Files — `--connectiontype backup_mssql`[​](#sql-server-backup-files----connectiontype-backup_mssql "Direct link to sql-server-backup-files----connectiontype-backup_mssql") Need the data of a production database for analytics, an audit or a migration, but don't want to touch the production server — or restore a multi-terabyte backup first? FastBCP now reads **full backups** directly through the embedded **ArpeMSBackup** ADBC driver. * **`--server`** is the **directory** holding the backups. * **`--database`** is the **backup file**, or a pattern matching it. * That's it: no user, no password, no SQL Server. - Windows - Linux ``` .\FastBCP.exe ` --connectiontype backup_mssql ` --server "D:\Backups\MSSQL" ` --database "tpch_full.bak" ` --sourceschema "dbo" ` --sourcetable "orders" ` --directory "D:\export\orders" ` --fileoutput "orders.parquet" ` --parallelmethod Physical ` --paralleldegree 8 ``` ``` ./FastBCP \ --connectiontype backup_mssql \ --server "/var/opt/mssql/backup" \ --database "tpch_*.bak" \ --sourceschema "dbo" \ --sourcetable "orders" \ --directory "/export/orders" \ --fileoutput "orders.parquet" \ --parallelmethod Physical \ --paralleldegree 8 ``` ### Faster Than the Live Database[​](#faster-than-the-live-database "Direct link to Faster Than the Live Database") FastBCP to Parquet, degree 8, TPC-H. | Table | Source | Throughput | | | -------------------------------------------- | ---------------------------------------- | ------------------ | - | | `orders` (15 M rows) | **`backup_mssql`**, uncompressed backup | **≈ 5 M rows/s** | | | | `backup_mssql`, MS\_XPRESS / ZSTD backup | 2.1 – 2.6 M rows/s | | | | `adbc_mssql` on the live database | 3.3 M rows/s | | | | `mssql` on the live database | 1.4 M rows/s | | | `lineitem` clustered columnstore (60 M rows) | **`backup_mssql`** | **2.8 M rows/s** | | | | `adbc_mssql` on the live database | 2.4 M rows/s | | ### What It Reads[​](#what-it-reads "Direct link to What It Reads") | | | Supported | | - | ------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | **SQL Server versions** | 2017, 2019, 2022 and 2025, on Windows or Linux | | | **Backup types** | Full and copy-only full backups, uncompressed or compressed with **MS\_XPRESS** or **ZSTD**, any `BLOCKSIZE` / `MAXTRANSFERSIZE` | | | **Striped backups** | `TO DISK = a, DISK = b, …`: a pattern (`--database "tpch_*.bak"`) or a `;`-separated list, in any order | | | **Several backups in one file** | `WITH NOINIT`: the last full backup of the file is read | | | **Database layout** | Several data files and filegroups | | | **Rowstore tables** | Heaps, clustered indexes, partitions, ROW / PAGE compression | | | **Columnstore tables** | Clustered columnstore, archive compression and open delta store included | | | **Data types** | Every SQL Server type: LOBs and row-overflow, `xml`, sparse columns, persisted computed columns, `sql_variant` (as text) — see the [datatypes mapping](/1.6/datatypes-conversion/mssql/backup-parquet.md) | Good to know * **Parquet output only**, on Windows x64 and Linux x64. * `--parallelmethod` accepts `None` and `Physical` (which resolves to the new **Pages** method). * `--query` accepts `SELECT * | col1, col2, … FROM [schema.]table`. * **Refused with a clear message:** TDE databases and encrypted backups (`WITH ENCRYPTION`), which cannot be read without the server certificate; files without a full backup; incomplete stripe sets or stripes from different backups. **See also:** [SQL Server backup files](/1.6/documentation/cli/connection_parameters.md#sql-server-backup-files-backup_mssql) · [Examples](/1.6/documentation/examples/sql-server.md#sql-server-backup-files-backup_mssql) ## Doc Wizard[​](#doc-wizard "Direct link to Doc Wizard") * The [Doc Wizard](/1.6/wizard.md) offers `backup_mssql` in the **ADBC (High Performance)** connectors. The server field becomes the backup directory (Windows or Linux path, following the chosen platform), the database field the backup file, and only `None` and `Physical` are offered as parallel methods. * **Type less:** in an empty field, the **→** (right arrow) key takes the suggested value. ## Licence[​](#licence "Direct link to Licence") Action required for trial users A licence file is now **always required**, including for the **free 30-day trial**: request your trial licence at [arpe.io](https://www.arpe.io). The build-date trial and the trial token embedded for the ADBC drivers are gone. `--help` and `--version` still run without a licence. * **Lookup order:** the default `FastBCP.lic` is searched in the **current directory**, then **next to the executable**. * **One file for everything:** a licence file can hold several blocks (FastBCP, ADBC drivers, other products) in any order. * **ADBC drivers:** the licence is passed to the drivers automatically (internal improvement). A driver licence of your own (`--sourceconnectstring`, `ARPEIO_ADBC_LICENCE` / `ARPEIO_ADBC_LICENCE_FILE`) wins, and a damaged ADBC block is reported as such. * **Exit code 99:** an `adbc_*` or `backup_mssql` run with no ADBC driver block (and no `ARPEIO_ADBC_LICENCE` / `ARPEIO_ADBC_LICENCE_FILE`) now stops with exit code **99** instead of falling back to a trial token. See [License](/1.6/documentation/cli/license.md). ## Driver Improvements[​](#driver-improvements "Direct link to Driver Improvements") * **ArpeMSSQL 0.7.8 — up to 2× faster parallel reads** on 4-way parallel exports (internal improvement). Also fixes a crash when the thread that loaded the driver exits. * **ArpeOracle 0.4.3** — faster `NUMBER` to float64 reads, and choice of the Native Network Encryption integrity algorithm with `adbc.arpeoracle.data_integrity_types`. * **ArpeTeradata 0.3.5** — `uri` and ADO.NET `connection_string` are parsed, like the other drivers. ## Dependencies[​](#dependencies "Direct link to Dependencies") | Component | Version | | ------------------------ | ------------------------------------- | | ArpeMSBackup ADBC driver | 0.1.6 **(new)** | | ArpeMSSQL ADBC driver | 0.7.8 | | ArpeOracle ADBC driver | 0.4.3 | | ArpeNetezza ADBC driver | 0.3.8 (no driver code change) | | ArpeTeradata ADBC driver | 0.3.5 | | AdbcFileExport | 0.5.5 (`arpemsbackup` driver profile) | The other components are unchanged since [1.4](/1.6/release-notes/release-notes-1.4.md#dependencies). ## Documentation[​](#documentation "Direct link to Documentation") * [Connection Parameters](/1.6/documentation/cli/connection_parameters.md#sql-server-backup-files-backup_mssql): `backup_mssql` connection type. * [Parallel Parameters](/1.6/documentation/cli/parallel_parameters.md#physical-method): `Physical` resolves to `Pages` on SQL Server backup files. * [Datatypes conversion](/1.6/datatypes-conversion/mssql/backup-parquet.md): SQL Server backup files → Parquet. * [Examples](/1.6/documentation/examples/sql-server.md#sql-server-backup-files-backup_mssql): exports from backup files, striped backups. * [License](/1.6/documentation/cli/license.md): lookup order, trial licence, exit codes. --- # Release Notes 1.6 **Your backups are data sources — and they are fast.** FastBCP 1.6 reads tables straight from **Oracle RMAN backup sets**, full and **incremental**, **encrypted SQL Server backups** and **SQL Server full and differential backups**, always at their latest version, exports SQL Server backups up to **2.8× faster**, and opens a backup it has already read in a few milliseconds. No restore, no database instance, no extra disk space. 0 Oracle instance needed Point FastBCP at the directory of the RMAN backup pieces. No database to restore, no credentials. 2.8× faster SQL Server backup exports 150 million rows from a compressed, striped backup to Parquet in 12 seconds. \~20 ms to open a backup again The next exports from the same SQL Server or Oracle backup start right away. 3× faster in scheduled tasks On Windows, a run without a window now gets the full speed of the CPU. ## What's New: At a Glance[​](#whats-new "Direct link to What's New: At a Glance") | | | | Since | | - | ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------- | | | **New source** | [`--connectiontype backup_rman`](#oracle-rman-backup-sets----connectiontype-backup_rman): export tables from Oracle RMAN backup sets, multi-piece or not, compressed or not | 1.6.0 | | | **Incremental RMAN backups** | [The latest version of a table](#incremental-rman-backups), from a level 0 and its incremental backups, levels 1 to 4, the whole table. [Read this before upgrading](#1-6-8) | 1.6.8 | | | **Differential backups** | [The latest version of a table](#differential-sql-server-backups), from a full backup and its differential, the whole table. [Read this before upgrading](#1-6-7) | 1.6.7 | | | **Encrypted backups** | [`WITH ENCRYPTION` and TDE databases](#encrypted-sql-server-backups), read with the private key of the certificate, no SQL Server needed | 1.6.6 | | | **SQL Server backups** | [Exports up to 2.8× faster](#sql-server-backups-faster-and-read-right), large striped backups ready in seconds | 1.6.0 – 1.6.3 | | | **Backups opened again** | [In milliseconds](#backups-opened-again-in-milliseconds), for SQL Server backups and Oracle RMAN backup sets; [`FASTBCP_INDEX_DIR`](/1.6/documentation/environment-variables/fastbcp-index-dir.md) for accounts without a home (1.6.6) | 1.6.3 – 1.6.6 | | | **Backup or live database** | [The same Parquet](#the-same-parquet-as-adbc_mssql) from `backup_mssql` and `adbc_mssql`, GeoParquet and float vectors included | 1.6.5 | | | **Columnstore backups** | [7× less memory](#far-less-memory-on-columnstore-tables) on a wide clustered columnstore table | 1.6.5 | | | **SQL Server dates** | [The whole `datetime2` range](#the-whole-sql-server-date-range), `9999-12-31` sentinels included, with `backup_mssql` and `adbc_mssql` | 1.6.2 | | | **Reliability** | More SQL Server and Oracle backup tables read, [with the right values](#sql-server-backups-faster-and-read-right); [a damaged `.bak` no longer hangs an export](#1-6-6); [the end of some compressed backups no longer lost](#1-6-7); [an RMAN set without its last piece no longer read short](#1-6-8) | 1.6.0 – 1.6.8 | | | **Unsigned 64-bit integers** | [Exact values](#unsigned-64-bit-integers) from HFSQL (OLE DB) and MySQL `BIGINT UNSIGNED`, in every format | 1.6.4 | | | **Windows** | [Full speed without a window](#windows-full-speed-in-scheduled-tasks): scheduled tasks, services and orchestrators no longer run on the efficiency cores | 1.6.0 | | | **Doc Wizard** | `backup_rman` in the ADBC connectors; incremental chains in `--database` (1.6.8) | 1.6.0 – 1.6.8 | | | **License** | The [ARPE.IO Software License Agreement](/1.6/documentation/cli/license.md) ships with FastBCP | 1.6.0 | ## Oracle RMAN Backup Sets — `--connectiontype backup_rman`[​](#oracle-rman-backup-sets----connectiontype-backup_rman "Direct link to oracle-rman-backup-sets----connectiontype-backup_rman") Need the data of an Oracle database that is not reachable — on a backup server, in an archive, a database decommissioned long ago — or don't want to restore a large backup to read one table? FastBCP now reads **RMAN backup sets** directly through the embedded **ArpeOraBackup** ADBC driver. * **`--server`** is the **directory** holding the backup pieces. * **`--database`** names the **pieces**: names or patterns, separated by `;` (`"full_*"`, `"full_*;ctl_*"`). * That's it: no user, no password, no Oracle. - Windows - Linux ``` .\FastBCP.exe ` --connectiontype backup_rman ` --server "D:\Backups\RMAN\ORCL" ` --database "full_*" ` --sourceschema "SALES" ` --sourcetable "ORDERS" ` --directory "D:\export\orders" ` --fileoutput "orders.parquet" ` --parallelmethod Physical ` --paralleldegree 8 ``` ``` ./FastBCP \ --connectiontype backup_rman \ --server "/backup/rman/orcl" \ --database "full_*" \ --sourceschema "SALES" \ --sourcetable "ORDERS" \ --directory "/export/orders" \ --fileoutput "orders.parquet" \ --parallelmethod Physical \ --paralleldegree 8 ``` ### Every RMAN Compression[​](#every-rman-compression "Direct link to Every RMAN Compression") FastBCP to Parquet, a 1 M-row table, open of the backup included, Windows laptop (hybrid CPU), degree 8, first export of the backup. | Backup | Elapsed | | ------------------------------------------- | ---------- | | Uncompressed | **0.73 s** | | `AS COMPRESSED BACKUPSET`, MEDIUM | 0.83 s | | `AS COMPRESSED BACKUPSET`, HIGH | 0.82 s | | `AS COMPRESSED BACKUPSET`, LOW | 1.04 s | | `AS COMPRESSED BACKUPSET`, BASIC | 7.0 s | | `AS COMPRESSED BACKUPSET`, HIGH, Oracle 19c | 6.0 s | The next exports from the same backup skip almost all of the open: see [Backups opened again in milliseconds](#backups-opened-again-in-milliseconds). ### What It Reads[​](#what-it-reads "Direct link to What It Reads") | | | Supported | | - | ------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | **Oracle versions** | 19c, 21c, 23ai and 26ai, on Linux x86-64 | | | **Backup types** | Full backup sets of a database, tablespaces, datafiles or PDBs, uncompressed or compressed with **BASIC**, **LOW**, **MEDIUM** or **HIGH**; [incremental backups](#incremental-rman-backups), levels 0 to 4 (1.6.8) | | | **Multi-piece and multi-set backups** | `MAXPIECESIZE`, several channels, `FILESPERSET`: every piece, by patterns or a `;`-separated list, in any order | | | **Several backups** | The latest version of each datafile is read | | | **Database layout** | Container databases (root and PDBs) and non-CDB, bigfile and smallfile tablespaces | | | **Tables** | Heap tables, with chained and migrated rows, more than 255 columns | | | **Data types** | Numbers, text in the database and national character sets, binary floats, `RAW`, `LONG`, `LONG RAW`, `DATE` and `TIMESTAMP` with or without time zone — see the [datatypes mapping](/1.6/datatypes-conversion/oracle/backup-parquet.md) | Good to know * **Parquet output only**, on Windows x64 and Linux x64. * `--parallelmethod` accepts `None` and `Physical` (which resolves to the **Pages** method). * `--query` accepts `SELECT * | col1, col2, … FROM [[container.]owner.]table`. * Incremental **level 1** to **4** backups are read with their level 0 since [1.6.8](#incremental-rman-backups); from 1.6.1 to 1.6.7 they were refused with a clear message. * **Refused with a clear message:** encrypted backup sets (`SET ENCRYPTION`); partitioned, index-organized and clustered tables; LOB, `INTERVAL`, `ROWID`, `JSON`, `VECTOR` and object columns (the other columns of the table can be exported with `--query`); incomplete multi-piece sets. **See also:** [Oracle RMAN backup sets](/1.6/documentation/cli/connection_parameters.md#oracle-rman-backup-sets-backup_rman) · [Examples](/1.6/documentation/examples/oracle.md#oracle-rman-backup-sets-backup_rman) ### Incremental Backups: the Latest Version of a Table[​](#incremental-rman-backups "Direct link to Incremental Backups: the Latest Version of a Table") Your RMAN strategy is a level 0 on Sunday and a level 1 every night, and the data you need is last night's, not Sunday's. Since 1.6.8, give FastBCP the level 0 and the incremental backups on it, and it reads the table in its latest version. No Oracle, no restore, no recovery, and always the **whole table**. * **`--database`** names the chain: a list in any order, a pattern, or the whole directory. Older backups can match too. * The pattern `**` reaches the subdirectories of `--server`: `"l0/*;l1/**"` for a directory per level and per day (`"l0\*;l1\**"` on Windows, where `/` works too), `"**"` for everything below it. * FastBCP checks that each incremental backup belongs to the chain, whatever the files are called. A missing link fails the export, naming the backup needed: no silent hole in your data. - Windows - Linux ``` .\FastBCP.exe ` --connectiontype backup_rman ` --server "D:\Backups\RMAN\ORCL" ` --database "l0\*;l1\**" ` --sourceschema "SALES" ` --sourcetable "ORDERS" ` --directory "D:\export\orders" ` --fileoutput "orders.parquet" ` --parallelmethod Physical ` --paralleldegree 8 ``` ``` ./FastBCP \ --connectiontype backup_rman \ --server "/backup/rman/orcl" \ --database "**" \ --sourceschema "SALES" \ --sourcetable "ORDERS" \ --directory "/export/orders" \ --fileoutput "orders.parquet" \ --parallelmethod Physical \ --paralleldegree 8 ``` | | | Supported | | - | -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | | **Incremental backups** | Levels 0 to 4, differential and cumulative, `FROM SCN`, each with its own compression | | | **Layout** | One directory, a directory per level or per day, anywhere below `--server` with `**` | | | **Tables** | Every table and data type a full backup reads, in the root, the PDBs or a non-CDB | | | **Versions** | Backups of Oracle 19c, 23ai and 26ai | | | **A backup that cannot be used** | [The export fails, naming it](/1.6/documentation/cli/connection_parameters.md#rman-backups-that-cannot-be-used), and the logs say what can be done about it | | | **Settings** | [`FASTBCP_BACKUP_RESTORE_POINT`](/1.6/documentation/environment-variables/fastbcp-backup-restore-point.md) and [`FASTBCP_BACKUP_RESTORE_MODE`](/1.6/documentation/environment-variables/fastbcp-backup-restore-mode.md) now apply to `backup_rman` too | Checked against the live tables, row for row, through chains of incremental backups on each of these versions. Reading through a chain costs little more than reading the level 0 alone. A 20 M-row table (2.4 GB), each level 1 rewriting half its blocks, read with 8 threads, warm cache: | Backups read | Uncompressed | MEDIUM | BASIC | | ------------------- | ------------ | ------ | ----- | | Level 0 alone | 0.27 s | 0.32 s | 5.2 s | | Level 0 + 1 level 1 | 0.31 s | — | — | | Level 0 + 3 level 1 | — | 0.40 s | 8.0 s | | Level 0 + 6 level 1 | 0.34 s | — | — | Before upgrading Some exports change: a level 0 and its incremental backups, refused up to 1.6.7, are now read; a backup set **without its last piece**, read short up to 1.6.7, now fails, naming it. [`FASTBCP_BACKUP_RESTORE_POINT=full`](/1.6/documentation/environment-variables/fastbcp-backup-restore-point.md) reads the level 0 only. See [Upgrading to 1.6.8](/1.6/documentation/cli/connection_parameters.md#upgrading-to-1-6-8), line by line. Good to know * The redo is not applied: an incremental backup taken while the database is open is read as its blocks are. * With BASIC compression, a long chain of level 1 backups costs more to read. A cumulative backup, or a new level 0, keeps it short. * After a new incremental backup, only the new backup is opened in full: the level 0 already opened stays fast. * Image copies (`BACKUP AS COPY`, `RECOVER COPY` strategies) are not read. ## SQL Server Backups: Faster, and Read Right[​](#sql-server-backups-faster-and-read-right "Direct link to SQL Server Backups: Faster, and Read Right") `--connectiontype backup_mssql` arrived in 1.5. Across the 1.6 releases it got much faster on large backups, and reads more tables, with the right values. ### Up to 2.8× Faster[​](#up-to-2-8x-faster "Direct link to Up to 2.8× Faster") TPC-H SF100 database (150 M-row `orders` table, clustered columnstore), backed up with `COMPRESSION` and striped over 6 files (36 GB), exported to Parquet with `--parallelmethod Physical --paralleldegree 24`, Windows laptop. | Export of `orders` (150,000,000 rows) | Elapsed | | ----------------------------------------- | ---------- | | FastBCP 1.5.1 | error | | FastBCP 1.6.0 | 33 s | | FastBCP 1.6.3, first export of the backup | 19.4 s | | FastBCP 1.6.3, next exports of the backup | **11.8 s** | Large backups striped over several files also start much sooner since 1.6.0: | Before the first row | 1.5.1 | 1.6.0 | | ---------------------------- | ----- | --------- | | Compressed backup, 6 files | 200 s | **25 s** | | Uncompressed backup, 6 files | 24 s | **7.4 s** | Faster reading of compressed backups and of clustered columnstore tables: internal improvement. ### The Whole SQL Server Date Range[​](#the-whole-sql-server-date-range "Direct link to The Whole SQL Server Date Range") Real tables hold dates far from today: `9999-12-31` as "no end date", or a mistyped year such as `0201` or `9600`. SQL Server accepts them all, but a single such `datetime2(7)` value failed the whole export with `date … is out of range`. Since 1.6.2, `datetime2(7)` and `datetimeoffset(7)` columns are exported with a **microsecond** unit by default, with both `--connectiontype backup_mssql` and `adbc_mssql`: every date from `0001-01-01` to `9999-12-31` is exported, and a backup and a live export of the same table give the same Parquet schema. ### The Same Parquet as `adbc_mssql`[​](#the-same-parquet-as-adbc_mssql "Direct link to the-same-parquet-as-adbc_mssql") Reading a table from its backup should not change what your pipeline receives. Since 1.6.5, a `--connectiontype backup_mssql` export and an `adbc_mssql` export of the same table give the same Parquet, values and schema. Spatial columns come out ready to use in GeoParquet readers, and vectors as real lists of floats. | | Column type | Before 1.6.5 | 1.6.5 | | - | --------------------------- | ------------------------------- | ------------------------------------------------------ | | | **`geography`, `geometry`** | SQL Server binary serialization | WKB with GeoParquet metadata and the CRS from the SRID | | | **`vector(n)`** | SQL Server binary serialization | List of `n` 32-bit floats | | | **`time(7)`** | Nanosecond unit | Microsecond unit | | | **`sql_variant`** | Text | Text, written as with `adbc_mssql` | warning If your pipeline reads these columns from `backup_mssql` exports, check it before upgrading. To keep the SQL Server serialization of spatial columns, see [`adbc.arpemsbackup.geospatial`](/1.6/datatypes-conversion/mssql/backup-parquet.md). Good to know * `json` and `vector(n, float16)` columns (SQL Server 2025) are refused with a clear message. Export the other columns by listing them in `--query`, or use `adbc_mssql`. * [`FASTBCP_UID_STRING_CASING`](/1.6/documentation/environment-variables/fastbcp-uid-string-casing.md) now applies to `backup_mssql` too. ### Far Less Memory on Columnstore Tables[​](#far-less-memory-on-columnstore-tables "Direct link to Far Less Memory on Columnstore Tables") Exporting a wide clustered columnstore table from a backup could take more memory than many servers have. Since 1.6.5, memory stays bounded (internal improvement). | Wide clustered columnstore table, `--parallelmethod Physical --paralleldegree 8` | Peak memory | | -------------------------------------------------------------------------------- | ----------- | | Before 1.6.5 | 42 GB | | FastBCP 1.6.5 | **5.9 GB** | ### Differential Backups: the Latest Version of a Table[​](#differential-sql-server-backups "Direct link to Differential Backups: the Latest Version of a Table") Your backup plan is a full backup on Sunday and a differential every night, and the data you need is last night's, not Sunday's. Since 1.6.7, give FastBCP the full backup and its differential, and it reads the table in its latest version. No SQL Server, no restore, and always the **whole table**. * **`--database`** names the files: a list in any order, or a pattern. Older backups can match too. * FastBCP checks that the differential was taken from that full backup, whatever the files are called. - Windows - Linux ``` .\FastBCP.exe ` --connectiontype backup_mssql ` --server "D:\Backups\MSSQL" ` --database "sales_full.bak;sales_diff.bak" ` --sourceschema "dbo" ` --sourcetable "orders" ` --directory "D:\export\orders" ` --fileoutput "orders.parquet" ` --parallelmethod Physical ` --paralleldegree 8 ``` ``` ./FastBCP \ --connectiontype backup_mssql \ --server "/var/opt/mssql/backup" \ --database "sales_*.bak" \ --sourceschema "dbo" \ --sourcetable "orders" \ --directory "/export/orders" \ --fileoutput "orders.parquet" \ --parallelmethod Physical \ --paralleldegree 8 ``` | | | Supported | | - | -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ | | | **Backups** | One file each, `WITH NOINIT` in one file, striped, compressed or not, encrypted | | | **Tables** | Every table and data type a full backup reads, rowstore and clustered columnstore | | | **Versions** | Backups of SQL Server 2017, 2019, 2022 and 2025 | | | **A backup that cannot be used** | [The export fails, naming it](/1.6/documentation/cli/connection_parameters.md#backups-that-cannot-be-used), and the logs say what can be done about it | Checked against the live tables, through several forms of differential on each of these versions, and against a `RESTORE` of the same backups. Before upgrading A backup that could be the newest and cannot be used now fails the export, so **some exports that worked with 1.6.6 fail**, and a `WITH NOINIT` file with differentials reads fresher rows. [`FASTBCP_BACKUP_RESTORE_POINT=full`](/1.6/documentation/environment-variables/fastbcp-backup-restore-point.md) goes back to the last full backup. See [Upgrading to 1.6.7](/1.6/documentation/cli/connection_parameters.md#upgrading-to-1-6-7), line by line. Good to know * Log backups are not applied. A differential taken during writes is read as its pages are, and can give other rows than a `RESTORE`. For an exact image, back up while the table is quiet. * With [`FASTBCP_BACKUP_RESTORE_MODE=best_effort`](/1.6/documentation/environment-variables/fastbcp-backup-restore-mode.md), the backups skipped are reported on the standard error output only, not in the FastBCP logs. The logs do not name the files read either. * Against 1.6.6, the peak memory of a rowstore export is 20 to 25 % lower. * Not measured: a differential on a cold disk cache or on a network share. ### Encrypted Backups, Read with Their Certificate[​](#encrypted-sql-server-backups "Direct link to Encrypted Backups, Read with Their Certificate") Your backups are encrypted, as they should be, and until now that meant restoring them on a server that holds the certificate before reading a single table. Since 1.6.6, give FastBCP the private key of the certificate, and it reads backups `WITH ENCRYPTION` and backups of **TDE** databases directly. No SQL Server, no restore. * **`--sourceuser`** is the file of the private key. * **`--sourcepassword`** is its password, if it has one. It is hidden in all logs. - Windows - Linux ``` .\FastBCP.exe ` --connectiontype backup_mssql ` --server "D:\Backups\MSSQL" ` --database "sales_encrypted.bak" ` --sourceuser "D:\Secure\Keys\MyCert.pvk" ` --sourcepassword "KeyPassword" ` --sourceschema "dbo" ` --sourcetable "orders" ` --directory "D:\export\orders" ` --fileoutput "orders.parquet" ` --parallelmethod Physical ` --paralleldegree 8 ``` ``` ./FastBCP \ --connectiontype backup_mssql \ --server "/var/opt/mssql/backup" \ --database "sales_encrypted.bak" \ --sourceuser "/secure/keys/MyCert.pvk" \ --sourcepassword "KeyPassword" \ --sourceschema "dbo" \ --sourcetable "orders" \ --directory "/export/orders" \ --fileoutput "orders.parquet" \ --parallelmethod Physical \ --paralleldegree 8 ``` | | | Supported | | - | ------------------------- | ---------------------------------------------------------------------------------------------- | | | **Encryption** | `WITH ENCRYPTION`, TDE, or both, also under two certificates; AES 128, 192 and 256, Triple DES | | | **Backups** | Compressed or not, striped, from SQL Server 2017, 2019, 2022 and 2025 | | | **Key files** | `.pvk`, `.pfx` / `.p12`, PEM, DER, or a `.cer` with its key next to it | | | **Without the right key** | The export stops, and the message names the certificate by its thumbprint | Checked against the live tables: the Parquet of an encrypted backup equals the `adbc_mssql` export of the same table, on Windows and on Linux. Good to know * SQL Server gives the files written by `BACKUP CERTIFICATE` to its service account alone. See [Encrypted backups](/1.6/documentation/cli/connection_parameters.md#encrypted-backups) for how to export the key and read it. * Reading an uncompressed backup of a TDE database takes longer than a plain one, as every page is decrypted. The cost is far lower on a compressed backup. * Keys in an EKM provider are not supported. An uncompressed backup taken while the TDE key was being changed is refused when the export reaches a page still under the previous key. warning Whoever has the private key can read the backups it opens, with no server involved: keep the key file as carefully as the backups themselves. ## Backups Opened Again in Milliseconds thanks to Auto-Cache[​](#backups-opened-again-in-milliseconds "Direct link to Backups Opened Again in Milliseconds thanks to Auto-Cache") Exporting several tables from one backup, one FastBCP run per table, used to read the structure of the whole backup again for every run: seconds, or minutes on a large compressed backup. Now FastBCP remembers each backup it has opened, and the next runs on the same backup start right away. | Opening the backup | First export | Next exports | | ------------------------------------------------- | ------------ | ------------ | | SQL Server, 3.8 GB compressed backup (1.6.3) | 2.1 s | **0.003 s** | | Oracle 19c RMAN backup, BASIC compression (1.6.4) | 6.9 s | **\~0.02 s** | Good to know * Nothing to set: it is on by default for `--connectiontype backup_mssql` and `backup_rman`. * FastBCP keeps a small file per backup (about 1 MB for a 4 GB SQL Server backup, a few MB for an Oracle one) in the local application data of the user running it: `%LOCALAPPDATA%\ArpeMSBackup\index` and `%LOCALAPPDATA%\ArpeOraBackup\index` on Windows, `~/.cache/arpemsbackup/index` and `~/.cache/arpeorabackup/index` on Linux. * A backup that is rewritten or moved is opened in full again. Files unused for 30 days, or beyond 2 GB in all, are removed automatically. * After a new incremental RMAN backup, only the new backup is opened in full (since 1.6.8). * A service account may have no usable home: since 1.6.6, [`FASTBCP_INDEX_DIR`](/1.6/documentation/environment-variables/fastbcp-index-dir.md) names another directory, and FastBCP warns when the index cannot be saved, instead of opening the backup in full at every run without saying so. ## Unsigned 64-bit Integers[​](#unsigned-64-bit-integers "Direct link to Unsigned 64-bit Integers") PC SOFT **HFSQL** "8-byte unsigned integers", read through `--connectiontype oledb`, could not be exported exactly: Parquet readers saw them as floating-point numbers (`18446744073709551615` read as `1.8446744073709552e+19`), and CSV exports stopped on values above 9,223,372,036,854,775,807. Since 1.6.4 they keep their exact value in every format. | | Format | 1.6.4 | | - | ------------- | ----------------------------------------------------------------------------------------------- | | | **Parquet** | Unsigned 64-bit integer (`UINT_64`, `UBIGINT` in DuckDB), instead of a decimal read as `DOUBLE` | | | **CSV / TSV** | Plain integer text, up to 18,446,744,073,709,551,615 | | | **JSON** | Integer | | | **BSON** | `Int64`, or a lossless `Decimal128` above the `Int64` range | Good to know * MySQL **`BIGINT UNSIGNED`** columns are now written to Parquet as unsigned 64-bit integers too, instead of text. * CSV and TSV exports no longer stop on any decimal value beyond the 64-bit integer range, whatever the source. ## Windows: Full Speed in Scheduled Tasks[​](#windows-full-speed-in-scheduled-tasks "Direct link to Windows: Full Speed in Scheduled Tasks") On Windows 11, a program started **without a window** — a scheduled task, a service, an orchestrator, a remote shell — runs on the **efficiency cores** of a hybrid CPU, at a reduced clock. FastBCP now asks Windows for full speed when it starts. | Same export, started without a window | Elapsed | | ------------------------------------- | --------- | | FastBCP 1.6.0 | **5.7 s** | | FastBCP 1.5.1 | 18.1 s | Set `FASTBCP_ECOQOS=1` to keep FastBCP under the Windows policy, on a host where it must stay discreet. ## Doc Wizard[​](#doc-wizard "Direct link to Doc Wizard") The [Doc Wizard](/1.6/wizard.md) offers `backup_rman` in the **ADBC (High Performance)** connectors: the server field becomes the directory of the backup pieces, the database field the piece names or patterns, and only `None` and `Physical` are offered as parallel methods. Since 1.6.8, its help shows how to name a whole incremental chain (`l0/*;l1/**`, `**`). ## License[​](#license "Direct link to License") FastBCP now ships the **ARPE.IO Software License Agreement** (`LICENSE.txt` in the zip). The license grant is unchanged; the agreement adds that the binaries may not be reverse engineered, manually or with the help of an AI system, and that the software may not be used to train an AI model to reproduce it. Using an AI assistant to operate FastBCP stays permitted. See [License](/1.6/documentation/cli/license.md). ## Release History[​](#release-history "Direct link to Release History") ### 1.6.8[​](#1-6-8 "Direct link to 1.6.8") | | | | | - | ----------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | **`backup_rman`** | [Incremental backups](#incremental-rman-backups), levels 0 to 4, differential and cumulative: the latest version of a table, from a level 0 and the incremental backups on it | | | **`backup_rman`** | [`--database`](/1.6/documentation/cli/connection_parameters.md#naming-the-backup-pieces) takes paths, absolute or relative to `--server`, and `**` for any number of subdirectories (`"l0/*;l1/**"`). Each entry must match a file, or the export fails naming it | | | **`backup_rman`** | [`FASTBCP_BACKUP_RESTORE_POINT`](/1.6/documentation/environment-variables/fastbcp-backup-restore-point.md) and [`FASTBCP_BACKUP_RESTORE_MODE`](/1.6/documentation/environment-variables/fastbcp-backup-restore-mode.md) now apply, and the logs say which settings apply and what can be done when a backup is refused | | | **`backup_rman`** | Fixed: a backup set without its last piece was read short, without an error. It now fails, naming it | | | **`backup_rman`** | Fixed: a column added with a `DEFAULT` read `NULL` on the rows written before; a table truncated, then its tablespace backed up alone, read empty (now refused, naming it) | | | **`backup_rman`** | Archived log pieces in the directory, more than 64 pieces and `COPIES 2` are read instead of refused; the tables of a dropped PDB are no longer listed | | | **Doc Wizard** | Incremental chains in `--database` | warning A level 0 and its incremental backups, refused up to 1.6.7, now read **fresher rows**: `FASTBCP_BACKUP_RESTORE_POINT=full` keeps the level 0. A backup set without its last piece now fails the export. See [Upgrading to 1.6.8](/1.6/documentation/cli/connection_parameters.md#upgrading-to-1-6-8). | Component | Version | | ------------------------- | ------- | | ArpeOraBackup ADBC driver | 0.3.1 | ### 1.6.7[​](#1-6-7 "Direct link to 1.6.7") | | | | | - | ------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | **`backup_mssql`** | [Differential backups](#differential-sql-server-backups): the latest version of a table, from a full backup and its differential | | | **`backup_mssql`** | [`FASTBCP_BACKUP_RESTORE_POINT`](/1.6/documentation/environment-variables/fastbcp-backup-restore-point.md) and [`FASTBCP_BACKUP_RESTORE_MODE`](/1.6/documentation/environment-variables/fastbcp-backup-restore-mode.md) choose which version is read, and what happens when a backup cannot be used | | | **`backup_mssql`** | The logs say which settings apply, and what can be done when a backup is refused | | | **`backup_mssql`** | Fixed: the end of some compressed backups was lost without an error, on about 2 % of the backups tried. No page was lost on 168 test backups | | | **`backup_mssql`** | Fixed: a file or partial backup after a full backup was taken for a full backup. It is now refused by name | | | **Doc Wizard** | Full and differential backups in `--database` | warning **Some exports that worked with 1.6.6 now fail**, naming the backup: a `WITH NOINIT` file whose newest differential has its full backup elsewhere, or with a file, filegroup or partial backup after the full; a file that lost its end, even with `best_effort` when it holds no other version. And a `WITH NOINIT` file with differentials now reads fresher rows. See [Upgrading to 1.6.7](/1.6/documentation/cli/connection_parameters.md#upgrading-to-1-6-7). The first export from each backup reads its structure once more. | Component | Version | | ------------------------ | ------- | | ArpeMSBackup ADBC driver | 0.2.0 | ### 1.6.6[​](#1-6-6 "Direct link to 1.6.6") | | | | | - | --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | **`backup_mssql`** | [Encrypted backups](#encrypted-sql-server-backups): `WITH ENCRYPTION` and TDE databases, read with the private key of the certificate | | | **`backup_mssql`** | Fixed: a damaged or crafted `.bak` could make an export hang. It now stops with an error | | | **`backup_mssql`, `backup_rman`** | [`FASTBCP_INDEX_DIR`](/1.6/documentation/environment-variables/fastbcp-index-dir.md) names the directory of the backup index, and a warning says when the index cannot be saved | | | **Doc Wizard** | The key file and its password for `backup_mssql` | warning A backup whose data ends past the end of the file now stops at the open with `truncated or damaged backup`: it failed before too, later in the export. On Windows, `FASTBCP_INDEX_DIR` must name its drive and start from its root: `C:index` and `\index` stop the run at startup. | Component | Version | | ------------------------- | ------- | | ArpeMSBackup ADBC driver | 0.1.17 | | ArpeOraBackup ADBC driver | 0.1.3 | ### 1.6.5[​](#1-6-5 "Direct link to 1.6.5") | | | | | - | ------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | | | **`backup_mssql`** | [The same Parquet as `adbc_mssql`](#the-same-parquet-as-adbc_mssql): `geography`, `geometry`, `vector`, `time(7)` and `sql_variant` are written differently | | | **`backup_mssql`** | [Far less memory on columnstore tables](#far-less-memory-on-columnstore-tables) | | | **`backup_mssql`** | `json` and `vector(n, float16)` columns (SQL Server 2025) are refused with a clear message | | | **`backup_mssql`** | [`FASTBCP_UID_STRING_CASING`](/1.6/documentation/environment-variables/fastbcp-uid-string-casing.md) now applies | | Component | Version | | ------------------------ | ------- | | ArpeMSBackup ADBC driver | 0.1.15 | ### 1.6.4[​](#1-6-4 "Direct link to 1.6.4") | | | | | - | --------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | | **`backup_rman`** | [Backups opened again in milliseconds](#backups-opened-again-in-milliseconds); faster reads on Windows (internal improvement) | | | **`backup_rman`: `LONG` / `LONG RAW`** | Values longer than a database block came out wrong; they are now exported whole, up to 2 GB | | | **`backup_rman`: `TIMESTAMP WITH LOCAL TIME ZONE`** | Values were shifted by the time zone offset of the database; they are now right. A database time zone given as a region name (`Europe/Paris`) is refused for these columns, with a clear message | | | **OLE DB (HFSQL), MySQL** | [Unsigned 64-bit integers](#unsigned-64-bit-integers) exported exactly | warning If you exported Oracle tables with `LONG` / `LONG RAW` or `TIMESTAMP WITH LOCAL TIME ZONE` columns from RMAN backups with FastBCP 1.6.0 to 1.6.3, export them again with 1.6.4. | Component | Version | | ------------------------- | ------- | | ArpeOraBackup ADBC driver | 0.1.2 | ### 1.6.3[​](#1-6-3 "Direct link to 1.6.3") | | | | | - | ------------------ | --------------------------------------------------------------------------------------------------------------------------------------- | | | **`backup_mssql`** | [Exports up to 2.8× faster](#up-to-2-8x-faster), [backups opened again in milliseconds](#backups-opened-again-in-milliseconds) | | | **`backup_mssql`** | Clustered columnstore fixes: columns starting with `NULL` values, `datetimeoffset(0)` to `(2)`, large `decimal`; errors name the column | | Component | Version | | ------------------------ | ------- | | ArpeMSBackup ADBC driver | 0.1.12 | ### 1.6.2[​](#1-6-2 "Direct link to 1.6.2") | | | | | - | -------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | | | **`backup_mssql`, `adbc_mssql`** | [The whole SQL Server date range](#the-whole-sql-server-date-range): `datetime2(7)` and `datetimeoffset(7)` as microseconds by default | | | **`backup_mssql`** | Fixes: backup directories with accented characters, clustered columnstore `nchar` / `nvarchar` strings and repeated values | | Component | Version | | ------------------------ | ------- | | ArpeMSBackup ADBC driver | 0.1.9 | ### 1.6.1[​](#1-6-1 "Direct link to 1.6.1") | | | | | - | ----------------- | ---------------------------------------------------------------------------------------------- | | | **`backup_rman`** | Incremental **level 1** backup sets are now refused with a clear message naming the backup set | FastBCP 1.6.0 read an incremental level 1 backup set as a full backup: the export held only the rows of the blocks changed since the previous backup, with no error. Full backups and incremental level 0 backups were read correctly. warning If you exported tables with FastBCP 1.6.0 from RMAN **incremental level 1** backups, export them again from the full (or level 0) backup with 1.6.1 or later. | Component | Version | | ------------------------- | ------- | | ArpeOraBackup ADBC driver | 0.1.1 | ### 1.6.0[​](#1-6-0 "Direct link to 1.6.0") | | | | | - | ------------------ | --------------------------------------------------------------------------------------------------------------------- | | | **New source** | [`--connectiontype backup_rman`](#oracle-rman-backup-sets----connectiontype-backup_rman) | | | **`backup_mssql`** | Large striped backups ready in seconds, fixes for older databases, `PAGE`-compressed and clustered columnstore tables | | | **Windows** | [Full speed in scheduled tasks](#windows-full-speed-in-scheduled-tasks) | | | **Doc Wizard** | [`backup_rman`](#doc-wizard) | | | **License** | [ARPE.IO Software License Agreement](#license) | | Component | Version | | ------------------------- | -------------------------------------- | | ArpeOraBackup ADBC driver | 0.1.0 **(new)** | | ArpeMSBackup ADBC driver | 0.1.8 | | AdbcFileExport | 0.5.6 (`arpeorabackup` driver profile) | The other components are unchanged since 1.5.1. --- # Sitemap ## [Installation](/1.6/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](/1.6/.md) * CLI Reference * [Authentication](/1.6/documentation/cli/authentication.md) * [Connection Parameters](/1.6/documentation/cli/connection_parameters.md) * [Source Info](/1.6/documentation/cli/source_info.md) * [Output Info](/1.6/documentation/cli/output_info.md) * [CSV Formatting](/1.6/documentation/cli/csv_formatting.md) * [Parquet Formatting](/1.6/documentation/cli/parquet_formatting.md) * [Cloud Options](/1.6/documentation/cli/cloud_options.md) * [Parallel Parameters](/1.6/documentation/cli/parallel_parameters.md) * [Advanced Parameters](/1.6/documentation/cli/advanced_parameters.md) * [License](/1.6/documentation/cli/license.md) * Environment Variables * [Overview](/1.6/documentation/environment-variables/overview.md) * [FASTBCP\_CLOUD\_ISBUFFERED](/1.6/documentation/environment-variables/fastbcp-cloud-isbuffered.md) * [FASTBCP\_TMPPATH](/1.6/documentation/environment-variables/fastbcp-tmppath.md) * [FASTBCP\_CLOUD\_MAXUPLOADTHREAD\_PER\_STREAM](/1.6/documentation/environment-variables/fastbcp-cloud-maxuploadthread-per-stream.md) * [FASTBCP\_RGSIZE](/1.6/documentation/environment-variables/fastbcp-rgsize.md) * [FASTBCP\_UID\_STRING\_CASING](/1.6/documentation/environment-variables/fastbcp-uid-string-casing.md) * [FASTBCP\_DATEFORMAT](/1.6/documentation/environment-variables/fastbcp-dateformat.md) * [FASTBCP\_ADBC\_BATCHCELLS](/1.6/documentation/environment-variables/fastbcp-adbc-batchcells.md) * [FASTBCP\_SYSTEMINFO\_COLLECT](/1.6/documentation/environment-variables/fastbcp-systeminfo-collect.md) * [FASTBCP\_PERFORMANCE\_COLLECT](/1.6/documentation/environment-variables/fastbcp-performance-collect.md) * [FASTBCP\_DBPARTITION\_TARGET\_MODE](/1.6/documentation/environment-variables/fastbcp-dbpartition-target-mode.md) * [FASTBCP\_TTU\_PATH](/1.6/documentation/environment-variables/fastbcp-ttu-path.md) * [FASTBCP\_INDEX\_DIR](/1.6/documentation/environment-variables/fastbcp-index-dir.md) * [FASTBCP\_BACKUP\_RESTORE\_POINT](/1.6/documentation/environment-variables/fastbcp-backup-restore-point.md) * [FASTBCP\_BACKUP\_RESTORE\_MODE](/1.6/documentation/environment-variables/fastbcp-backup-restore-mode.md) * Cloud Connectivity * [Overview](/1.6/documentation/cloud-connectivity/overview.md) * [AWS S3](/1.6/documentation/cloud-connectivity/aws-s3.md) * [Azure](/1.6/documentation/cloud-connectivity/azure.md) * [Google Cloud Storage](/1.6/documentation/cloud-connectivity/google-cloud.md) * [OneLake](/1.6/documentation/cloud-connectivity/onelake.md) * Logging * [Overview](/1.6/documentation/logging/Overview.md) * [Logs Level](/1.6/documentation/logging/logs-level.md) * [Log Database](/1.6/documentation/logging/log-database.md) * [Log Files Names Mapping using variables](/1.6/documentation/logging/log-files-names-mapping-using-variables.md) * [OpenTelemetry](/1.6/documentation/logging/OpenTelemetry.md) * [Examples](/1.6/documentation/logging/examples.md) * Examples * [SQL Server Examples](/1.6/documentation/examples/sql-server.md) * [PostgreSQL Examples](/1.6/documentation/examples/postgresql.md) * [MySQL Examples](/1.6/documentation/examples/mysql.md) * [Oracle Examples](/1.6/documentation/examples/oracle.md) * [DB2 Examples](/1.6/documentation/examples/db2.md) * [Other Databases](/1.6/documentation/examples/other-databases.md) * [Output Formats](/1.6/documentation/examples/output-formats.md) * [Cloud Storage](/1.6/documentation/examples/cloud-storage.md) * [Advanced Scenarios](/1.6/documentation/examples/advanced-scenarios.md) * Compatibility * [Sources & Platforms](/1.6/documentation/compatibility/sources_platforms.md) * [Operating Systems](/1.6/documentation/compatibility/operating_systems.md) ## Datatypes Conversion[​](#datatypes-conversion "Direct link to Datatypes Conversion") * [Overview](/1.6/datatypes-conversion/overview.md) * SQL Server * [mssql](/1.6/datatypes-conversion/mssql/parquet.md) * [adbc\_mssql](/1.6/datatypes-conversion/mssql/adbc-parquet.md) * [backup\_mssql](/1.6/datatypes-conversion/mssql/backup-parquet.md) * MySQL * [mysql](/1.6/datatypes-conversion/mysql/parquet.md) * Oracle * [oraodp](/1.6/datatypes-conversion/oracle/parquet.md) * [adbc\_oraodp](/1.6/datatypes-conversion/oracle/adbc-parquet.md) * [backup\_rman](/1.6/datatypes-conversion/oracle/backup-parquet.md) * PostgreSQL * [pgsql](/1.6/datatypes-conversion/postgresql/parquet.md) * [pgcopy](/1.6/datatypes-conversion/postgresql-copy/parquet.md) * [adbc\_pgsql](/1.6/datatypes-conversion/postgresql/adbc-parquet.md) * SAP HANA * [hana](/1.6/datatypes-conversion/saphana/parquet.md) * Teradata * [teradata](/1.6/datatypes-conversion/teradata/parquet.md) ## Integration[​](#integration "Direct link to Integration") * [Docker](/1.6/integration/docker-integration.md) * [Kestra](/1.6/integration/kestra-integration.md) * [Airflow](/1.6/integration/airflow-integration.md) * [PostgreSQL](/1.6/integration/postgresql-integration.md) ## Release Notes[​](#release-notes "Direct link to Release Notes") * [Release Notes 1.6](/1.6/release-notes/release-notes-1.6.md) * [Release Notes 1.5](/1.6/release-notes/release-notes-1.5.md) * [Release Notes 1.4](/1.6/release-notes/release-notes-1.4.md) * [Release Notes 1.3](/1.6/release-notes/release-notes-1.3.md) * [Release Notes 1.2](/1.6/release-notes/release-notes-1.2.md) * [Release Notes 1.1](/1.6/release-notes/release-notes-1.1.md) * [Release Notes 1.0](/1.6/release-notes/release-notes-1.0.md) * [Release Notes 0.32](/1.6/release-notes/release-notes-0.32.md) ## AI Integrations[​](#ai-integrations "Direct link to AI Integrations") * [FastBCP Agent Skill](/1.6/ai/agent-skills.md) * [FastBCP MCP Server](/1.6/ai/mcp-server.md) ## [Sitemap](/1.6/sitemap.md)[​](#sitemap-1 "Direct link to sitemap-1") --- # FastBCP Command Wizard Tip: in an empty field, press `→` to take the suggested value. Expand All\[ ] ### PlatformWindows Windows ![Linux](/img/tux.svg)Linux ### Connection ParametersMS SQL Server Connection Type? : ADBC (High Performance) ![](/img/logos/sqlserver.svg)MS SQL Server (Arpe.io ADBC FastDriver) ![](/img/logos/postgresql.svg)PostgreSQL (Arpe.io ADBC FastDriver) ![](/img/logos/oracle.svg)Oracle (Arpe.io ADBC FastDriver) ![](/img/logos/netezza.svg)Netezza (Arpe.io ADBC FastDriver) ![](/img/logos/teradata.svg)Teradata (Arpe.io ADBC FastDriver) ![](/img/logos/sqlserver.svg)SQL Server backups .bak (Arpe.io ADBC FastDriver) ![](/img/logos/oracle.svg)Oracle RMAN backups (Arpe.io ADBC FastDriver) Standard Drivers ![](/img/logos/clickhouse.svg)ClickHouse ![](/img/logos/sqlserver.svg)MS SQL Server ![](/img/logos/mysql.svg)MySQL ![](/img/logos/netezza.svg)Netezza ODBC OLEDB ![](/img/logos/oracle.svg)Oracle (ODP) ![](/img/logos/postgresql.svg)PostgreSQL (pgcopy) ![](/img/logos/postgresql.svg)PostgreSQL (pgsql) ![](/img/logos/sap.svg)SAP HANA ![](/img/logos/teradata.svg)Teradata | Provider? : | SQLOLEDB | | ------------------------ | ----------------------------- | | Server? : | mss-server,1433 | | Source Connect String? : | Server=myserver;Database=mydb | | DSN? : | MyDSN | | Trusted? : | \[ ] | | User? : | username | | Password? : | password | | Database? : | mydb | | Application Intent? : | ReadOnlyReadWrite | ### Source Query / Table ### Output Options ### Format Options ### Parquet Options ### Cloud Options ### Parallel Parameters ### Advanced Parameters ### License ### Generated Command Multi-line\[x] generate config sharecopy ``` ``` --- # Getting Started with FastBCP FastBCP is a high-performance bulk copy tool that exports SQL Server, PostgreSQL, MySQL, Oracle and other databases to CSV, Parquet, JSON and cloud storage (S3, Azure, GCS, OneLake). ## Your first export in three steps[​](#your-first-export-in-three-steps "Direct link to Your first export in three steps") 1. 1InstallDownload and unzip FastBCP, or pull the Docker image: see [Installation](/latest/installation.md) 2. 2Build your commandPick your source, output and options in the interactive [Doc Wizard](/latest/wizard.md) 3. 3RunPaste the generated `./FastBCP` command in your terminal ## The CLI at a glance[​](#the-cli-at-a-glance "Direct link to The CLI at a glance") A FastBCP command is built in four stages. Each box opens the matching page of the CLI reference. ## Watch the tutorial[​](#watch-the-tutorial "Direct link to Watch the tutorial") [FastBCP Tutorial](https://www.youtube.com/embed/Tpmc6NrTtuM) ## 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) * [DB2](/latest/documentation/examples/db2.md) * [Other databases](/latest/documentation/examples/other-databases.md) Reference Parameters, settings and behaviour * [CLI parameters](/latest/documentation/cli/connection_parameters.md)connection, source, output, formatting and parallelism * [Cloud connectivity](/latest/documentation/cloud-connectivity/overview.md)export straight to S3, Azure, GCS or OneLake * [Environment variables](/latest/documentation/environment-variables/overview.md)fine-tune buffering, temp paths and more * [Logging](/latest/documentation/logging/Overview.md)log levels, log database and OpenTelemetry * [Data type conversion](/latest/datatypes-conversion/overview.md)how source types map to Parquet --- # FastBCP Agent Skill arpe.io publishes official agent skills in the [arpe-io/arpeio-skills](https://github.com/arpe-io/arpeio-skills) GitHub repository. The [`fastbcp`](https://github.com/arpe-io/arpeio-skills/tree/main/plugins/fastbcp/skills/fastbcp) skill teaches your AI agent how to build, explain and troubleshoot FastBCP commands: which parameters exist, which options fit together, which parallel method to choose, and which mistakes to avoid. The same repository also has skills for FastTransfer, MigratorXpress, LakeXpress and the arpe.io ADBC drivers. Skill or MCP server? The skill is a set of instructions: it teaches the agent how FastBCP 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 FastBCP 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 fastbcp --marketplace arpe-io/arpeio-skills ``` Or in two steps: ``` /plugin marketplace add arpe-io/arpeio-skills /plugin install fastbcp@arpe-io ``` Then just ask, for example: *"Export dbo.Orders from SQL Server to Parquet on S3 with FastBCP, in parallel"*. To get the latest version of the skill later: ``` /plugin marketplace update arpe-io /plugin update fastbcp@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/fastbcp/skills/fastbcp / ``` For agents without skill support, paste the content of [`SKILL.md`](https://github.com/arpe-io/arpeio-skills/blob/main/plugins/fastbcp/skills/fastbcp/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 FastBCP version its facts were checked against. Before building a command, it asks the agent to check the installed version (`FastBCP --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 FastBCP version, the prompt you gave, and the command the agent produced (with passwords and licence text removed). --- # FastBCP 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 FastBCP, the assistant can ask the server to validate a set of parameters and render the exact FastBCP command, look up what FastBCP supports, read the release notes and search this documentation. If FastBCP is installed on your machine, it can also run the command. The server runs in one of two modes: * Command builder (default)The tools build, validate and explain commands; no FastBCP binary is needed. The hosted server works this way, so it never connects to your databases. * ExecutionWhen you install the server on your own machine and point it at your FastBCP 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 FastBCP from the assistant[​](#run-fastbcp-from-the-assistant "Direct link to Run FastBCP from the assistant") To let the assistant run FastBCP, install the server on the machine where FastBCP 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 FASTBCP_PATH=/path/to/FastBCP arpeio -- arpeio-mcp ``` In Claude Desktop, and in other clients that use the `mcpServers` format: ``` { "mcpServers": { "arpeio": { "command": "arpeio-mcp", "env": { "FASTBCP_PATH": "/path/to/FastBCP" } } } } ``` | Variable | Description | | ----------------- | ------------------------------------------------------------------------ | | `FASTBCP_PATH` | Path to the FastBCP binary. Without it, the server only builds commands. | | `FASTBCP_TIMEOUT` | Execution timeout, in seconds. Optional. | | `FASTBCP_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 | | ------------------------ | ------------------------------------------------------------------------------------------------------------------- | | `fastbcp_info` | Reference information, picked with `action`: supported formats, parallel methods, workflow tips, version detection. | | `fastbcp_preview_export` | Validates the parameters and renders the FastBCP command. When no parallel method is given, it suggests one. | | `fastbcp_execute_export` | Runs the previewed command. Needs a local FastBCP 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. 1DescribeYou describe what you want, for example: *"Export the Sales.Orders table from PostgreSQL to Parquet files in an S3 bucket, split in 8 parallel parts"*. 2. 2PreviewThe assistant calls `fastbcp_preview_export`. The tool checks the parameters and returns the FastBCP command, an explanation, and warnings when an option does not exist in the FastBCP version you run. 3. 3ReviewYou review the command. Passwords are masked in the displayed version. 4. 4RunIf execution is enabled, the assistant calls `fastbcp_execute_export`. 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: `export-table` for FastBCP, and `troubleshoot` to explain a failed run from its error message. The server also exposes the FastBCP capability matrix as the MCP resource `arpeio://capabilities/fastbcp-formats`. ## 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). --- # SQL Server (ADBC) → Parquet Datatypes conversion mapping when exporting from **SQL Server** using the ADBC connector (`--connectiontype adbc_mssql`) to **Parquet** format. Platform availability The ADBC FastDriver connectors (`adbc_mssql`, `adbc_pgsql`) are available on **Windows x64** and **Linux x64** only. They are **not** supported on **Linux ARM64**. info The ADBC connector does not map every type the way the standard [`mssql`](/latest/datatypes-conversion/mssql/parquet.md) driver does. Compare both pages before switching. | | | | --------------- | --------------------------------------------------------- | | **Source** | SQL Server (adbc\_mssql) | | **Format** | Parquet | | **FastBCP** | 1.5.0.0 (ArpeMSSQL 0.7.8), SQL Server 2025 types: 1.6.4.0 | | **Test Status** | OK (33/33 Nullable) | Since FastBCP 1.5 * `sql_variant` is exported (as text); it failed in 1.4. * `time(7)`, `datetime2(7)` and `datetimeoffset(7)` are written with a **microsecond** unit by default (the 7th digit is dropped), so that older readers (Spark before 3.x) can read the files. Add `adbc.arpemssql.timestamp_precision=nanosecond` to `--sourceconnectstring` to keep the 100 ns resolution (nanosecond unit). * `geography` and `geometry` are converted to **WKB** with GeoParquet metadata (`geo` key: WKB encoding, spherical edges for `geography`), so Parquet readers see them as geometries. `adbc.arpemssql.geospatial=wkb` gives plain WKB without the metadata, `varbinary` the SQL Server serialization. ## Parquet Schema: testdatatypes\_nullable[​](#parquet-schema-testdatatypes_nullable "Direct link to Parquet Schema: testdatatypes_nullable") | name | physical\_type | converted\_type | logical\_type | | --------------------- | ----------------------- | ----------------- | --------------------------------------------------- | | col\_bigint | INT64 | — | — | | col\_int | INT32 | — | — | | col\_smallint | INT32 | INT\_16 | IntType(bitWidth=16, isSigned=1) | | col\_tinyint | INT32 | UINT\_8 | IntType(bitWidth=8, isSigned=0) | | col\_bit | BOOLEAN | — | — | | col\_decimal | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=2, precision=18) | | col\_numeric | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=2, precision=18) | | col\_money | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=4, precision=19) | | col\_smallmoney | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=4, precision=10) | | col\_float | DOUBLE | — | — | | col\_real | FLOAT | — | — | | col\_date | INT32 | DATE | DateType() | | col\_time | INT64 | — | TimeType(isAdjustedToUTC=0, unit=MICROS) | | col\_datetime | INT64 | TIMESTAMP\_MILLIS | TimestampType(isAdjustedToUTC=0, unit=MILLIS) | | col\_datetime2 | INT64 | TIMESTAMP\_MICROS | TimestampType(isAdjustedToUTC=0, unit=MICROS) | | col\_datetimeoffset | INT64 | TIMESTAMP\_MICROS | TimestampType(isAdjustedToUTC=1, unit=MICROS) | | col\_smalldatetime | INT64 | TIMESTAMP\_MILLIS | TimestampType(isAdjustedToUTC=0, unit=MILLIS) | | col\_char | BYTE\_ARRAY | UTF8 | StringType() | | col\_varchar | BYTE\_ARRAY | UTF8 | StringType() | | col\_nchar | BYTE\_ARRAY | UTF8 | StringType() | | col\_nvarchar | BYTE\_ARRAY | UTF8 | StringType() | | col\_text | BYTE\_ARRAY | UTF8 | StringType() | | col\_ntext | BYTE\_ARRAY | UTF8 | StringType() | | col\_binary | BYTE\_ARRAY | — | — | | col\_varbinary | BYTE\_ARRAY | — | — | | col\_image | BYTE\_ARRAY | — | — | | col\_uniqueidentifier | BYTE\_ARRAY | UTF8 | StringType() | | col\_xml | BYTE\_ARRAY | UTF8 | StringType() | | col\_geography | BYTE\_ARRAY | — | — (WKB, GeoParquet `geo` metadata, spherical edges) | | col\_geometry | BYTE\_ARRAY | — | — (WKB, GeoParquet `geo` metadata) | | col\_sql\_variant | BYTE\_ARRAY | UTF8 | StringType() | | col\_json | BYTE\_ARRAY | JSON | JsonType() | | col\_vector | FLOAT (repeated) | LIST | ListType() | `col_json` (`json`) and `col_vector` (`vector(3)`) are SQL Server 2025 types, tested with FastBCP 1.6.4.0. * `json` is exported with the Parquet `JSON` logical type. * `vector(n)` is exported as a list of `n` 32-bit floats (`[0.5, 1.5, 2.5]`). --- # SQL Server backup files → Parquet Datatypes conversion mapping when exporting a table from **SQL Server backups** (`.bak`, full and differential) using the ArpeMSBackup ADBC driver (`--connectiontype backup_mssql`) to **Parquet** format. Platform availability `backup_mssql` is available on **Windows x64** and **Linux x64** only. It is **not** supported on **Linux ARM64**. Compared with `adbc_mssql` Since FastBCP 1.6.5, the mapping and the values are those of [`adbc_mssql`](/latest/datatypes-conversion/mssql/adbc-parquet.md), so a backup and a live export of the same table give the same Parquet. The exception is `json` and `vector(n, float16)` (SQL Server 2025): `backup_mssql` refuses them. Changed in FastBCP 1.6.5 * `time(7)`: **microsecond** unit, instead of nanosecond. * `geography`, `geometry`: **WKB** with GeoParquet metadata, instead of the SQL Server binary serialization. * `vector(n)`: **list of 32-bit floats**, instead of the SQL Server binary serialization. * `sql_variant`: values are written as with `adbc_mssql`. | | | | --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | **Source** | SQL Server backup file (backup\_mssql) | | **Format** | Parquet | | **FastBCP** | 1.6.4.0; `time`, `geography`, `geometry`, `uniqueidentifier`, `json` and `vector`: 1.6.5.0 | | **Test Status** | PARTIAL (32/33 Nullable) — `json` refused. SQL Server 2022 and 2025 backups: uncompressed, striped, `MS_XPRESS` and `ZSTD` compression, `--parallelmethod Physical` | ## Parquet Schema: testdatatypes\_nullable[​](#parquet-schema-testdatatypes_nullable "Direct link to Parquet Schema: testdatatypes_nullable") | name | physical\_type | converted\_type | logical\_type | | --------------------- | ----------------------- | ----------------- | --------------------------------------------------- | | col\_bigint | INT64 | — | — | | col\_int | INT32 | — | — | | col\_smallint | INT32 | INT\_16 | IntType(bitWidth=16, isSigned=1) | | col\_tinyint | INT32 | UINT\_8 | IntType(bitWidth=8, isSigned=0) | | col\_bit | BOOLEAN | — | — | | col\_decimal | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=2, precision=18) | | col\_numeric | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=2, precision=18) | | col\_money | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=4, precision=19) | | col\_smallmoney | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=4, precision=10) | | col\_float | DOUBLE | — | — | | col\_real | FLOAT | — | — | | col\_date | INT32 | DATE | DateType() | | col\_time | INT64 | — | TimeType(isAdjustedToUTC=0, unit=MICROS) | | col\_datetime | INT64 | TIMESTAMP\_MILLIS | TimestampType(isAdjustedToUTC=0, unit=MILLIS) | | col\_datetime2 | INT64 | TIMESTAMP\_MICROS | TimestampType(isAdjustedToUTC=0, unit=MICROS) | | col\_datetimeoffset | INT64 | TIMESTAMP\_MICROS | TimestampType(isAdjustedToUTC=1, unit=MICROS) | | col\_smalldatetime | INT64 | TIMESTAMP\_MILLIS | TimestampType(isAdjustedToUTC=0, unit=MILLIS) | | col\_char | BYTE\_ARRAY | UTF8 | StringType() | | col\_varchar | BYTE\_ARRAY | UTF8 | StringType() | | col\_nchar | BYTE\_ARRAY | UTF8 | StringType() | | col\_nvarchar | BYTE\_ARRAY | UTF8 | StringType() | | col\_text | BYTE\_ARRAY | UTF8 | StringType() | | col\_ntext | BYTE\_ARRAY | UTF8 | StringType() | | col\_binary | BYTE\_ARRAY | — | — | | col\_varbinary | BYTE\_ARRAY | — | — | | col\_image | BYTE\_ARRAY | — | — | | col\_uniqueidentifier | BYTE\_ARRAY | UTF8 | StringType() | | col\_xml | BYTE\_ARRAY | UTF8 | StringType() | | col\_geography | BYTE\_ARRAY | — | — (WKB, GeoParquet `geo` metadata, spherical edges) | | col\_geometry | BYTE\_ARRAY | — | — (WKB, GeoParquet `geo` metadata) | | col\_sql\_variant | BYTE\_ARRAY | UTF8 | StringType() | | col\_json | — | — | Refused | | col\_vector | FLOAT (repeated) | LIST | ListType() | `col_json` (`json`) and `col_vector` (`vector(3)`) are SQL Server 2025 types, tested with FastBCP 1.6.5.0. * `vector(n)` is exported as a list of `n` 32-bit floats (`[1.0, -2.5, 3.25]`). * `geography` and `geometry` keep their coordinate system: the GeoParquet metadata carries the CRS from the column's SRID. * `uniqueidentifier` is written in lowercase by default. Since FastBCP 1.6.5, [`FASTBCP_UID_STRING_CASING`](/latest/documentation/environment-variables/fastbcp-uid-string-casing.md) applies to `backup_mssql` too. To get `geography` and `geometry` another way, give the connection as a connection string: `adbc.arpemsbackup.geospatial=wkb` writes plain WKB without the metadata, and `varbinary` writes the SQL Server binary serialization, as before 1.6.5. ``` --sourceconnectstring "adbc.arpemsbackup.path=D:\Backups\MSSQL;adbc.arpemsbackup.file=mydb.bak;adbc.arpemsbackup.geospatial=varbinary" ``` `json` and `vector(n, float16)` columns are refused A table with such a column is refused with a message naming the column (`column j: json (SQL Server 2025) is not supported`). Export the other columns by listing them in `--query`, or export the table with [`adbc_mssql`](/latest/datatypes-conversion/mssql/adbc-parquet.md). --- # SQL Server → Parquet Datatypes conversion mapping when exporting from **SQL Server** (`--connectiontype mssql`) to **Parquet** format. | | | | --------------- | ------------------------------------------------- | | **Source** | SQL Server (mssql) | | **Format** | Parquet | | **FastBCP** | 1.4.0.0 (SQL Server 2025 types: 1.6.4.0) | | **Test Status** | PARTIAL (32/33 Nullable) — `vector` not supported | ## Parquet Schema: testdatatypes\_nullable[​](#parquet-schema-testdatatypes_nullable "Direct link to Parquet Schema: testdatatypes_nullable") | name | physical\_type | converted\_type | logical\_type | | --------------------- | ----------------------- | ----------------- | ---------------------------------------- | | col\_bigint | INT64 | INT\_64 | IntType(bitWidth=64, isSigned=1) | | col\_int | INT32 | INT\_32 | IntType(bitWidth=32, isSigned=1) | | col\_smallint | INT32 | INT\_16 | IntType(bitWidth=16, isSigned=1) | | col\_tinyint | INT32 | UINT\_8 | IntType(bitWidth=8, isSigned=0) | | col\_bit | BOOLEAN | — | — | | col\_decimal | INT64 | DECIMAL | DecimalType(scale=2, precision=18) | | col\_numeric | INT64 | DECIMAL | DecimalType(scale=2, precision=18) | | col\_money | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=4, precision=19) | | col\_smallmoney | INT64 | DECIMAL | DecimalType(scale=4, precision=10) | | col\_float | DOUBLE | — | — | | col\_real | FLOAT | — | — | | col\_date | INT32 | DATE | — | | col\_time | INT64 | — | TimeType(isAdjustedToUTC=0, unit=MICROS) | | col\_datetime | INT64 | TIMESTAMP\_MILLIS | — | | col\_datetime2 | INT64 | TIMESTAMP\_MILLIS | — | | col\_datetimeoffset | BYTE\_ARRAY | UTF8 | StringType() | | col\_smalldatetime | INT64 | TIMESTAMP\_MILLIS | — | | col\_char | BYTE\_ARRAY | UTF8 | StringType() | | col\_varchar | BYTE\_ARRAY | UTF8 | StringType() | | col\_nchar | BYTE\_ARRAY | UTF8 | StringType() | | col\_nvarchar | BYTE\_ARRAY | UTF8 | StringType() | | col\_text | BYTE\_ARRAY | UTF8 | StringType() | | col\_ntext | BYTE\_ARRAY | UTF8 | StringType() | | col\_binary | BYTE\_ARRAY | — | — | | col\_varbinary | BYTE\_ARRAY | — | — | | col\_image | BYTE\_ARRAY | — | — | | col\_uniqueidentifier | BYTE\_ARRAY | UTF8 | StringType() | | col\_xml | BYTE\_ARRAY | UTF8 | StringType() | | col\_sql\_variant | BYTE\_ARRAY | UTF8 | StringType() | | col\_geography | BYTE\_ARRAY | UTF8 | StringType() | | col\_geometry | BYTE\_ARRAY | UTF8 | StringType() | | col\_json | BYTE\_ARRAY | UTF8 | StringType() | | col\_vector | BYTE\_ARRAY | UTF8 | StringType() | `col_json` (`json`) and `col_vector` (`vector(3)`) are SQL Server 2025 types, tested with FastBCP 1.6.4.0. * `json` is exported as text: the JSON document. `vector` is not supported by `mssql` The export succeeds, but every `vector` value is written as the text ``Microsoft.Data.SqlTypes.SqlVector`1[System.Single]`` instead of the data. Use [`adbc_mssql`](/latest/datatypes-conversion/mssql/adbc-parquet.md), which exports a list of floats, or convert the column in `--query`: `CAST(col_vector AS json)` gives the JSON array (`[0.5000000000,1.5000000000,2.5000000000]`). SQL Server refuses `CAST(col_vector AS nvarchar(max))` (error 42211); `nvarchar(4000)` and `varchar(8000)` work. --- # MySQL → Parquet Datatypes conversion mapping when exporting from **MySQL** (`--connectiontype mysql`) to **Parquet** format. | | | | --------------- | --------------- | | **Source** | MySQL (mysql) | | **Format** | Parquet | | **FastBCP** | 1.4.0.0 | | **Test Status** | PASS (Nullable) | ## Parquet Schema: testdatatypes\_nullable[​](#parquet-schema-testdatatypes_nullable "Direct link to Parquet Schema: testdatatypes_nullable") | name | physical\_type | converted\_type | logical\_type | | --------------- | -------------- | ----------------- | ---------------------------------- | | col\_bigint | INT64 | INT\_64 | IntType(bitWidth=64, isSigned=1) | | col\_int | INT32 | INT\_32 | IntType(bitWidth=32, isSigned=1) | | col\_mediumint | INT32 | INT\_32 | IntType(bitWidth=32, isSigned=1) | | col\_smallint | INT32 | INT\_16 | IntType(bitWidth=16, isSigned=1) | | col\_tinyint | BYTE\_ARRAY | UTF8 | StringType() | | col\_bit | BYTE\_ARRAY | UTF8 | StringType() | | col\_decimal | INT64 | DECIMAL | DecimalType(scale=2, precision=18) | | col\_float | FLOAT | — | — | | col\_double | DOUBLE | — | — | | col\_date | INT64 | TIMESTAMP\_MILLIS | — | | col\_time | BYTE\_ARRAY | UTF8 | StringType() | | col\_datetime | INT64 | TIMESTAMP\_MILLIS | — | | col\_timestamp | INT64 | TIMESTAMP\_MILLIS | — | | col\_year | INT32 | INT\_32 | IntType(bitWidth=32, isSigned=1) | | col\_char | BYTE\_ARRAY | UTF8 | StringType() | | col\_varchar | BYTE\_ARRAY | UTF8 | StringType() | | col\_tinytext | BYTE\_ARRAY | UTF8 | StringType() | | col\_text | BYTE\_ARRAY | UTF8 | StringType() | | col\_mediumtext | BYTE\_ARRAY | UTF8 | StringType() | | col\_longtext | BYTE\_ARRAY | UTF8 | StringType() | | col\_binary | BYTE\_ARRAY | — | — | | col\_varbinary | BYTE\_ARRAY | — | — | | col\_tinyblob | BYTE\_ARRAY | — | — | | col\_blob | BYTE\_ARRAY | — | — | | col\_mediumblob | BYTE\_ARRAY | — | — | | col\_longblob | BYTE\_ARRAY | — | — | | col\_enum | BYTE\_ARRAY | UTF8 | StringType() | | col\_set | BYTE\_ARRAY | UTF8 | StringType() | | col\_json | BYTE\_ARRAY | UTF8 | StringType() | | col\_geometry | BYTE\_ARRAY | — | — | | col\_point | BYTE\_ARRAY | — | — | | col\_linestring | BYTE\_ARRAY | — | — | | col\_polygon | BYTE\_ARRAY | — | — | ## Notes[​](#notes "Direct link to Notes") * `BIGINT UNSIGNED` is written as an unsigned 64-bit integer (INT64 with the `UINT_64` logical type, `UBIGINT` in DuckDB) since FastBCP 1.6.4; it was written as text before. --- # Oracle (ADBC) → Parquet Datatypes conversion mapping when exporting from **Oracle** using the ADBC connector (`--connectiontype adbc_oracle`) to **Parquet** format. Platform availability The ADBC FastDriver connectors are available on **Windows x64** and **Linux x64** only. They are **not** supported on **Linux ARM64**. info The ADBC connector does not map every type the way the standard [`oraodp`](/latest/datatypes-conversion/oracle/parquet.md) driver does. Compare both pages before switching. | | | | --------------- | ------------------------ | | **Source** | Oracle (adbc\_oracle) | | **Format** | Parquet | | **FastBCP** | 1.4.0.0 | | **Test Status** | PARTIAL (21/25 Nullable) | Failed Types The following datatypes are **not supported** with this connector: * `ROWID` — export fails * `UROWID` — export fails * `XMLTYPE` — export fails * `BFILE` — export fails ## Parquet Schema: testdatatypes\_nullable[​](#parquet-schema-testdatatypes_nullable "Direct link to Parquet Schema: testdatatypes_nullable") | name | physical\_type | converted\_type | logical\_type | | ------------------- | ----------------------- | ----------------- | --------------------------------------------- | | COL\_NUMBER | BYTE\_ARRAY | UTF8 | StringType() | | COL\_NUMBER10 | INT64 | — | — | | COL\_NUMBER18\_2 | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=2, precision=18) | | COL\_FLOAT | BYTE\_ARRAY | UTF8 | StringType() | | COL\_BINARY\_FLOAT | FLOAT | — | — | | COL\_BINARY\_DOUBLE | DOUBLE | — | — | | COL\_CHAR | BYTE\_ARRAY | UTF8 | StringType() | | COL\_VARCHAR2 | BYTE\_ARRAY | UTF8 | StringType() | | COL\_NCHAR | BYTE\_ARRAY | UTF8 | StringType() | | COL\_NVARCHAR2 | BYTE\_ARRAY | UTF8 | StringType() | | COL\_CLOB | BYTE\_ARRAY | UTF8 | StringType() | | COL\_NCLOB | BYTE\_ARRAY | UTF8 | StringType() | | COL\_BLOB | BYTE\_ARRAY | — | — | | COL\_RAW | BYTE\_ARRAY | — | — | | COL\_LONG\_RAW | BYTE\_ARRAY | — | — | | COL\_DATE | INT64 | TIMESTAMP\_MILLIS | TimestampType(isAdjustedToUTC=0, unit=MILLIS) | | COL\_TIMESTAMP | INT64 | TIMESTAMP\_MICROS | TimestampType(isAdjustedToUTC=0, unit=MICROS) | | COL\_TIMESTAMP\_TZ | INT64 | TIMESTAMP\_MICROS | TimestampType(isAdjustedToUTC=1, unit=MICROS) | | COL\_TIMESTAMP\_LTZ | INT64 | TIMESTAMP\_MICROS | TimestampType(isAdjustedToUTC=1, unit=MICROS) | | COL\_INTERVAL\_YM | INT64 | — | — | | COL\_INTERVAL\_DS | BYTE\_ARRAY | UTF8 | StringType() | --- # Oracle RMAN backup sets → Parquet Datatypes conversion mapping when exporting a table from **Oracle RMAN backup sets** (full and incremental) using the ArpeOraBackup ADBC driver (`--connectiontype backup_rman`) to **Parquet** format. Platform availability `backup_rman` is available on **Windows x64** and **Linux x64** only. It is **not** supported on **Linux ARM64**. Compared with `adbc_oracle` For the types both connectors read, the mapping is the one of [`adbc_oracle`](/latest/datatypes-conversion/oracle/adbc-parquet.md), with the same values. | | | | --------------- | -------------------------------------------------------------------------- | | **Source** | Oracle RMAN backup sets (backup\_rman) | | **Format** | Parquet | | **FastBCP** | 1.6.4.0 | | **Test Status** | OK (16/16 Nullable) — Oracle 19c, 23ai and 26ai backups, every compression | ## Parquet Schema[​](#parquet-schema "Direct link to Parquet Schema") | Oracle type | physical\_type | converted\_type | logical\_type | | ----------------------------------- | ----------------------- | ----------------- | --------------------------------------------- | | `NUMBER(10)` | INT64 | — | — | | `NUMBER` | BYTE\_ARRAY | UTF8 | StringType() | | `FLOAT` | BYTE\_ARRAY | UTF8 | StringType() | | `NUMBER(18)` | INT64 | — | — | | `NUMBER(12,4)` | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=4, precision=12) | | `NUMBER(38)` | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=0, precision=38) | | `VARCHAR2(200)` | BYTE\_ARRAY | UTF8 | StringType() | | `CHAR(10)` | BYTE\_ARRAY | UTF8 | StringType() | | `NVARCHAR2(100)` | BYTE\_ARRAY | UTF8 | StringType() | | `NCHAR(5)` | BYTE\_ARRAY | UTF8 | StringType() | | `BINARY_FLOAT` | FLOAT | — | — | | `BINARY_DOUBLE` | DOUBLE | — | — | | `DATE` | INT64 | TIMESTAMP\_MILLIS | TimestampType(isAdjustedToUTC=0, unit=MILLIS) | | `TIMESTAMP(0)` | INT64 | TIMESTAMP\_MILLIS | TimestampType(isAdjustedToUTC=0, unit=MILLIS) | | `TIMESTAMP(6)` | INT64 | TIMESTAMP\_MICROS | TimestampType(isAdjustedToUTC=0, unit=MICROS) | | `TIMESTAMP(9)` | INT64 | — | TimestampType(isAdjustedToUTC=0, unit=NANOS) | | `TIMESTAMP(6) WITH TIME ZONE` | INT64 | TIMESTAMP\_MICROS | TimestampType(isAdjustedToUTC=1, unit=MICROS) | | `TIMESTAMP(6) WITH LOCAL TIME ZONE` | INT64 | TIMESTAMP\_MICROS | TimestampType(isAdjustedToUTC=1, unit=MICROS) | | `RAW(100)` | BYTE\_ARRAY | — | — | | `LONG` | BYTE\_ARRAY | UTF8 | StringType() | | `LONG RAW` | BYTE\_ARRAY | — | — | Refused columns LOB (`CLOB`, `NCLOB`, `BLOB`, `BFILE`), `INTERVAL`, `ROWID` / `UROWID`, `JSON`, `VECTOR`, `XMLTYPE` and object columns cannot be exported: a table with such a column is refused with a message naming the column. Export the other columns by listing them in `--query`. --- # Oracle → Parquet Datatypes conversion mapping when exporting from **Oracle** (`--connectiontype oraodp`) to **Parquet** format. | | | | --------------- | --------------- | | **Source** | Oracle (oraodp) | | **Format** | Parquet | | **FastBCP** | 1.4.0.0 | | **Test Status** | PASS (Nullable) | ## Parquet Schema: testdatatypes\_nullable[​](#parquet-schema-testdatatypes_nullable "Direct link to Parquet Schema: testdatatypes_nullable") | name | physical\_type | converted\_type | logical\_type | | ------------------- | ----------------------- | ----------------- | ----------------------------------- | | COL\_NUMBER | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=18, precision=38) | | COL\_NUMBER10 | INT64 | INT\_64 | IntType(bitWidth=64, isSigned=1) | | COL\_NUMBER18\_2 | INT64 | DECIMAL | DecimalType(scale=2, precision=18) | | COL\_FLOAT | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=18, precision=38) | | COL\_BINARY\_FLOAT | FLOAT | — | — | | COL\_BINARY\_DOUBLE | DOUBLE | — | — | | COL\_CHAR | BYTE\_ARRAY | UTF8 | StringType() | | COL\_VARCHAR2 | BYTE\_ARRAY | UTF8 | StringType() | | COL\_NCHAR | BYTE\_ARRAY | UTF8 | StringType() | | COL\_NVARCHAR2 | BYTE\_ARRAY | UTF8 | StringType() | | COL\_CLOB | BYTE\_ARRAY | UTF8 | StringType() | | COL\_NCLOB | BYTE\_ARRAY | UTF8 | StringType() | | COL\_BLOB | BYTE\_ARRAY | — | — | | COL\_RAW | BYTE\_ARRAY | — | — | | COL\_LONG\_RAW | BYTE\_ARRAY | — | — | | COL\_DATE | INT64 | TIMESTAMP\_MILLIS | — | | COL\_TIMESTAMP | INT64 | TIMESTAMP\_MILLIS | — | | COL\_TIMESTAMP\_TZ | BYTE\_ARRAY | UTF8 | StringType() | | COL\_TIMESTAMP\_LTZ | INT64 | TIMESTAMP\_MILLIS | — | | COL\_INTERVAL\_YM | INT64 | INT\_64 | IntType(bitWidth=64, isSigned=1) | | COL\_INTERVAL\_DS | BYTE\_ARRAY | UTF8 | StringType() | | COL\_ROWID | BYTE\_ARRAY | UTF8 | StringType() | | COL\_UROWID | BYTE\_ARRAY | UTF8 | StringType() | | COL\_XMLTYPE | BYTE\_ARRAY | UTF8 | StringType() | | COL\_BFILE | BYTE\_ARRAY | — | — | --- # Datatypes Conversion When FastBCP exports a table, every native source column type is mapped to a type in the target output format. This section documents the **exact mappings** FastBCP produces. These pages are not a specification: each one is the Parquet schema read back from a real export of a test table covering all of the source's native datatypes. ## Supported Sources[​](#supported-sources "Direct link to Supported Sources") Sources are grouped by database system. A system can be read through several connection types (`--connectiontype`), and each one has its own page because the mappings it produces can differ — `pgcopy` produces exactly the same mappings as `pgsql`, while the ADBC connectors differ from their standard counterparts on several types. Mappings per connection type One page per database system and connection type (--connectiontype) * [![](/img/logos/sqlserver.svg)SQL Server](/latest/datatypes-conversion/mssql/parquet.md)`mssql` * [![](/img/logos/sqlserver.svg)SQL Server](/latest/datatypes-conversion/mssql/adbc-parquet.md)`adbc_mssql` * [![](/img/logos/sqlserver.svg)SQL Server](/latest/datatypes-conversion/mssql/backup-parquet.md)`backup_mssql` (backup files) * [![](/img/logos/mysql.svg)MySQL](/latest/datatypes-conversion/mysql/parquet.md)`mysql` * [![](/img/logos/oracle.svg)Oracle](/latest/datatypes-conversion/oracle/parquet.md)`oraodp` * [![](/img/logos/oracle.svg)Oracle](/latest/datatypes-conversion/oracle/adbc-parquet.md)`adbc_oracle` * [![](/img/logos/oracle.svg)Oracle](/latest/datatypes-conversion/oracle/backup-parquet.md)`backup_rman` (RMAN backup sets) * [![](/img/logos/postgresql.svg)PostgreSQL](/latest/datatypes-conversion/postgresql/parquet.md)`pgsql` * [![](/img/logos/postgresql.svg)PostgreSQL](/latest/datatypes-conversion/postgresql-copy/parquet.md)`pgcopy` * [![](/img/logos/postgresql.svg)PostgreSQL](/latest/datatypes-conversion/postgresql/adbc-parquet.md)`adbc_pgsql` * [![](/img/logos/sap.svg)SAP HANA](/latest/datatypes-conversion/saphana/parquet.md)`hana` * [![](/img/logos/teradata.svg)Teradata](/latest/datatypes-conversion/teradata/parquet.md)`teradata` Parquet is the only output format documented here. ## How to Read a Page[​](#how-to-read-a-page "Direct link to How to Read a Page") Each page opens with a summary of the export it documents — source, output format, the FastBCP build used and the test status — followed by the Parquet schema produced from the **`testdatatypes_nullable`** table, in which every column accepts `NULL`. | Column | Description | | ------------------- | ------------------------------------------------------------------------------------------------------------------------- | | **name** | The column name in the source table | | **physical\_type** | The Parquet physical storage type: `BOOLEAN`, `INT32`, `INT64`, `FLOAT`, `DOUBLE`, `BYTE_ARRAY` or `FIXED_LEN_BYTE_ARRAY` | | **converted\_type** | The legacy Parquet annotation on top of it (`UTF8`, `DECIMAL`, `DATE`, `TIMESTAMP_MILLIS`, …) | | **logical\_type** | The modern Parquet annotation (`StringType()`, `DecimalType(scale=2, precision=18)`, `IntType(…)`, …) | A `—` means the column carries no annotation of that kind, so the physical type alone describes it. Good to know **NOT NULL columns**: declaring the source columns `NOT NULL` does not change the mapping. The only difference is the Parquet repetition level (REQUIRED instead of OPTIONAL), which these tables do not show. --- # PostgreSQL COPY → Parquet Datatypes conversion mapping when exporting from **PostgreSQL** using the COPY protocol (`--connectiontype pgcopy`) to **Parquet** format. info The COPY protocol variant produces the same type mappings as the standard PostgreSQL driver. See also [PostgreSQL (pgsql)](/latest/datatypes-conversion/postgresql/parquet.md). | | | | --------------- | ------------------------ | | **Source** | PostgreSQL COPY (pgcopy) | | **Format** | Parquet | | **FastBCP** | 1.4.0.0 | | **Test Status** | PASS (Nullable) | ## Parquet Schema: testdatatypes\_nullable[​](#parquet-schema-testdatatypes_nullable "Direct link to Parquet Schema: testdatatypes_nullable") | name | physical\_type | converted\_type | logical\_type | | ---------------------- | ----------------------- | ----------------- | ---------------------------------------- | | col\_bigint | INT64 | INT\_64 | IntType(bitWidth=64, isSigned=1) | | col\_integer | INT32 | INT\_32 | IntType(bitWidth=32, isSigned=1) | | col\_smallint | INT32 | INT\_16 | IntType(bitWidth=16, isSigned=1) | | col\_boolean | BOOLEAN | — | — | | col\_numeric | INT64 | DECIMAL | DecimalType(scale=2, precision=18) | | col\_real | FLOAT | — | — | | col\_double\_precision | DOUBLE | — | — | | col\_money | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=4, precision=19) | | col\_date | INT32 | DATE | — | | col\_time | INT32 | TIME\_MILLIS | TimeType(isAdjustedToUTC=0, unit=MILLIS) | | col\_timestamp | INT64 | TIMESTAMP\_MILLIS | — | | col\_timestamptz | BYTE\_ARRAY | UTF8 | StringType() | | col\_interval | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | col\_char | BYTE\_ARRAY | UTF8 | StringType() | | col\_varchar | BYTE\_ARRAY | UTF8 | StringType() | | col\_text | BYTE\_ARRAY | UTF8 | StringType() | | col\_bytea | BYTE\_ARRAY | — | — | | col\_uuid | BYTE\_ARRAY | UTF8 | StringType() | | col\_json | BYTE\_ARRAY | UTF8 | StringType() | | col\_jsonb | BYTE\_ARRAY | — | — | | col\_xml | BYTE\_ARRAY | UTF8 | StringType() | | col\_inet | BYTE\_ARRAY | UTF8 | StringType() | | col\_cidr | BYTE\_ARRAY | UTF8 | StringType() | | col\_macaddr | BYTE\_ARRAY | UTF8 | StringType() | | col\_point | BYTE\_ARRAY | UTF8 | StringType() | | col\_line | BYTE\_ARRAY | UTF8 | StringType() | | col\_lseg | BYTE\_ARRAY | UTF8 | StringType() | | col\_box | BYTE\_ARRAY | UTF8 | StringType() | | col\_path | BYTE\_ARRAY | UTF8 | StringType() | | col\_polygon | BYTE\_ARRAY | UTF8 | StringType() | | col\_circle | BYTE\_ARRAY | UTF8 | StringType() | | col\_int4range | BYTE\_ARRAY | UTF8 | StringType() | | col\_int8range | BYTE\_ARRAY | UTF8 | StringType() | | col\_numrange | BYTE\_ARRAY | UTF8 | StringType() | | col\_tsrange | BYTE\_ARRAY | UTF8 | StringType() | | col\_tstzrange | BYTE\_ARRAY | UTF8 | StringType() | | col\_daterange | BYTE\_ARRAY | UTF8 | StringType() | | col\_bit | BYTE\_ARRAY | UTF8 | StringType() | | col\_bit\_varying | BYTE\_ARRAY | UTF8 | StringType() | | col\_oid | BYTE\_ARRAY | UTF8 | StringType() | | col\_int\_array | BYTE\_ARRAY | UTF8 | StringType() | --- # PostgreSQL (ADBC) → Parquet Datatypes conversion mapping when exporting from **PostgreSQL** using the ADBC connector (`--connectiontype adbc_pgsql`) to **Parquet** format. Platform availability The ADBC FastDriver connectors (`adbc_mssql`, `adbc_pgsql`) are available on **Windows x64** and **Linux x64** only. They are **not** supported on **Linux ARM64**. info The ADBC connector does not map every type the way the standard [`pgsql`](/latest/datatypes-conversion/postgresql/parquet.md) driver does. Compare both pages before switching. | | | | --------------- | ------------------------ | | **Source** | PostgreSQL (adbc\_pgsql) | | **Format** | Parquet | | **FastBCP** | 1.4.0.0 | | **Test Status** | PARTIAL (40/41 Nullable) | Failed Types The following datatype is **not supported** with this connector: * `INTERVAL` — export fails ## Parquet Schema: testdatatypes\_nullable[​](#parquet-schema-testdatatypes_nullable "Direct link to Parquet Schema: testdatatypes_nullable") | name | physical\_type | converted\_type | logical\_type | | ---------------------- | ----------------------- | ----------------- | --------------------------------------------- | | col\_bigint | INT64 | — | — | | col\_integer | INT32 | — | — | | col\_smallint | INT32 | INT\_16 | IntType(bitWidth=16, isSigned=1) | | col\_boolean | BOOLEAN | — | — | | col\_numeric | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=2, precision=18) | | col\_real | FLOAT | — | — | | col\_double\_precision | DOUBLE | — | — | | col\_money | BYTE\_ARRAY | — | — | | col\_date | INT32 | DATE | DateType() | | col\_time | INT64 | — | TimeType(isAdjustedToUTC=0, unit=MICROS) | | col\_timestamp | INT64 | TIMESTAMP\_MICROS | TimestampType(isAdjustedToUTC=0, unit=MICROS) | | col\_timestamptz | INT64 | TIMESTAMP\_MICROS | TimestampType(isAdjustedToUTC=1, unit=MICROS) | | col\_char | BYTE\_ARRAY | UTF8 | StringType() | | col\_varchar | BYTE\_ARRAY | UTF8 | StringType() | | col\_text | BYTE\_ARRAY | UTF8 | StringType() | | col\_bytea | BYTE\_ARRAY | — | — | | col\_uuid | BYTE\_ARRAY | UTF8 | StringType() | | col\_json | BYTE\_ARRAY | UTF8 | StringType() | | col\_jsonb | BYTE\_ARRAY | UTF8 | StringType() | | col\_xml | BYTE\_ARRAY | UTF8 | StringType() | | col\_inet | BYTE\_ARRAY | UTF8 | StringType() | | col\_cidr | BYTE\_ARRAY | UTF8 | StringType() | | col\_macaddr | BYTE\_ARRAY | UTF8 | StringType() | | col\_point | BYTE\_ARRAY | — | — | | col\_line | BYTE\_ARRAY | — | — | | col\_lseg | BYTE\_ARRAY | — | — | | col\_box | BYTE\_ARRAY | — | — | | col\_path | BYTE\_ARRAY | — | — | | col\_polygon | BYTE\_ARRAY | — | — | | col\_circle | BYTE\_ARRAY | — | — | | col\_int4range | BYTE\_ARRAY | — | — | | col\_int8range | BYTE\_ARRAY | — | — | | col\_numrange | BYTE\_ARRAY | — | — | | col\_tsrange | BYTE\_ARRAY | — | — | | col\_tstzrange | BYTE\_ARRAY | — | — | | col\_daterange | BYTE\_ARRAY | — | — | | col\_bit | BYTE\_ARRAY | UTF8 | StringType() | | col\_bit\_varying | BYTE\_ARRAY | UTF8 | StringType() | | col\_oid | INT32 | — | — | | col\_int\_array | BYTE\_ARRAY | — | — | --- # PostgreSQL → Parquet Datatypes conversion mapping when exporting from **PostgreSQL** (`--connectiontype pgsql`) to **Parquet** format. info [PostgreSQL COPY](/latest/datatypes-conversion/postgresql-copy/parquet.md) (`--connectiontype pgcopy`) produces identical type mappings. The [ADBC connector](/latest/datatypes-conversion/postgresql/adbc-parquet.md) (`--connectiontype adbc_pgsql`) does not. | | | | --------------- | ------------------ | | **Source** | PostgreSQL (pgsql) | | **Format** | Parquet | | **FastBCP** | 1.4.0.0 | | **Test Status** | PASS (Nullable) | ## Parquet Schema: testdatatypes\_nullable[​](#parquet-schema-testdatatypes_nullable "Direct link to Parquet Schema: testdatatypes_nullable") | name | physical\_type | converted\_type | logical\_type | | ---------------------- | ----------------------- | ----------------- | ---------------------------------------- | | col\_bigint | INT64 | INT\_64 | IntType(bitWidth=64, isSigned=1) | | col\_integer | INT32 | INT\_32 | IntType(bitWidth=32, isSigned=1) | | col\_smallint | INT32 | INT\_16 | IntType(bitWidth=16, isSigned=1) | | col\_boolean | BOOLEAN | — | — | | col\_numeric | INT64 | DECIMAL | DecimalType(scale=2, precision=18) | | col\_real | FLOAT | — | — | | col\_double\_precision | DOUBLE | — | — | | col\_money | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=4, precision=19) | | col\_date | INT32 | DATE | — | | col\_time | INT32 | TIME\_MILLIS | TimeType(isAdjustedToUTC=0, unit=MILLIS) | | col\_timestamp | INT64 | TIMESTAMP\_MILLIS | — | | col\_timestamptz | BYTE\_ARRAY | UTF8 | StringType() | | col\_interval | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | col\_char | BYTE\_ARRAY | UTF8 | StringType() | | col\_varchar | BYTE\_ARRAY | UTF8 | StringType() | | col\_text | BYTE\_ARRAY | UTF8 | StringType() | | col\_bytea | BYTE\_ARRAY | — | — | | col\_uuid | BYTE\_ARRAY | UTF8 | StringType() | | col\_json | BYTE\_ARRAY | UTF8 | StringType() | | col\_jsonb | BYTE\_ARRAY | — | — | | col\_xml | BYTE\_ARRAY | UTF8 | StringType() | | col\_inet | BYTE\_ARRAY | UTF8 | StringType() | | col\_cidr | BYTE\_ARRAY | UTF8 | StringType() | | col\_macaddr | BYTE\_ARRAY | UTF8 | StringType() | | col\_point | BYTE\_ARRAY | UTF8 | StringType() | | col\_line | BYTE\_ARRAY | UTF8 | StringType() | | col\_lseg | BYTE\_ARRAY | UTF8 | StringType() | | col\_box | BYTE\_ARRAY | UTF8 | StringType() | | col\_path | BYTE\_ARRAY | UTF8 | StringType() | | col\_polygon | BYTE\_ARRAY | UTF8 | StringType() | | col\_circle | BYTE\_ARRAY | UTF8 | StringType() | | col\_int4range | BYTE\_ARRAY | UTF8 | StringType() | | col\_int8range | BYTE\_ARRAY | UTF8 | StringType() | | col\_numrange | BYTE\_ARRAY | UTF8 | StringType() | | col\_tsrange | BYTE\_ARRAY | UTF8 | StringType() | | col\_tstzrange | BYTE\_ARRAY | UTF8 | StringType() | | col\_daterange | BYTE\_ARRAY | UTF8 | StringType() | | col\_bit | BYTE\_ARRAY | UTF8 | StringType() | | col\_bit\_varying | BYTE\_ARRAY | UTF8 | StringType() | | col\_oid | BYTE\_ARRAY | UTF8 | StringType() | | col\_int\_array | BYTE\_ARRAY | UTF8 | StringType() | --- # SAP HANA → Parquet Datatypes conversion mapping when exporting from **SAP HANA** (`--connectiontype hana`) to **Parquet** format. | | | | --------------- | --------------- | | **Source** | SAP HANA (hana) | | **Format** | Parquet | | **FastBCP** | 1.4.0.0 | | **Test Status** | PASS (Nullable) | ## Parquet Schema: testdatatypes\_nullable[​](#parquet-schema-testdatatypes_nullable "Direct link to Parquet Schema: testdatatypes_nullable") | name | physical\_type | converted\_type | logical\_type | | ----------------- | -------------- | ----------------- | ---------------------------------- | | COL\_TINYINT | INT32 | UINT\_8 | IntType(bitWidth=8, isSigned=0) | | COL\_SMALLINT | INT32 | INT\_16 | IntType(bitWidth=16, isSigned=1) | | COL\_INTEGER | INT32 | INT\_32 | IntType(bitWidth=32, isSigned=1) | | COL\_BIGINT | INT64 | INT\_64 | IntType(bitWidth=64, isSigned=1) | | COL\_DECIMAL | INT64 | DECIMAL | DecimalType(scale=2, precision=18) | | COL\_SMALLDECIMAL | INT64 | DECIMAL | DecimalType(scale=0, precision=16) | | COL\_REAL | FLOAT | — | — | | COL\_DOUBLE | DOUBLE | — | — | | COL\_FLOAT | DOUBLE | — | — | | COL\_BOOLEAN | BOOLEAN | — | — | | COL\_DATE | INT64 | TIMESTAMP\_MILLIS | — | | COL\_TIME | BYTE\_ARRAY | UTF8 | StringType() | | COL\_TIMESTAMP | INT64 | TIMESTAMP\_MILLIS | — | | COL\_SECONDDATE | INT64 | TIMESTAMP\_MILLIS | — | | COL\_CHAR | BYTE\_ARRAY | UTF8 | StringType() | | COL\_VARCHAR | BYTE\_ARRAY | UTF8 | StringType() | | COL\_NCHAR | BYTE\_ARRAY | UTF8 | StringType() | | COL\_NVARCHAR | BYTE\_ARRAY | UTF8 | StringType() | | COL\_ALPHANUM | BYTE\_ARRAY | UTF8 | StringType() | | COL\_CLOB | BYTE\_ARRAY | UTF8 | StringType() | | COL\_NCLOB | BYTE\_ARRAY | UTF8 | StringType() | | COL\_BLOB | BYTE\_ARRAY | — | — | | COL\_BINARY | BYTE\_ARRAY | — | — | | COL\_VARBINARY | BYTE\_ARRAY | — | — | | COL\_ST\_GEOMETRY | BYTE\_ARRAY | — | — | | COL\_ST\_POINT | BYTE\_ARRAY | — | — | | COL\_SHORTTEXT | BYTE\_ARRAY | UTF8 | StringType() | --- # Teradata → Parquet Datatypes conversion mapping when exporting from **Teradata** (`--connectiontype teradata`) to **Parquet** format. | | | | --------------- | ------------------- | | **Source** | Teradata (teradata) | | **Format** | Parquet | | **FastBCP** | 1.4.0.0 | | **Test Status** | PASS (Nullable) | ## Parquet Schema: testdatatypes\_nullable[​](#parquet-schema-testdatatypes_nullable "Direct link to Parquet Schema: testdatatypes_nullable") | name | physical\_type | converted\_type | logical\_type | | ------------------------ | ----------------------- | ----------------- | ---------------------------------------- | | col\_byteint | INT32 | INT\_16 | IntType(bitWidth=16, isSigned=1) | | col\_smallint | INT32 | INT\_16 | IntType(bitWidth=16, isSigned=1) | | col\_integer | INT32 | INT\_32 | IntType(bitWidth=32, isSigned=1) | | col\_bigint | INT64 | INT\_64 | IntType(bitWidth=64, isSigned=1) | | col\_decimal18\_2 | INT64 | DECIMAL | DecimalType(scale=2, precision=18) | | col\_float | DOUBLE | — | — | | col\_number | FIXED\_LEN\_BYTE\_ARRAY | DECIMAL | DecimalType(scale=18, precision=38) | | col\_number18\_2 | INT64 | DECIMAL | DecimalType(scale=2, precision=18) | | col\_date | INT32 | DATE | — | | col\_time | INT64 | — | TimeType(isAdjustedToUTC=0, unit=MICROS) | | col\_timestamp | INT64 | TIMESTAMP\_MILLIS | — | | col\_timestamp\_tz | BYTE\_ARRAY | UTF8 | StringType() | | tdintervalyear | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | tdintervalyeartomonth | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | tdintervalmonth | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | tdintervalday | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | tdintervaldaytohour | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | tdintervaldaytominute | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | tdintervaldaytosecond | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | tdintervalhour | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | tdintervalhourtominute | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | tdintervalhourtosecond | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | tdintervalminute | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | tdintervalminutetosecond | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | tdintervalsecond | FIXED\_LEN\_BYTE\_ARRAY | INTERVAL | — | | col\_real | DOUBLE | — | — | | col\_double\_precision | DOUBLE | — | — | | col\_char | BYTE\_ARRAY | UTF8 | StringType() | | col\_varchar | BYTE\_ARRAY | UTF8 | StringType() | | col\_clob | BYTE\_ARRAY | UTF8 | StringType() | | col\_byte | BYTE\_ARRAY | — | — | | col\_varbyte | BYTE\_ARRAY | — | — | | col\_blob | BYTE\_ARRAY | — | — | | col\_period\_date | BYTE\_ARRAY | UTF8 | StringType() | | col\_period\_timestamp | BYTE\_ARRAY | UTF8 | StringType() | | col\_json | BYTE\_ARRAY | UTF8 | StringType() | | col\_xml | BYTE\_ARRAY | UTF8 | StringType() | | col\_st\_geometry | BYTE\_ARRAY | UTF8 | StringType() | --- # Advanced Parameters This section covers advanced configuration options for FastBCP. ## Run ID[​](#run-id "Direct link to Run ID") The Run ID parameter `--runid` is a unique identifier for the current export operation. It can be used for tracking, logging, and monitoring purposes. Information If not specified, FastBCP will generate a unique Run ID automatically. Tips If possible, inject the RunId provided by the caller (e.g., SSIS, Airflow, or any scheduler that supports a run identifier). This will greatly facilitate log correlation and troubleshooting. ``` ./FastBCP \ ... --runid "export-2024-01-09-001" \ ... ``` `--runid`Long form only `--runid ""` ## Log Level[​](#log-level "Direct link to Log Level") The Log Level parameter `--loglevel` controls the verbosity of logging output during export operations. **Available values:** `Information`Default Standard logging with key operation details `Debug` Verbose logging with detailed diagnostic information ``` ./FastBCP \ ... --loglevel "Debug" \ ... ``` `--loglevel`Long form only `--loglevel ""` note If a settings file is specified with `--settingsfile`, the log level defined in the settings file takes precedence unless overridden by the command-line parameter. Information See [Logging Overview](/latest/documentation/logging/Overview.md) for detailed information about logging configuration and output. ## Settings File[​](#settings-file "Direct link to Settings File") The Settings File parameter `--settingsfile` allows you to store all FastBCP parameters in a configuration file, making it easier to manage complex exports and reuse configurations. ``` ./FastBCP \ ... --settingsfile "/path/to/config/export-config.json" \ ... ``` `--settingsfile`Long form only `--settingsfile ""` Information See [Logging Overview](/latest/documentation/logging/Overview.md) for examples of settings file configuration. ## Config File[​](#config-file "Direct link to Config File") The Config File parameter `--config` allows you to define all FastBCP parameters in a YAML configuration file. This provides a more structured and readable way to manage export configurations compared to JSON settings files. * Windows * Linux ``` .\FastBCP.exe --config samples\sample_mssql_to_csv.yaml ``` ``` ./FastBCP --config samples/sample_mssql_to_csv.yaml ``` `--config`Long form only `--config ""` ### YAML Configuration Example[​](#yaml-configuration-example "Direct link to YAML Configuration Example") Here's a complete example of a YAML configuration file: ``` # FastBCP – MSSQL to CSV using RangeId parallel method # # Usage: # .\FastBCP.exe --config samples\sample_mssql_to_csv.yaml connection: type: mssql server: localhost database: tpch10_collation_bin2 trusted: true source: schema: dbo table: orders output: file: "mssql_orders_{startdate}.csv" directory: 'D:\temp\{database}\{schema}\{table}\full\' delimiter: "|" decimal_separator: "." date_format: "yyyy-MM-dd HH:mm:ss" encoding: UTF-8 performance: method: RangeId degree: -2 distribute_key_column: o_orderkey merge: false logging: run_id: mssql_to_csv_parallel-2_rangeid ``` Benefits of YAML Configuration * **Structured and readable**: YAML format is more human-friendly than JSON * **Comments support**: Add documentation directly in your configuration files * **Reusable configurations**: Version control your export settings * **Simplified command-line**: Reduce complex exports to a single `--config` parameter ## Traceparent[​](#traceparent "Direct link to Traceparent") The `--traceparent` parameter accepts a [W3C Trace Context](https://www.w3.org/TR/trace-context/) traceparent identifier from an external caller. This enables distributed trace correlation between FastBCP and upstream systems such as orchestrators, APIs, or CI/CD pipelines. Information See [OpenTelemetry](/latest/documentation/logging/OpenTelemetry.md) for detailed information about configuring OpenTelemetry tracing and log export. ``` ./FastBCP \ ... --traceparent "00-abcdef1234567890abcdef1234567890-1234567890abcdef-01" \ ... ``` `--traceparent`Long form only `--traceparent ""` ## No Banner[​](#no-banner "Direct link to No Banner") Disable the FastBCP banner display in the command line output. This is useful for scripting or when you want cleaner output in automated processes. **Example:** ``` ./FastBCP \ ... --nobanner \ ... ``` `--nobanner` Switch, no value (long form). Clean Output Using `--nobanner` is recommended when running FastBCP 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 ``` .\FastBCP.exe ` --connectiontype "oraodp" ` --server "localhost:1521/OraService" ` --database "tpch" ` --user "FastUser" ` --password "FastPassword" ` --sourceschema "TPCH" ` --sourcetable "ORDERS" ` --directory "D:\temp" ` --fileoutput "orders.xlsx" ` --encoding "UTF-8" ` --parallelmethod "Physical" ` --paralleldegree 7 ` --merge false ` --loglevel "Debug" ` --runid "oracle_to_excel_parallel_physical" ` --settingsfile "C:\config\oracle-export.json" ` --nobanner ``` ``` ./FastBCP \ --connectiontype "oraodp" \ --server "localhost:1521/OraService" \ --database "tpch" \ --user "FastUser" \ --password "FastPassword" \ --sourceschema "TPCH" \ --sourcetable "ORDERS" \ --directory "/temp" \ --fileoutput "orders.xlsx" \ --encoding "UTF-8" \ --parallelmethod "Physical" \ --paralleldegree 7 \ --merge false \ --loglevel "Debug" \ --runid "oracle_to_excel_parallel_physical" \ --settingsfile "/config/oracle-export.json" \ --nobanner ``` This example: * Connects to an Oracle database using the Physical parallel method (resolved to Rowid on Oracle) * Exports ORDERS table to Excel format with UTF-8 encoding * Uses 7 parallel threads with separate files (merge=false) * Enables Debug logging for detailed diagnostics * Uses a custom Run ID for tracking * Loads additional configuration from a settings file * Disables the banner for cleaner output Related * [Logging Overview](/latest/documentation/logging/Overview.md)logging configuration, output and settings file examples * [OpenTelemetry](/latest/documentation/logging/OpenTelemetry.md)OpenTelemetry tracing and log export --- # Authentication FastBCP supports two types of authentication methods depending on your database platform. ## Authentication Methods[​](#authentication-methods "Direct link to Authentication Methods") ### 1. Trusted Connection[​](#1-trusted-connection "Direct link to 1. Trusted Connection") Uses the current Windows user's credentials or the operating system authentication if allowed by the RDBMS. ``` .\FastBCP.exe ` ... --trusted ` ... ``` `--trusted`or`-A` Switch, no value (short form: `-A`). Warning This method is only available if your RDBMS supports trusted/integrated authentication (e.g., SQL Server with Windows Authentication). ### 2. SQL Login with Username and Password[​](#2-sql-login-with-username-and-password "Direct link to 2. SQL Login with Username and Password") Standard database authentication with explicit credentials. ``` ./FastBCP ` ... --user "myuser" ` --password "mypassword" ` ... ``` `--user`or`-U` Username: `--user "username"` (short form: `-U "username"`) `--password`or`-X` Password: `--password "password"` (short form: `-X "password"`) ### Alternative: Connection String Parameter[​](#alternative-connection-string-parameter "Direct link to Alternative: Connection String Parameter") You can also use the `--sourceconnectstring` parameter where you pass the user and password directly in the connection string. This parameter will be covered in detail in the [Connection Parameters](/latest/documentation/cli/connection_parameters.md#source-connection-string) section. Password Security in Logs All passwords passed either through the `--password` parameter or within the `--sourceconnectstring` parameter 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 FASTBCP\_USER and FASTBCP\_PASSWORD for exemple or store the password in an encrypted file. Up to you to decrypt the file and it’s content before using it in a shell variable that will be used with FastBCP. Related * [Connection Parameters](/latest/documentation/cli/connection_parameters.md#source-connection-string)the `--sourceconnectstring` parameter --- # Cloud Options FastBCP supports direct exports to cloud storage platforms: AWS S3, Azure Blob Storage, Azure Data Lake Gen2, and Google Cloud Storage. For detailed cloud authentication setup and configuration, see the [Cloud Connectivity](/latest/documentation/cloud-connectivity/overview.md) documentation. note FastBCP will use multi-part uploads for all cloud provider Warning Since FastBCP 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**. ## Supported Cloud Platforms[​](#supported-cloud-platforms "Direct link to Supported Cloud Platforms") To export data to a cloud storage service, use the URI scheme specific to your target destination with the `--directory` value: ![](/img/logos/aws-s3.png)AWS S3 `s3://`Scheme`my-bucket`Bucket/`data/`Path ![](/img/logos/gcs.png)Google Cloud Storage `gs://`Scheme`my-bucket`Bucket/`data/`Path ![](/img/logos/azure-blob.svg)Azure Blob `abs://`Scheme`myaccount.blob.core.windows.net`Account/`mycontainer`Container/`mydir/`Path ![](/img/logos/azure-blob.svg)Azure Data Lake Gen2 `abfss://`Scheme`myaccount.dfs.core.windows.net`Account/`mycontainer`Container/`mydir/`Path ![](/img/logos/onelake.png)OneLake `onelake://`Scheme`MyWorSpace`Workspace/`MyLakeHouse`Lakehouse/`MyDir/`Path S3-Compatible (MinIO, OVH, etc.) `s3://`Scheme`mybucket`Bucket/`export/`Path ## Cloud Profile[​](#cloud-profile "Direct link to Cloud Profile") You can use the `--cloudprofile` parameter to specify which cloud credentials profile to use. ``` ./FastBCP \ ... --directory "s3://my-bucket/exports" \ --fileoutput "orders.parquet" \ --cloudprofile "production" \ ... ``` `--cloudprofile` Syntax: `--cloudprofile ` (long form). Cloud Connectivity Authentication setup and configuration for each platform * [Cloud Connectivity Overview](/latest/documentation/cloud-connectivity/overview.md) * [![](/img/logos/aws-s3.png)AWS S3](/latest/documentation/cloud-connectivity/aws-s3.md) * [![](/img/logos/azure-blob.svg)Azure](/latest/documentation/cloud-connectivity/azure.md) * [![](/img/logos/gcs.png)Google Cloud Storage](/latest/documentation/cloud-connectivity/google-cloud.md) * [![](/img/logos/onelake.png)OneLake](/latest/documentation/cloud-connectivity/onelake.md) --- # Connection Parameters FastBCP requires connection information to access your database. This page covers all connection-related parameters. ## Connection Type[​](#connection-type "Direct link to Connection Type") Specify the type of database connection driver to use. This parameter determines how FastBCP connects to your database. ``` ./FastBCP \ ... --connectiontype mssql \ ... ``` `--connectiontype`or`-C` `--connectiontype "connection_type"` (short form: `-C "connection_type"`), one of the types below. **Available Connection Types**, grouped by database. The types marked **ADBC** use an ADBC driver: see [ADBC Connectors](#adbc-connectors) below the cards. ![](/img/logos/sqlserver.svg)SQL Server * `mssql`Microsoft SQL Server (default) * `adbc_mssql`ADBCMicrosoft SQL Server via ADBC (Arpe.io ADBC FastDriver) - 2x faster for Parquet exports * `backup_mssql`ADBCSQL Server full and differential backup files (`.bak`) read directly, without restoring them (embedded ArpeMSBackup ADBC driver) - see [SQL Server backup files](#sql-server-backup-files-backup_mssql) ![](/img/logos/postgresql.svg)PostgreSQL * `pgsql`PostgreSQL standard connection * `pgcopy`PostgreSQL with COPY protocol * `adbc_pgsql`ADBCPostgreSQL via ADBC (Arpe.io ADBC FastDriver) - ultra-fast Parquet exports ![](/img/logos/oracle.svg)Oracle * `oraodp`Oracle Data Provider * `adbc_oracle`ADBCOracle via ADBC (Arpe.io ADBC FastDriver) - ultra-fast Parquet exports * `backup_rman`ADBCOracle RMAN backup sets, full and incremental, read directly, without Oracle and without restoring them (embedded ArpeOraBackup ADBC driver) - see [Oracle RMAN backup sets](#oracle-rman-backup-sets-backup_rman) ![](/img/logos/teradata.svg)Teradata * `teradata`Teradata database * `adbc_teradata`ADBCTeradata via ADBC (embedded ArpeTeradata driver) - TLS logon needs no Teradata client software IBM Netezza * `nzsql`IBM Netezza * `adbc_netezza`ADBCNetezza / IBM NPS via ADBC (embedded ArpeNetezza driver) - no NZdotNET needed, works with IBM Cloud NPS IBM Db2 * `adbc_db2`: IBM Db2 via ADBC (embedded ArpeDb2 driver) - native protocol, no IBM client software - see [adbc\_db2](#adbc_db2) ![](/img/logos/mysql.svg)MySQL / MariaDB * `mysql`MySQL/MariaDB database ![](/img/logos/sap.svg)SAP HANA * `hana`SAP HANA database ClickHouse * `clickhouse`ClickHouse database Generic drivers * `odbc`Generic ODBC connection * `oledb`Generic OLE DB connection Good to know: case-insensitive values *Since FastBCP 1.7.0*, the values of `--connectiontype` (and of every parameter with a fixed list of values: `--parallelmethod`, `--parquetcompression`, `--boolformat`, `--loglevel`, `--applicationintent`) are case-insensitive, on the command line and in a YAML configuration file: `--connectiontype MSSQL` is `--connectiontype mssql`. An unknown value in a YAML file now fails with the same message as on the command line (`Value foo is not allowed for argument ...`); up to 1.6 it was silently ignored and nothing was exported. ### ADBC Connectors[​](#adbc-connectors "Direct link to ADBC Connectors") The ADBC FastDriver connectors, marked **ADBC** above, share three rules: * `adbc_mssql` * `adbc_pgsql` * `adbc_oracle` * `adbc_netezza` * `adbc_teradata` * `adbc_db2` * `backup_mssql` * `backup_rman` - Windows x64 and Linux x64 onlyAvailable on **Windows x64** and **Linux x64** only, **not** supported on **Linux ARM64**. - Parquet output onlyThey only support exporting to **Parquet** format. No other output format is supported with these connection types. - ADBC end to endSince FastBCP 1.3, they run fully on their ADBC driver: the metadata and planning step (row counts, column types, `Ntile`, `Random`, `Timepartition`, `DBPartition`, …) uses the same driver and the same connection string as the data step. No SqlClient, Npgsql, ODP.NET or NZdotNET is involved. ## DSN (Data Source Name)[​](#dsn-data-source-name "Direct link to DSN (Data Source Name)") If you have chosen an ODBC connection type, you must define the DSN with the `--dsn` parameter, or alternatively define a connection string using `--sourceconnectstring`. ``` ./FastBCP \ ... --connectiontype odbc \ --dsn "MyODBCDataSource" \ ... ``` `--dsn`or`-N` `--dsn "DSN_name"` (short form: `-N "DSN_name"`) ## Provider[​](#provider "Direct link to Provider") If you have chosen an OLEDB connection type, you must define the OLEDB provider with the `--provider` parameter. ``` ./FastBCP \ ... --connectiontype oledb \ --provider MSOLEDBSQL \ ... ``` ``` ./FastBCP \ ... --connectiontype oledb \ --provider NZOLEDB \ ... ``` `--provider`or`-P` `--provider "provider_name"` (short form: `-P "provider_name"`) ## Server[​](#server "Direct link to Server") Except if you have defined a connection string (`--sourceconnectstring`), you must define a server (or could also be a TNS entry for Oracle). `--server`or`-S` `--server "server"` (short form: `-S "server"`) ### Server Format Examples[​](#server-format-examples "Direct link to Server Format Examples") The server parameter accepts different formats depending on your database: IP address or DNS name `myserver.mydomain.com`Host IP address or DNS name with port number `myserver.mydomain.com`Host: or ,`2433`Port IP address or DNS name with named instance `myserver.mydomain.com`Host\\`myinstance`Named instance Oracle: Easy Connect string `myserver.mydomain.com`Host:`1521`Port/`myinstance`Instance SQL Server backup files (`backup_mssql`) `D:\Backups\MSSQL`Directory holding the backups Oracle RMAN backup sets (`backup_rman`) `/backup/rman/orcl`Directory holding the backup pieces ``` ./FastBCP \ ... --server "myserver.mydomain.com:2433" \ ... ``` ## Trusted or User & Password[​](#trusted-or-user--password "Direct link to Trusted or User & Password") ### Trusted[​](#trusted "Direct link to Trusted") You can used a trusted (Windows or Kerberos Authentication) using the `--trusted` switch parameter. ``` ./FastBCP \ ... --server "myserver.mydomain.com\myinstance \ --trusted \ --database MySourceDB" \ ... ``` ### User and Password[​](#user-and-password "Direct link to User and Password") You can also provide a user and password the `--user` and `--password` can be used like this ``` ./FastBCP \ ... --server "myserver.mydomain.com\myinstance \ --user "FastUser" \ --password "FastPassword" \ --database MySourceDB" \ ... ``` ## 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 database. This connection string will override any other connection parameters and can be used if the other authentication mode are not enougth for your case You can use the connection string for any connection type. The connection string must be enclosed in double quotes. **Example:** ``` ./FastBCP \ ... --sourceconnectstring "Server=myserver;Database=mydb;User ID=FastUser;Password=FastPassword;Encrypt=True;TrustServerCertificate=True" ... ``` `--sourceconnectstring`or`-g` `--sourceconnectstring "connection_string"` (short form: `-g "connection_string"`) Passwords in logs Passwords are masked in logs and telemetry, including quoted passwords containing `;` (e.g. `Password="p;w=1"`). ### Connection Strings with ADBC Connectors[​](#connection-strings-with-adbc-connectors "Direct link to Connection Strings with ADBC Connectors") With the ADBC connection types (`adbc_mssql`, `adbc_pgsql`, `adbc_oracle`, `adbc_netezza`, `adbc_teradata`, `adbc_db2`), `--sourceconnectstring` accepts: * Native syntaxthe native syntax of the database (ADO.NET-style `Key=Value;` pairs), translated to the driver keys * Explicit keysexplicit `adbc.*` / `arpeio.*` keys, which win over translated keys * Whole connectiona whole-connection `uri` / `adbc..connection_string` Good to know * Native keys with no driver equivalent (e.g. `Pooling=false`) are dropped with a warning. With a whole-connection `uri` / `connection_string`, native keys are dropped with a warning: put them inside the URI / connection string instead. * A `Driver=` path in `--sourceconnectstring` is used for both the metadata and the data step. #### adbc\_netezza[​](#adbc_netezza "Direct link to adbc_netezza") Keys do not need the `adbc.arpenz.` prefix. All of the following are accepted: | Kind | Keys | | ----------------------- | ----------------------------------------------------------------------------------------------------------- | | Friendly / ADO.NET keys | `Server`, `Host`, `host:port`, `Port`, `Database`, `User ID`, `Password`, `SSL Mode`, `Application Name`, … | | Plain driver keys | `sslmode`, `tls_min_version`, `char_encoding`, `login_timeout`, … | | Whole connection | `uri`, `connection_string` | Keys the driver does not support (e.g. `propagate`, `Pooling`) are ignored, with a single warning. `Application Name` defaults to `FastBCP`. ``` ./FastBCP \ --connectiontype adbc_netezza \ --sourceconnectstring "Server=nps-host;Port=5480;Database=SALES;User ID=admin;Password=FastPassword;SSL Mode=require" \ ... ``` NPS 7.x NPS 7.x servers only offer TLS 1.0/1.1. Add `tls_min_version=1.0` to the connection string to connect to them. #### adbc\_pgsql[​](#adbc_pgsql "Direct link to adbc_pgsql") Like `--connectiontype pgsql`, `--connectiontype adbc_pgsql` honours `PGUSER`, `PGPASSWORD`, `PGPASSFILE` / `~/.pgpass` and `PGSSLROOTCERT` when `--user` / `--password` / `--sourceconnectstring` do not provide them. NaN in NUMERIC columns A `NaN` in a `NUMERIC` column fails the read. Add `adbc.arpepgsql.numeric_special=null` to `--sourceconnectstring` to read it as `NULL` instead. #### adbc\_oracle[​](#adbc_oracle "Direct link to adbc_oracle") Like `--connectiontype oraodp`, `--connectiontype adbc_oracle` resolves TNS aliases through `tnsnames.ora` (looked up in `TNS_ADMIN`, then `$ORACLE_HOME/network/admin`), so `--server` can be a TNS alias. Network encryption and data integrity are negotiated with `encryption=accepted` and `data_integrity=accepted`, so the server decides, as with `--connectiontype oraodp`. Use the `FASTBCP_ADBC_ENCRYPTION` / `FASTBCP_ADBC_DATA_INTEGRITY` environment variables or explicit keys to override this. #### adbc\_teradata[​](#adbc_teradata "Direct link to adbc_teradata") `--connectiontype adbc_teradata` reads Teradata through the embedded **ArpeTeradata** ADBC driver, for both the metadata step and the data step. It uses the Teradata SQL dialect, like `--connectiontype teradata`. ``` ./FastBCP \ --connectiontype adbc_teradata \ --server "td-host" \ --user "FastUser" \ --password "FastPassword" \ --database "TPCH" \ ... ``` Connection: parameters and connection string keys * `--server host[:port]` (legacy port, default `1025`), `--user`, `--password` and an optional `--database`, or a `--sourceconnectstring` in the Teradata provider spelling. * Keys translated from `--sourceconnectstring`: `Host` / `Server` / `Data Source`, `Port` / `DBS Port` / `Port Number`, `Database` / `Initial Catalog`, `User Id` / `User Name` / `UID`, `Password` / `PWD`, `SSL Mode`, `HTTPS Port`, `SSL CA`, `SSL CA Path`, `TMODE`, `Login Timeout` / `Connect Timeout` / `Connection Timeout`, `Query Timeout`, `TTU Path`. Explicit `adbc.arpeteradata.*` keys are passed as is and win. * Trusted authentication (`--trusted`) is **not supported**: FastBCP stops with `-C adbc_teradata does not support trusted (-A) authentication: give -U and -X`. Logon and Teradata Tools and Utilities (TTU) * The default logon (`sslmode=prefer`) uses TLS on the HTTPS port (443) and needs no Teradata client software. * When the server has no TLS, the driver falls back to the legacy port (1025). `sslmode=disable` in `--sourceconnectstring` always uses the legacy port. The legacy-port logon needs the customer's TTU (CLIv2). * **Linux:** FastBCP looks for TTU in the [`FASTBCP_TTU_PATH`](/latest/documentation/environment-variables/fastbcp-ttu-path.md) environment variable, then in a `ttu` or `TeradataToolsAndUtilitiesBase` directory next to the FastBCP binary. The library directory found is passed to the driver (`adbc.arpeteradata.ttu_path`) and logged. When nothing is found, the driver searches itself (`ARPETERADATA_TTU_PATH`, `/opt/teradata/client`, the system library path). * **Windows:** FastBCP passes nothing; the driver finds `wincli32.dll` itself (`ARPETERADATA_TTU_PATH`, its own directory, the registered TTU installation). See [FASTBCP\_TTU\_PATH](/latest/documentation/environment-variables/fastbcp-ttu-path.md) for the TTU folder layouts accepted on Linux and how to prepare Teradata's TTU download without installing it. #### adbc\_db2[​](#adbc_db2 "Direct link to adbc_db2") *Since FastBCP 1.7.0.* `--connectiontype adbc_db2` reads IBM Db2 through the embedded **ArpeDb2** ADBC driver, for both the metadata step and the data step. The driver speaks Db2's native protocol: **no IBM client software** (Data Server Driver, CLI, ODBC) is needed. It uses the Db2 SQL dialect. ``` ./FastBCP \ --connectiontype adbc_db2 \ --server "db2-host:50000" \ --database "SAMPLE" \ --user "db2inst1" \ --password "FastPassword" \ --sourceschema "DB2INST1" \ --sourcetable "ORDERS" \ --directory "/data/export" \ --fileoutput "orders.parquet" \ --parallelmethod "Ntile" \ --distributekeycolumn "O_ORDERKEY" \ --paralleldegree 8 ``` | Target | Support | | -------------------------------------- | ----------------------------------------------------------- | | **Db2 for LUW** (Linux, Unix, Windows) | The main target | | **Db2 for i** | Works for queries; `DBPartition` falls back to `None` there | | **Db2 for z/OS** | Not supported yet | Connection: parameters, authentication and TLS * `--server host[:port]` (default port `50000`), `--database` **required** (the Db2 database name), `--user` and `--password`; or a `--sourceconnectstring` in the ADO.NET spelling (`Server`, `Port`, `Database`, `User Id`, `Password`, …). Explicit `adbc.arpedb2.*` keys are passed as is and win. * Trusted authentication (`--trusted`) is **not supported**: FastBCP stops with `-C adbc_db2 does not support trusted (-A) authentication: give -U and -X`. Without `--database` it stops with `-C adbc_db2 needs the database name (-I / --sourcedatabase)`. * **TLS** is off by default. Db2's TLS is implicit, on the server's SSL port (often `50001`): give that port and the TLS settings in `--sourceconnectstring`, for example `Server=db2-host;Port=50001;Database=SAMPLE;User Id=db2inst1;Password=...;SSL Mode=verify-full;SSL Root Cert=/path/ca.pem`. Good to know * **Parallel methods:** `None`, `Random`, `DataDriven`, `RangeId`, `Ntile`, `Timepartition` and `DBPartition` (Db2 for LUW range-partitioned tables, see [Parallel Parameters](/latest/documentation/cli/parallel_parameters.md)). `Physical` is not supported. * **Data types:** each Db2 type maps to Parquet as described in the [ArpeDb2 data types](https://adbc-drivers-docs.arpe.io/drivers/arpedb2/data-types) reference (for example `DECIMAL(p,s)` keeps its precision and scale, and `DECFLOAT` reads as a double unless `adbc.arpedb2.decfloat_as=string`). ## SQL Server Backup Files (backup\_mssql)[​](#sql-server-backup-files-backup_mssql "Direct link to SQL Server Backup Files (backup_mssql)") `--connectiontype backup_mssql` reads SQL Server **full and differential backups** (`.bak` files) directly, **without restoring them** and without any SQL Server instance, through the embedded **ArpeMSBackup** ADBC driver (metadata and data steps). The backup is read in place (random access by page): it is never loaded in memory, so backups much larger than the RAM are read with a bounded memory. `--server` The **directory** of the backups (`D:\Backups\MSSQL`, `/var/opt/mssql/backup`). `--database` Names the **backup files** in that directory: a file name, a pattern (`*`, `?`), or a list separated by `;`, in any order. With a full backup and its differentials, name them all: see [Differential backups](#differential-backups). `--user`/`--password`Encrypted only No database credentials: `--trusted` is not used, and `--user` and `--password` only serve for [encrypted backups](#encrypted-backups), where they name the private key of the certificate. `--sourceconnectstring` only serves to set driver options, such as [`adbc.arpemsbackup.geospatial`](/latest/datatypes-conversion/mssql/backup-parquet.md). The driver is licensed like the other Arpe.io ADBC FastDrivers. * Single backup * Striped backup, on Linux ``` ./FastBCP \ --connectiontype backup_mssql \ --server "D:\Backups\MSSQL" \ --database "tpch_full.bak" \ --sourceschema "dbo" \ --sourcetable "orders" \ --directory "D:\export\orders" \ --fileoutput "orders.parquet" \ --parallelmethod "Physical" \ --paralleldegree 8 ``` ``` ./FastBCP \ --connectiontype backup_mssql \ --server "/var/opt/mssql/backup" \ --database "tpch_*.bak" \ --sourceschema "dbo" \ --sourcetable "lineitem" \ --directory "/export/lineitem" \ --fileoutput "lineitem.parquet" \ --parallelmethod "Physical" \ --paralleldegree 8 ``` * Backups read * Tables and data types * Refused * Queries and parallelism - Full backups and copy-only full backups, uncompressed or compressed with **MS\_XPRESS** or **ZSTD**, any `BLOCKSIZE` / `MAXTRANSFERSIZE`. - [**Differential backups**](#differential-backups), with the full backup they were taken from (since FastBCP 1.6.7). Log backups are not applied. - [**Encrypted backups**](#encrypted-backups) (`WITH ENCRYPTION`) and backups of **TDE** databases, with the private key of the certificate (since FastBCP 1.6.6). - **Striped backups** (`BACKUP DATABASE ... TO DISK = a, DISK = b, ...`): name all the stripes with a pattern (`--database "mydb_*.bak"`) or a list separated by `;` (`--database "mydb_1.bak;mydb_2.bak;mydb_3.bak"`), in any order. An incomplete set, stripes of different backups or a lone stripe are refused with a message naming the missing stripes. - **Several backups in one file** (`WITH NOINIT`): the [latest version](#differential-backups) they hold is read, a full backup and its newest differential (a copy-only full backup counts). Up to FastBCP 1.6.6, the last full backup of the file was read. - Databases over **several data files and filegroups**, from **SQL Server 2017, 2019, 2022 and 2025** (Windows or Linux). **Tables read:** rowstore tables (heaps, clustered indexes, partitions, ROW / PAGE compression, LOBs including `text` / `ntext` / `image`, `xml` untyped or typed by an XML schema collection (*since 1.7.0*) and written as SQL Server returns it, row-overflow, sparse columns, computed persisted columns) and **clustered columnstore** tables (including archive compression and the open delta store). **Data types:** a backup and an `adbc_mssql` export of the same table give the same Parquet since FastBCP 1.6.5. See [SQL Server backup files → Parquet](/latest/datatypes-conversion/mssql/backup-parquet.md). Refused with a clear message: tables with a `json` or `vector(n, float16)` column (SQL Server 2025): list the other columns in `--query` to export them. A damaged or truncated backup stops with an error, and so does [any backup that could be the newest and cannot be used](#backups-that-cannot-be-used). QAT\_DEFLATE backup compression is not supported. * `--sourceschema` / `--sourcetable`, or `--query` limited to `SELECT * | col1, col2, … FROM [schema.]table`. * Parallel methods: `None`, or `Physical`, which resolves to the **Pages** method for this source: each thread reads a slice of the data pages (rowstore) or of the rowgroups (columnstore). See [Parallel parameters](/latest/documentation/cli/parallel_parameters.md). * Parquet output only. Good to know * **Consistency:** a backup taken while the database is written to is read as its pages are: the transaction log contained in the backup is not replayed. This goes for a differential too: taken during writes, it can give other rows than a `RESTORE` of the same backups. * **Opening a backup again:** the first export from a backup reads its structure; FastBCP keeps it in a small file in the local application data of the user (`%LOCALAPPDATA%\ArpeMSBackup\index` on Windows, `~/.cache/arpemsbackup/index` on Linux), so the next exports from the same backup open in a few milliseconds (since FastBCP 1.6.3). A rewritten or moved backup is opened in full again; files unused for 30 days, or beyond 2 GB in all, are removed automatically. [`FASTBCP_INDEX_DIR`](/latest/documentation/environment-variables/fastbcp-index-dir.md) names another directory, for an account without a usable home (since FastBCP 1.6.6). ### Differential Backups[​](#differential-backups "Direct link to Differential Backups") Since FastBCP 1.6.7, `--connectiontype backup_mssql` reads the **latest version** of a table: the newest full backup among the files, and the newest differential taken from it. You always get the **whole table**, not what changed. Nothing to set: give FastBCP the files. ``` ./FastBCP \ --connectiontype backup_mssql \ --server "/var/opt/mssql/backup" \ --database "sales_full.bak;sales_diff.bak" \ --sourceschema "dbo" \ --sourcetable "orders" \ --directory "/export/orders" \ --fileoutput "orders.parquet" \ --parallelmethod "Physical" \ --paralleldegree 8 ``` | How the backups are stored | `--database` | | ----------------------------- | ---------------------------------------------------------------------------------------- | | One file each | A list in any order, `"sales_full.bak;sales_diff.bak"`, or a pattern, `"sales_*.bak"` | | Several days in one directory | A pattern, `"sales_*.bak"`: older backups can match too, only the latest version is read | | One file, `WITH NOINIT` | The file, `"sales.bak"` | | Striped | All the stripes of each backup, usually a pattern | FastBCP checks that the differential was taken from that full backup: the names and the order of the files do not matter. A differential holds every change since its full backup, so one is enough. All the files must be in the `--server` directory, and be backups of one database. Encrypted backups work the same way, with the [key of their certificate](#encrypted-backups). ### Backups That Cannot Be Used[​](#backups-that-cannot-be-used "Direct link to Backups That Cannot Be Used") A backup that could be the newest and cannot be used **fails the export, naming it**, rather than reading older data without saying so. That is the case of: * a differential whose full backup is not among the files, * a stripe that is missing, * a backup that is truncated, interrupted or still being written, * a file that matches the pattern and is not a backup, * an encrypted backup without its key, * a file, filegroup or partial backup, * backups of a database and of a restored copy of it. The logs say what can be done about it. Two variables change this behaviour without touching the command: | Variable | Effect | | ----------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------- | | [`FASTBCP_BACKUP_RESTORE_MODE=best_effort`](/latest/documentation/environment-variables/fastbcp-backup-restore-mode.md) | The backup is skipped, and the newest usable version is read, however old | | [`FASTBCP_BACKUP_RESTORE_POINT=full`](/latest/documentation/environment-variables/fastbcp-backup-restore-point.md) | The last full backup of one backup is read, as up to FastBCP 1.6.6 | The options `adbc.arpemsbackup.restore_mode` and `adbc.arpemsbackup.restore_point` in `--sourceconnectstring` do the same, and win over the variables. ### Upgrading to 1.6.7[​](#upgrading-to-1-6-7 "Direct link to Upgrading to 1.6.7") Without these variables, an export can behave differently from FastBCP 1.6.6. Each line was measured on both versions, with backups of SQL Server 2025. * Worked, now fail * Read other rows * Still fail, best\_effort reads them These **worked and now fail**, naming the backup: | With these files | 1.6.6 | To read anyway | | ------------------------------------------------------------------------------------- | ----------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- | | A `WITH NOINIT` file whose newest differential has its full backup in another file | The older full backup of the file | Give both files, for the newest rows. `FASTBCP_BACKUP_RESTORE_POINT=full` or `FASTBCP_BACKUP_RESTORE_MODE=best_effort`, for the rows of 1.6.6 | | A `WITH NOINIT` file with a file, filegroup or partial backup after the full backup | The tables of that backup, from it; the other tables failed | `FASTBCP_BACKUP_RESTORE_POINT=full`, as 1.6.6. `FASTBCP_BACKUP_RESTORE_MODE=best_effort`, every table from the full backup, so older rows | | A `WITH NOINIT` file whose last differential lost the end of the file, after its data | The older full backup of the file | `FASTBCP_BACKUP_RESTORE_POINT=full` or `FASTBCP_BACKUP_RESTORE_MODE=best_effort`, for the rows of 1.6.6 | | A full backup alone that lost the end of the file, after its data | Read | `FASTBCP_BACKUP_RESTORE_POINT=full`, as 1.6.6: `best_effort` has no other version to read. Check the file first: it was cut, or is still being copied | These **read other rows**, or read what used to fail: | With these files | 1.6.6 | 1.6.7 | To keep 1.6.6 | | ------------------------------------------------------------------- | -------------------- | --------------------------------------------------------- | ----------------------------------- | | A `WITH NOINIT` file with a full backup and differentials | The last full backup | The full backup and its newest differential: fresher rows | `FASTBCP_BACKUP_RESTORE_POINT=full` | | A pattern or a list matching several complete backups of a database | Failed | The latest version among them | A narrower `--database` | These **failed and still fail**, with a clearer message, and `FASTBCP_BACKUP_RESTORE_MODE=best_effort` now reads them: | With these files | With `best_effort` | | ---------------------------------------------------------------------- | ------------------------------------------------------------------------------- | | A file cut in the data of a backup, with an older complete full backup | The older version | | Several backups, the newest truncated or still being written | The older version | | A pattern also matching a file that is not a backup | The backups, without that file | | Backups of a database and of a restored copy of it | The newest of the two, whichever database it is: prefer a narrower `--database` | The first export from each backup also reads its structure once more, as the format of the index has changed. ### Encrypted Backups[​](#encrypted-backups "Direct link to Encrypted Backups") Since FastBCP 1.6.6, `--connectiontype backup_mssql` reads backups `WITH ENCRYPTION` and backups of **TDE** databases, alone or together, with the private key of the server certificate. No SQL Server is needed: the key file is all it takes. `--user`or`--sourceuser` The file of the private key: a `.pvk`, a `.pfx` / `.p12`, a PEM or DER key, or a `.cer` / `.crt` certificate with its private key next to it, under the same name. Several files separated by `;`: a backup `WITH ENCRYPTION` of a TDE database can use two certificates. `--password`or`--sourcepassword` The password of that key, if it has one. Hidden in all logs. ``` ./FastBCP \ --connectiontype backup_mssql \ --server "/var/opt/mssql/backup" \ --database "sales_encrypted.bak" \ --sourceuser "/secure/keys/MyCert.pvk" \ --sourcepassword "KeyPassword" \ --sourceschema "dbo" \ --sourcetable "orders" \ --directory "/export/orders" \ --fileoutput "orders.parquet" \ --parallelmethod "Physical" \ --paralleldegree 8 ``` Export the key from SQL Server Export the key on the server that holds the certificate, as one PVK file with its certificate, or as one PFX file (SQL Server 2022 and later): ``` BACKUP CERTIFICATE MyCert TO FILE = 'C:\keys\MyCert.cer' WITH PRIVATE KEY (FILE = 'C:\keys\MyCert.pvk', ENCRYPTION BY PASSWORD = 'KeyPassword'); BACKUP CERTIFICATE MyCert TO FILE = 'C:\keys\MyCert.pfx' WITH FORMAT = 'PFX', PRIVATE KEY (ENCRYPTION BY PASSWORD = 'KeyPassword', ALGORITHM = 'AES_256'); ``` **What is read:** AES 128, 192 and 256 and Triple DES, compressed or not, striped, from SQL Server 2017, 2019, 2022 and 2025. A backup that is not encrypted ignores these two parameters. **Without the right key**, the export stops and the message names the certificate by its thumbprint, the one `sys.certificates` shows. A wrong or a missing password stops it too, with a message saying so. Protect the key file Whoever has the private key can read the backups it opens, with no server involved: keep it as carefully as the backups themselves. The [index](/latest/documentation/environment-variables/fastbcp-index-dir.md#encrypted-backups) FastBCP keeps for such a backup holds no key, and the key is needed at every export. Good to know * SQL Server gives the files written by `BACKUP CERTIFICATE` to its service account alone: grant the account running FastBCP read access to them, or use `CERTPRIVATEKEY` and `CERTENCODED`, which return the same bytes. * Keys in an EKM provider (`SERVER ASYMMETRIC KEY`) are not supported. * An **uncompressed** backup of a TDE database taken while its key was being changed (`encryption_state` 4) is refused when the export reaches a page still under the previous key. Take the backup again once the change is over, or `WITH COMPRESSION`, which reads normally. * A password with non-ASCII characters in a PVK file depends on the code page of the server. If it is reported as wrong, export the key with an ASCII password. ## Oracle RMAN Backup Sets (backup\_rman)[​](#oracle-rman-backup-sets-backup_rman "Direct link to Oracle RMAN Backup Sets (backup_rman)") `--connectiontype backup_rman` reads **Oracle RMAN backup sets** directly, **without Oracle** and **without restoring them**, through the embedded **ArpeOraBackup** ADBC driver (metadata and data steps). The backup pieces are read in place: nothing is restored, copied or loaded in memory as a whole. `--server` The **directory** of the backup pieces (`/backup/rman/orcl`, `D:\Backups\RMAN`). `--database` Names the **pieces**: names, paths or patterns, several of them separated by `;`, in any order (`--database "full_*"`, `--database "l0/*;l1/**"`). Give every piece of the backup: the pieces of a multi-piece set and of every set, and with [incremental backups](#incremental-rman-backups) the whole chain. See [Naming the backup pieces](#naming-the-backup-pieces). `--user`/`--password`/`--trusted`Not used No credentials: `--user`, `--password` and `--trusted` are not used. `--sourceconnectstring` only serves to set driver options, such as the [restore point and restore mode](#rman-backups-that-cannot-be-used). The driver is licensed like the other Arpe.io ADBC FastDrivers. * Full backup, on Linux * Table of another PDB, on Windows ``` ./FastBCP \ --connectiontype backup_rman \ --server "/backup/rman/orcl" \ --database "full_*" \ --sourceschema "SALES" \ --sourcetable "ORDERS" \ --directory "/export/orders" \ --fileoutput "orders.parquet" \ --parallelmethod "Physical" \ --paralleldegree 8 ``` A few columns of a table of another PDB, on Windows: ``` .\FastBCP.exe ` --connectiontype backup_rman ` --server "D:\Backups\RMAN" ` --database "full_*;ctl_*" ` --query "SELECT ID, NAME, CREATED FROM HRPDB.HR.EMPLOYEES" ` --directory "D:\export\employees" ` --fileoutput "employees.parquet" ` --parallelmethod "Physical" ` --paralleldegree 4 ``` * Backups read * Tables read * Refused * Queries and parallelism - Full backup sets (`BACKUP DATABASE`, `BACKUP TABLESPACE`, `BACKUP DATAFILE`, `BACKUP PLUGGABLE DATABASE`), **uncompressed** or `AS COMPRESSED BACKUPSET` with the **BASIC**, **LOW**, **MEDIUM** or **HIGH** algorithm. - [**Incremental backups**](#incremental-rman-backups), levels 0 to 4, differential and cumulative: the latest version of the table (since FastBCP 1.6.8). - Multi-piece sets (`MAXPIECESIZE`), several channels or sets (`FILESPERSET`), `SECTION SIZE`, `COPIES 2`. When several backups of the same files are given, the latest version of each datafile is read. - Archived log, control file and SPFILE pieces among the files are ignored. - Container databases (the root and the PDBs) and non-CDB databases, bigfile and smallfile tablespaces. - Backups of **Oracle 19c, 21c, 23ai and 26ai** databases running on **Linux x86-64**. Heap tables, including deleted, chained and migrated rows, tables of more than 255 columns and empty tables. See the [datatypes conversion](/latest/datatypes-conversion/oracle/backup-parquet.md) for the column types. Refused with a clear message: * **Encrypted backup sets** (`SET ENCRYPTION`, password or wallet). * [Any backup that could be the newest and cannot be used](#rman-backups-that-cannot-be-used), such as an incremental backup without its level 0, or a set without one of its pieces (since FastBCP 1.6.8). * Image copies (`BACKUP AS COPY`, `RECOVER COPY` strategies) are not read. * Partitioned, index-organized, clustered, object, nested, temporary and external tables. * LOB (`CLOB`, `NCLOB`, `BLOB`, `BFILE`), `INTERVAL`, `ROWID` / `UROWID`, `JSON`, `VECTOR`, `XMLTYPE` and object columns: the other columns of the table can still be exported, listed in `--query`. * Tablespaces with a non-default block size, and backups of big-endian platforms. - `--sourceschema` (the owner) / `--sourcetable`, or `--query` limited to `SELECT * | col1, col2, … FROM [[container.]owner.]table`. - In a container database with a single PDB, tables are named `OWNER.TABLE`; the tables of the root or of another PDB are named `CONTAINER.OWNER.TABLE` in `--query`. - Parallel methods: `None`, or `Physical`, which resolves to the **Pages** method for this source: each thread reads a range of the table's blocks. See [Parallel parameters](/latest/documentation/cli/parallel_parameters.md). - Parquet output only. Good to know * **Consistency:** a backup taken while the database is open (an online backup, in `ARCHIVELOG` mode) is read as its blocks are: the redo is not applied. A backup taken with the database mounted is consistent. This goes for incremental backups too. * **Opening a backup again:** the first export from a backup reads its structure; FastBCP keeps it in a small file in the local application data of the user (`%LOCALAPPDATA%\ArpeOraBackup\index` on Windows, `~/.cache/arpeorabackup/index` on Linux), so the next exports from the same backup open in a few milliseconds (since FastBCP 1.6.4). After a new incremental backup, only the new backup is opened in full: the backups already opened stay fast (since FastBCP 1.6.8). A rewritten or moved backup is opened in full again; files unused for 30 days, or beyond 2 GB in all, are removed automatically. [`FASTBCP_INDEX_DIR`](/latest/documentation/environment-variables/fastbcp-index-dir.md) names another directory, for an account without a usable home (since FastBCP 1.6.6). ### Naming the Backup Pieces[​](#naming-the-backup-pieces "Direct link to Naming the Backup Pieces") `--database` is a list of entries separated by `;`. Each entry is a name, a path or a pattern, relative to the `--server` directory or absolute: | Linux | Windows | What it matches | | ------------------------------------- | ------------------------------------------- | ----------------------------------------------------------------------- | | `full_*`, `ORCL_??_*` | `full_*`, `ORCL_??_*` | `*` and `?` match within a name, in the `--server` directory | | `l0/*` | `l0\*` | The files of the subdirectory `l0` | | `l1/**` | `l1\**` | The files of `l1` and of all its subdirectories, at any depth | | `**` | `**` | Every file below `--server` | | `**/ORCL_*` | `**\ORCL_*` | The files named `ORCL_*`, in `--server` or in any of its subdirectories | | `l0` | `l0` | A directory named last stands for its files | | `/backup/l0/*;/backup/l1/2026-11-*/*` | `D:\Backups\l0\*;D:\Backups\l1\2026-11-*\*` | Absolute paths, patterns included | * **Path separator:** `/` on Linux. On Windows, `\` or `/`, both work. * **Each entry must match at least one file**, or the export fails, naming it (`no file matches 'l2/**'`): a typo does not silently drop a level of the chain. * A name starting with `.` is matched only by a pattern starting with `.`. * `**` does not go down into a directory link it finds; a link named in the entry, or `--server` itself, is followed. * At the start of each export, the log gives the number of files found: `Backup files : 42 file(s) matching 'l0/*;l1/**' in /backup/rman/orcl`. ### Incremental Backups[​](#incremental-rman-backups "Direct link to Incremental Backups") Since FastBCP 1.6.8, `--connectiontype backup_rman` reads **incremental backups**, levels 0 to 4, differential and cumulative. Give the level 0 and the incremental backups taken on it, or the whole backup directory: each datafile is read at the **latest version** the files give. You always get the **whole table**, not the changed rows. ``` ./FastBCP \ --connectiontype backup_rman \ --server "/backup/rman/orcl" \ --database "l0/*;l1/**" \ --sourceschema "SALES" \ --sourcetable "ORDERS" \ --directory "/export/orders" \ --fileoutput "orders.parquet" \ --parallelmethod "Physical" \ --paralleldegree 8 ``` | How the backups are stored | `--database` | | ------------------------------------- | --------------------------------------------------------------------------------------------- | | All in one directory | A pattern, `"ORCL_*"`, or `"*"`: older backups can match too, only the latest version is read | | A directory per level | `"l0/*;l1/*"` (Windows: `"l0\*;l1\*"`) | | A directory per day, below each level | `"l0/*;l1/**"` (Windows: `"l0\*;l1\**"`) | | Anywhere below `--server` | `"**"` | FastBCP checks that each incremental backup belongs to the chain: the names and the order of the files do not matter, and a newer full or level 0 backup among the files starts a new chain. Backups of the abandoned branch, after a restore and `OPEN RESETLOGS`, are not read. Good to know * The more incremental backups to read through, the longer the read, most of all with BASIC compression. A cumulative backup, or a new level 0, keeps the chain short. * A level 1 taken under heavy writes can fail the export of a table, naming the block it lacks: the next level 1, taken at a quieter time, reads it. * Image copies (`BACKUP AS COPY`, `RECOVER COPY` strategies) are not read. * The `**` pattern is for `backup_rman`; `backup_mssql` reads the files of the `--server` directory only. ### Backups That Cannot Be Used[​](#rman-backups-that-cannot-be-used "Direct link to Backups That Cannot Be Used") A backup that could be the newest and cannot be used **fails the export, naming it**, rather than reading older data without saying so. That is the case of: * an incremental backup whose level 0, or a level in between, is not among the files: the message names the backup needed, * a backup set without one of its pieces, or still being written, * an encrypted backup set. The other tables are read, and the logs say what can be done about it. The same two variables as for `backup_mssql` change this behaviour without touching the command: | Variable | Effect | | ----------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------ | | [`FASTBCP_BACKUP_RESTORE_MODE=best_effort`](/latest/documentation/environment-variables/fastbcp-backup-restore-mode.md) | The backup is skipped, and the newest usable version is read, however old | | [`FASTBCP_BACKUP_RESTORE_POINT=full`](/latest/documentation/environment-variables/fastbcp-backup-restore-point.md) | The most recent full or level 0 backup of each datafile is read, the incremental backups ignored | The options `adbc.arpeorabackup.restore_mode` and `adbc.arpeorabackup.restore_point` in `--sourceconnectstring` do the same, and win over the variables. ### Upgrading to 1.6.8[​](#upgrading-to-1-6-8 "Direct link to Upgrading to 1.6.8") Each line was measured on both versions, with backups of Oracle 23ai. | With these files | 1.6.7 | 1.6.8 | To keep 1.6.7 | | -------------------------------------------------------- | ------------------------------------------ | ------------------------------------------ | ---------------------------------------------------------------------- | | One full or level 0 backup | Read | **Same** | — | | A level 0 and incremental backups on it | Failed: `is an incremental level 1 backup` | The latest version: fresher rows | `FASTBCP_BACKUP_RESTORE_POINT=full`: the level 0 | | Incremental backups without their level 0 | Failed | Fails, naming the backup needed | — | | A chain with a hole (a level missing, a newer one given) | Failed | Fails, naming the backup and what it needs | `FASTBCP_BACKUP_RESTORE_MODE=best_effort`: the version before the hole | | `--database` with a subdirectory (`l0/*`) | Failed: `no file matches` | Read | — | Also on full backups: | With these files | 1.6.7 | 1.6.8 | | --------------------------------------------------------------------- | ---------------------------- | ------------------------------------------------------ | | A backup set without its last piece | Read short, without an error | Fails, naming it. `best_effort`: the version before it | | A table truncated, then its tablespace backed up alone | Read empty | Refused, naming it | | A column added with a `DEFAULT`, on the rows written before | `NULL` | The default value | | Archived log pieces in the directory, more than 64 pieces, `COPIES 2` | Refused | Read | | A dropped PDB | Its tables listed | No longer listed | From FastBCP 1.6.0 FastBCP 1.6.0 read a level 1 backup as a full one, so the export held only the rows of the changed blocks, with no error. Export again any table read from a level 1 backup with 1.6.0. ## Database[​](#database "Direct link to Database") Optionally define a source database. With `backup_mssql`, `--database` names the backup files (see [SQL Server backup files](#sql-server-backup-files-backup_mssql)); with `backup_rman`, the names, paths or patterns of the backup pieces (see [Oracle RMAN backup sets](#oracle-rman-backup-sets-backup_rman)). **Example:** ``` ./FastBCP \ ... --database "AdventureWorks" \ ... ``` `--database`or`-I` `--database "database_name"` (short form: `-I "database_name"`) ## Application Intent[​](#application-intent "Direct link to Application Intent") Specifies the application workload type when connecting to SQL Server. This parameter is only applicable for SQL Server (`mssql`, `adbc_mssql`) and OLEDB (`oledb`) connection types. With `adbc_mssql`, an `ApplicationIntent` key in `--sourceconnectstring` is also passed to the driver. `--applicationintent`default `ReadOnly` `--applicationintent "ReadOnly|ReadWrite"` (long form) **Values:** `ReadOnly`Default Declares the read-only workload type when connecting to a read-only replica in an Always On availability group `ReadWrite` Declares a read-write workload type (standard connection) **Example (Read-Only):** ``` ./FastBCP \ --connectiontype mssql \ --server "myserver.mydomain.com" \ --applicationintent ReadOnly \ --database "AdventureWorks" \ ... ``` **Example (Read-Write):** ``` ./FastBCP \ --connectiontype mssql \ --server "myserver.mydomain.com" \ --applicationintent ReadWrite \ --database "AdventureWorks" \ ... ``` info When using `ReadOnly`, the connection will be routed to a read-only replica if available in an Always On availability group configuration. This is useful for offloading reporting and export workloads from the primary replica. --- # CSV Formatting When exporting to CSV format (`.csv` extension), FastBCP provides extensive formatting options. ## Delimiter[​](#delimiter "Direct link to Delimiter") Use the `--delimiter` parameter to specify the character(s) used to separate fields. ``` ./FastBCP \ ... --fileoutput "data.csv" \ --delimiter "," \ ... ``` `--delimiter`or`-d`default `,` `--delimiter "delimiter"` (short form: `-d "delimiter"`). Default: `,` (comma). ### Common Delimiters[​](#common-delimiters "Direct link to Common Delimiters") * Comma (CSV) * Tab (TSV) * Pipe * Semicolon ``` --delimiter "," ``` ``` --delimiter "\t" ``` ``` --delimiter "|" ``` ``` --delimiter ";" ``` ## Use Quotes[​](#use-quotes "Direct link to Use Quotes") Use the `--quotes` switch to enclose string fields in double quotes. ``` ./FastBCP \ ... --fileoutput "products.csv" \ --quotes \ ... ``` `--quotes`or`-t` Switch, no value (short form: `-t`). Default: without quotes. * Without --quotes * With --quotes ``` ProductID,ProductName,Description,Price 1,Widget A,Small widget,19.99 2,Widget B,Large widget,29.99 ``` ``` "ProductID","ProductName","Description","Price" "1","Widget A","Small widget","19.99" "2","Widget B","Large widget","29.99" ``` Information When `--quotes`, any double quotes (`"`) in the data are escaped with backslash (`\"`). ## Date Format[​](#date-format "Direct link to Date Format") Use the `--dateformat` parameter to specify how dates and timestamps are formatted. ``` ./FastBCP \ ... --fileoutput "orders.csv" --dateformat "yyyy-MM-dd HH:mm:ss" \ ... ``` `--dateformat`or`-f`default `yyyy-MM-dd HH:mm:sszzz` `--dateformat "format"` (short form: `-f "format"`). Auto-adaptive formatting The date format is auto-adaptive based on the column type: * **Date-only** columns will always output as `yyyy-MM-dd` regardless of the format string * **Timestamp/DateTime** columns will output as `yyyy-MM-dd HH:mm:ss` even if a timezone token (`zzz`) is present in the format string * **DateTimeOffset** columns will include the timezone offset as specified ### Format Codes[​](#format-codes "Direct link to Format Codes") | Code | Description | Example | | ------ | ---------------- | -------- | | `yyyy` | 4-digit year | `2026` | | `MM` | Month (01-12) | `01` | | `dd` | Day (01-31) | `07` | | `HH` | Hour 24h (00-23) | `14` | | `mm` | Minute (00-59) | `30` | | `ss` | Second (00-59) | `22` | | `zzz` | UTC offset | `+02:00` | ## Decimal Separator[​](#decimal-separator "Direct link to Decimal Separator") Use the `--decimalseparator` parameter to specify the decimal separator for numeric values. ``` ./FastBCP \ ... --fileoutput "products.csv" --decimalseparator "," ... ``` `--decimalseparator`or`-n`default `.` `--decimalseparator "separator"` (short form: `-n "separator"`). Default: `.` (period/dot). ## No Header[​](#no-header "Direct link to No Header") Use the `--noheader` parameter to exclude column headers from the output. ``` ./FastBCP \ ... --fileoutput "customers.csv" \ --noheader \ ... ``` `--noheader`or`-h` Switch, no value (short form: `-h`). * Without --noheader (default) * With --noheader ``` CustomerID,CustomerName,Email 1,John Doe,john@example.com 2,Jane Smith,jane@example.com ``` ``` 1,John Doe,john@example.com 2,Jane Smith,jane@example.com ``` ## Boolean Format[​](#boolean-format "Direct link to Boolean Format") Use the `--boolformat` parameter to specify how boolean values are represented. ``` ./FastBCP \ ... --fileoutput "products.csv" \ --boolformat "1/0" \ ... ``` `--boolformat`or`-b`default `True/False` `--boolformat "format"` (short form: `-b "format"`). **Options:** `true/false`, `True/False` (default), `t/f`, `1/0`, `yes/no`, `y/n`. **With `--boolformat "true/false"` (default):** ``` ProductID,ProductName,InStock,Discontinued 1,Widget A,true,false 2,Widget B,false,true ``` **With `--boolformat "1/0"`:** ``` ProductID,ProductName,InStock,Discontinued 1,Widget A,1,0 2,Widget B,0,1 ``` **With `--boolformat "yes/no"`:** ``` ProductID,ProductName,InStock,Discontinued 1,Widget A,yes,no 2,Widget B,no,yes ``` ## Complete Example[​](#complete-example "Direct link to Complete Example") * Windows * Linux ``` .\FastBCP.exe ` --connectiontype mssql ` --server "localhost" ` --database "AdventureWorks" ` --trusted ` --query "SELECT OrderID, OrderDate, CustomerName, TotalAmount, IsShipped FROM Sales.Orders WHERE OrderDate >= '2024-01-01'" ` --directory "C:\exports\sales" ` --fileoutput "orders_{startdate}.csv" ` --delimiter "," ` --quotes ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --decimalseparator "." ` --boolformat "1/0" ` --encoding "UTF-8" ``` ``` ./FastBCP \ --connectiontype mssql \ --server "localhost" \ --database "AdventureWorks" \ --trusted \ --query "SELECT OrderID, OrderDate, CustomerName, TotalAmount, IsShipped FROM Sales.Orders WHERE OrderDate >= '2024-01-01'" \ --directory "/exports/sales" \ --fileoutput "orders_{startdate}.csv" \ --delimiter "," \ --quotes \ --dateformat "yyyy-MM-dd HH:mm:ss" \ --decimalseparator "." \ --boolformat "1/0" \ --encoding "UTF-8" ``` **Output (orders\_20260107.csv):** ``` "OrderID","OrderDate","CustomerName","TotalAmount","IsShipped" "1001","2026-01-05 10:30:00","John Doe","299.99","1" "1002","2026-01-05 11:15:00","Jane Smith","149.50","0" "1003","2026-01-06 09:20:00","Bob Johnson","599.00","1" ``` tip For Excel compatibility, use `.xlsx` format instead: `--fileoutput "data.xlsx"` --- # License Configure how FastBCP 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 FastBCP license. `--license`Long form only `--license ""`: a file path, an HTTP(S) URL or the license content itself. By default, without `--license`, FastBCP looks for a license file named `FastBCP.lic`: 1. 1Current directory`FastBCP.lic` in the current directory 2. 2Next to the executable`FastBCP.lic` next to the FastBCP executable ### Since FastBCP 1.5[​](#since-fastbcp-15 "Direct link to Since FastBCP 1.5") * Always requiredA license is always required, including for the free 30-day trial: the trial is a license file requested at [arpe.io](https://www.arpe.io). There is no build-date trial any more. `--help` and `--version` work without a license. * Several blocks per fileA license file can hold several blocks, each followed by its own signature, in any order: the FASTBCP block, an `ARPE ADBC DRIVER LICENCE` block for the ADBC drivers, and other products' blocks. * ADBC driversFastBCP checks the FASTBCP block against the signature that follows it, and forwards every ADBC block with its signature to the ADBC drivers, inline (`arpeio.adbc.license`, no temporary file); each driver uses the block meant for it. A driver license of your own (`arpeio.adbc.license` / `LicenseFile` in `--sourceconnectstring`, or `ARPEIO_ADBC_LICENCE` / `ARPEIO_ADBC_LICENCE_FILE`) wins: FastBCP then forwards nothing. | Exit code | When | | --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | **99** | No license, an invalid signature, or an `adbc_*` / `backup_mssql` / `backup_rman` connection type with no ADBC driver block (and no `ARPEIO_ADBC_LICENCE` / `ARPEIO_ADBC_LICENCE_FILE`) | | **100** | An expired license after its grace period | ### License Sources[​](#license-sources "Direct link to License Sources") FastBCP 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 ``` .\FastBCP.exe ` ... --license "C:\licenses\FastBCP.lic" ` ... ``` Linux ``` ./FastBCP \ ... --license "/path/to/licenses/FastBCP.lic" \ ... ``` Retrieve the license from a remote URL where you put the license content and distribute it using HTTPS: Windows ``` .\FastBCP.exe ` ... --license "https://licenseserve.yourdomain.lan/fastbcp.lic" ` ... ``` Linux ``` ./FastBCP \ ... --license "https://licenseserve.yourdomain.lan/fastbcp.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:FASTBCP_LICENSE = "LICENSE_CONTENT_HERE" .\FastBCP.exe ` ... --license $env:FASTBCP_LICENSE ` ... # Using variable $license = Get-Content "C:\licenses\FastBCP.lic" -Raw .\FastBCP.exe ` ... --license $license ` ... ``` Linux ``` # Using environment variable export FASTBCP_LICENSE="LICENSE_CONTENT_HERE" ./FastBCP \ ... --license "$FASTBCP_LICENSE" \ ... # Using variable license=$(cat /path/to/licenses/FastBCP.lic) ./FastBCP \ ... --license "$license" \ ... ``` ## Complete Example[​](#complete-example "Direct link to Complete Example") Here's a complete example using a license from a remote server with parallel export: | | This example | | ----------- | ------------------------------------------------------------------------------------------------------------------------------- | | **License** | Retrieved from a remote UNC path | | **Source** | A PostgreSQL database | | **Method** | Orders data exported with the `DataDriven` parallel method and 7 threads, with a `YEAR` expression on the distribute key column | | **Output** | Distributed files kept separate (`--merge false`) | * Windows * Linux ``` .\FastBCP.exe ` --connectiontype pgsql ` --server "localhost:15432" ` --database "tpch10" ` --user "FastUser" ` --password "FastPassword" ` --query "SELECT * FROM dbo.orders" ` --directory "D:\temp" ` --fileoutput "pgsql_orders.parquet" ` --parallelmethod DataDriven ` --distributekeycolumn "YEAR(o_orderdate)" ` --paralleldegree 7 ` --merge false ` --runid "pgsql_to_parquet_parallel_datadriven" ` --license "//SharedUnc/licenses/fastbcp/fastbcp.lic" ``` ``` ./FastBCP \ --connectiontype pgsql \ --server "localhost:15432" \ --database "tpch10" \ --user "FastUser" \ --password "FastPassword" \ --query "SELECT * FROM dbo.orders" \ --directory "/temp" \ --fileoutput "pgsql_orders.parquet" \ --parallelmethod DataDriven \ --distributekeycolumn "YEAR(o_orderdate)" \ --paralleldegree 7 \ --merge false \ --runid "pgsql_to_parquet_parallel_datadriven" \ --license "//SharedUnc/licenses/fastbcp/fastbcp.lic" ``` ## License Agreement[​](#license-agreement "Direct link to License Agreement") FastBCP and the ARPE.IO drivers it ships with are licensed under the **ARPE.IO Software License Agreement**, delivered with the software (`LICENSE.txt`, next to the executable). No reverse engineering Reverse engineering, decompiling or disassembling the binaries of ARPE.IO tools and drivers, or otherwise attempting to derive their source code, internal structure, algorithms or data formats, is **prohibited**, whether it is done manually or with the help of automated tools or artificial intelligence, except to the extent that applicable law expressly permits it. Any breach terminates the license and may give rise to legal proceedings. --- # Output Info Configure where and how FastBCP saves exported data. ## Directory[​](#directory "Direct link to Directory") Use the `--directory` parameter to specify where the output file(s) will be saved. `--directory`or`-D` `--directory "path"` (short form: `-D "path"`): a local path, a UNC path or a cloud path, as shown below. ### Local Paths[​](#local-paths "Direct link to Local Paths") * Windows * Linux ``` .\FastBCP.exe \ ... --directory "C:\exports\sales\orders" \ ... ``` ``` ./FastBCP \ ... --directory "/exports/sales/orders" \ ... ``` ### UNC Paths[​](#unc-paths "Direct link to UNC Paths") For Windows network shares, you can use UNC paths: ``` .\FastBCP.exe \ ... --directory "\\server\share\exports\orders" \ ... ``` ### Cloud Paths[​](#cloud-paths "Direct link to Cloud Paths") FastBCP supports direct export to cloud storage: * AWS S3 * Azure Blob * Azure Data Lake Gen2 * Google Cloud Storage * S3-Compatible (MinIO, OVH) * OneLake ``` ./FastBCP \ ... --directory "s3://my-bucket/exports/orders" \ ... ``` ``` ./FastBCP \ ... --directory "abs://mystorageaccount.blob.core.windows.net/container/path" \ ... ``` ``` ./FastBCP \ ... --directory "abfss://mystorageaccount.dfs.core.windows.net/container/path/to/data" \ ... ``` ``` ./FastBCP \ ... --directory "gs://my-bucket/exports/orders" \ ... ``` ``` ./FastBCP \ ... --directory "s3://my-bucket/exports" \ ... ``` ``` ./FastBCP \ ... --directory "onelake://myworkspace.dfs.core.windows.net/lakehouse/path/to/data" \ ... ``` Information See [Cloud Options](/latest/documentation/cli/cloud_options.md) for authentication and configuration details. ## Output File[​](#output-file "Direct link to Output File") Use the `--fileoutput` parameter to specify the name of the output file. The file extension determines the output format. ``` ./FastBCP \ ... --fileoutput "orders.parquet" \ ... ``` `--fileoutput`or`-o` `--fileoutput "filename"` (short form: `-o "filename"`). The extension sets the format: see [Supported Formats](#supported-formats). ### Supported Formats[​](#supported-formats "Direct link to Supported Formats") parquet ParquetRecommended`.parquet` Columnar, compressed csv CSV`.csv` Delimiter-separated values `.csv.gz`CSV GzippedDelimiter-separated values and compressed with Gzip tsv TSV`.tsv` Tab-separated values `.tsv.gz`TSV GzippedTab delimited values and compressed with Gzip json JSON`.json` JavaScript Object Notation `.json.gz`JSON GzippedJavaScript Object Notation with Gzip bson BSON`.bson` Binary JSON xlsx Excel`.xlsx` Microsoft Excel format bin Binary`.bin` PostgreSQL COPY binary format ## Tokens[​](#tokens "Direct link to Tokens") Use tokens in `--directory` and `--fileoutput` parameters for dynamic paths and filenames. ``` ./FastBCP \ ... --directory "/exports/{sourcedatabase}/{sourceschema}" \ --fileoutput "{sourcetable}_{startdate}.parquet" \ ... ``` **Syntax:** tokens are enclosed in curly braces `{token_name}`. With the example values below, the filename of the command above resolves to: `{sourcetable}_{startdate}.parquet`Resolves to`Orders_20260107.parquet` ### Available Tokens[​](#available-tokens "Direct link to Available Tokens") Source `{sourcedatabase}`→`AdventureWorks` Value from `--database` `{sourceschema}`→`Sales` Value from `--sourceschema` `{sourcetable}`→`Orders` Value from `--sourcetable` Job start `{starttimestamp}`→`20260107143022` Job start (yyyyMMddHHmmss) `{starttimestamp:FORMAT}`→[See below](#timestamp-format-codes) Custom timestamp format `{startdate}`→`20260107` Job start date (yyyyMMdd) `{starttime}`→`143022` Job start time (HHmmss) `{starthour}`→`14` Job start hour (HH) Other `{user}`→`dbuser` Username (from `--user` or system) `{filetype}`→`parquet` Output format extension `{datadrivencolumn}`→Varies Data-driven split value ### Timestamp Format Codes[​](#timestamp-format-codes "Direct link to Timestamp Format Codes") Use `{starttimestamp:FORMAT}` with custom format: `yyyy`→`2026` 4-digit year `yy`→`26` 2-digit year `MM`→`01` Month (01-12) `dd`→`07` Day (01-31) `HH`→`14` Hour 24h (00-23) `mm`→`30` Minute (00-59) `ss`→`22` Second (00-59) **Examples:** ``` # yyyyMMdd format ./FastBCP \ ... --fileoutput "orders_{starttimestamp:yyyyMMdd}.parquet" \ ... # yyyy-MM-dd format ./FastBCP \ ... --fileoutput "orders_{starttimestamp:yyyy-MM-dd}.parquet" \ ... # yyyyMMddHH format (hourly) ./FastBCP \ ... --fileoutput "logs_{starttimestamp:yyyyMMddHH}.parquet" \ ... ``` ## Timestamped Output[​](#timestamped-output "Direct link to Timestamped Output") Use the `--timestamped` parameter to automatically add a timestamp to the filename. ``` ./FastBCP \ ... --fileoutput "orders.parquet" \ --timestamped \ ... ``` `--timestamped`or`-x` Switch, no value (short form: `-x`). tip `--timestamped` automatically appends `_yyyyMMddHHmmss` to the filename. For more control over format and placement, use timestamp tokens instead. ## Encoding[​](#encoding "Direct link to Encoding") Use the `--encoding` parameter to specify character encoding for text formats (CSV, JSON, TSV). ``` ./FastBCP \ ... --fileoutput "orders.csv" \ --encoding "UTF-8" \ ... ``` `--encoding`or`-e`default `UTF-8` `--encoding "encoding"` (short form: `-e "encoding"`). note Encoding is not applicable to Parquet files (they use UTF-8 internally). --- # Parallel Parameters FastBCP 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 ``` .\FastBCP.exe ` ... --parallelmethod Ntile ` ... ``` ``` ./FastBCP \ ... --parallelmethod Ntile \ ... ``` `--parallelmethod`or`-m` `--parallelmethod ` (short form: `-m `). The methods are compared below. ### Methods Comparison[​](#methods-comparison "Direct link to Methods Comparison") | Method | Parallel | Needs Distributed Column | Database Source Type | | ---------------------------- | ------------- | ------------------------ | ---------------------------------------------------------------------------------------------------------------------------- | | `None` | Not supported | Not supported | Any | | `Random` | Supported | Supported | Any | | `DataDriven` | Supported | Supported | Any | | `RangeId` | Supported | Supported | Any | | `Ntile` | Supported | Supported | Any | | `Physical` | Supported | Not supported | PostgreSQL, Oracle, SQL Server, Netezza, SQL Server backup files, Oracle RMAN backup sets (see [Physical](#physical-method)) | | `Ctid` *(deprecated)* | Supported | Not supported | PostgreSQL (pgsql/pgcopy) | | `Physloc` *(deprecated)* | Supported | Not supported | SQL Server (mssql) | | `Rowid` *(deprecated)* | Supported | Not supported | Oracle (oraodp/adbc\_oracle) | | `NZDataSlice` *(deprecated)* | Supported | Not supported | Netezza (nzsql/adbc\_netezza) | | `DBPartition` | Supported | Not supported | SQL Server, PostgreSQL, Oracle, MySQL, Teradata (and their `adbc_*` counterparts), Db2 for LUW (`adbc_db2`) | | `Timepartition` | Supported | Supported | Any | ### Available Methods[​](#available-methods "Direct link to Available Methods") [`Physical`](#physical-method)RecommendedNo key column Splits the data on the physical row location of the source engine. The strategy (Ctid, Rowid, Physloc, NZDataSlice, or Pages for SQL Server backup files and Oracle RMAN backup sets) is picked from the connection type. See [Physical Method](#physical-method) below. [`DBPartition`](#dbpartition-example)No key column Runs one extraction per native partition / subpartition of the source table. The largest partitions are scheduled first, based on the catalog row estimates. `None`Any source No parallel processing. Data is exported sequentially. `Ntile`Any source Uses the distributed column field and ntile values to retrieve evenly distributed chunks of data. Each parallel thread exports a portion based on a range built using the distributed column values. Key column--distributekeycolumn (uniqueness not mandatory) `RangeId`Any source Uses the distributed column field and its min/max values to retrieve chunks of data. Each parallel thread exports a portion based on a range built using the distributed column values. Key column--distributekeycolumn `Random`Any source Requires a distribution column that must be an integer/bigint with many values. Key columnAn integer/bigint column with many values (at least as many as the degree of parallelism) [`DataDriven`](#data-driven-query)Any source Uses all values of a column (or a given list provided by `--datadrivenquery`) to split the export. If the number of values is greater than the degree of parallelism, throttling will be applied. Key column--distributekeycolumn, optionally --datadrivenquery [`Timepartition`](#timepartition-example)Any source Uses a date/datetime column to partition data into time-based chunks. Each parallel thread exports data for a specific time period (year, month, week, or day). Ideal for time-series data: efficient parallel export based on temporal ranges. Key column(datecolumn, year, month), (datecolumn, year, month, day), (datecolumn, year) or (datecolumn, year, week) Good to know * **Expressions:** you can use an expression in the distribute key column instead of a column name. Example: `YEAR(o_orderdate)`. * **Backup files:** with `backup_mssql` and `backup_rman`, only `None` and `Physical` are available: there is no SQL engine behind a backup file to compute ranges, partitions or random keys. Any other method stops with `ERROR in command line parameters : method is not available with connection type backup_mssql ==> use --parallelmethod None or Physical` (or `backup_rman`). DBPartition: partitioning used per source and output layout | Source | Partitioning used | | -------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | | SQL Server (`mssql`, `adbc_mssql`) | `$PARTITION` | | PostgreSQL (`pgsql`, `pgcopy`, `adbc_pgsql`) | Leaf tables | | Oracle (`oraodp`, `adbc_oracle`) | `PARTITION (...)` | | MySQL (`mysql`) | `PARTITION (...)` | | Teradata (`teradata`, `adbc_teradata`) | Row partitioning, single- and multi-level PPI | | Db2 for LUW (`adbc_db2`) | Range partitioning: one range predicate per visible data partition, so Db2 reads only that partition (*since 1.7.0*) | * `DBPartition` requires `--sourceschema` and `--sourcetable`; it does not need a distribute key column. It falls back to `None`, with a warning, when the table is not partitioned, has a single partition, or the source is not supported. * The output file layout is controlled by the [`FASTBCP_DBPARTITION_TARGET_MODE`](/latest/documentation/environment-variables/fastbcp-dbpartition-target-mode.md) environment variable: numbered chunks (`CHUNK`, default) or Hive-style directories named after each partition (`HIVE`). `--merge` works in both modes. #### Deprecated engine-specific methods[​](#deprecated-engine-specific-methods "Direct link to Deprecated engine-specific methods") Deprecated The four engine-specific values below are still accepted, but they are **deprecated** and will be removed in **FastBCP 2.0**. Use [`Physical`](#physical-method) instead: it picks the same strategy from the connection type (see the [table below](#physical-method)). When a deprecated value is used, FastBCP runs the export as before and logs a warning: ``` Parallel method Ctid is deprecated and will be removed in 2.0 ==> use --parallelmethod Physical ``` Their description is kept here for reference: `Ctid`Deprecated![](/img/logos/postgresql.svg)PostgreSQL Uses an internal hidden field to retrieve chunks of data. Each parallel thread exports a portion based on the CTID range. PostgreSQL databases only (and some compatible PostgreSQL databases). `Physloc`Deprecated![](/img/logos/sqlserver.svg)SQL Server Uses an internal hidden field (`%%physloc%%`) to retrieve chunks of data. Each parallel thread exports a portion based on the Physloc value. SQL Server databases only. Since FastBCP 1.4, it requires `--sourceschema` and `--sourcetable` (directly or through `Physical`). `Rowid`Deprecated![](/img/logos/oracle.svg)Oracle Uses an internal hidden field to retrieve chunks of data. Each parallel thread exports a portion based on the ROWID range. Oracle databases only (`oraodp` and `adbc_oracle` connection types). Since FastBCP 1.4, it requires `--sourceschema` and `--sourcetable` (directly or through `Physical`); it used to crash when they were missing. `NZDataSlice`DeprecatedNetezza Uses the native Netezza data slices to retrieve chunks of data. Each parallel thread exports a portion based on the data slice distribution. Slices go through a shared work queue: an idle thread takes the next waiting slice, which keeps all threads busy when slices are uneven. After the first failure, no new slice is started. Netezza databases only (`nzsql` and `adbc_netezza` connection types). Physloc on rowstore and clustered columnstore tables * On a rowstore table, the rows are distributed on the two low bytes of the page id, so runs of 256 pages go to each chunk. * On a **clustered columnstore** table, `%%physloc%%` is a row id, not a page address. FastBCP detects the clustered columnstore index and distributes the rows on the whole row id instead (logged as `Physloc : .
is a clustered columnstore, splitting on the columnstore row id`). If the check fails, FastBCP logs a warning and uses the rowstore key. ## Physical Method[​](#physical-method "Direct link to Physical Method") `--parallelmethod Physical` is the recommended way to split a table on its physical row location, without a distribute key column. FastBCP picks the physical-location strategy of the source engine from the connection type (`--connectiontype`): | Source | Connection types | Resolved strategy | | ----------------------- | -------------------------------------------- | ----------------- | | PostgreSQL | `pgsql`, `pgcopy`, `adbc_pgsql` | `Ctid` | | Oracle | `oraodp`, `adbc_oracle` | `Rowid` | | SQL Server | `mssql`, `msoledbsql`, `adbc_mssql` | `Physloc` | | Netezza | `nzsql`, `nzcopy`, `nzoledb`, `adbc_netezza` | `NZDataSlice` | | SQL Server backup files | `backup_mssql` | `Pages` | | Oracle RMAN backup sets | `backup_rman` | `Pages` | The resolved strategy behaves exactly like the deprecated engine-specific method of the same name (see [Deprecated engine-specific methods](#deprecated-engine-specific-methods)). The Pages strategy (backup\_mssql and backup\_rman) **Pages** (`backup_mssql` and `backup_rman`, reached through `Physical`) splits the table read from the backup into as many slices as the degree of parallelism: with `backup_mssql`, contiguous ranges of data pages for a rowstore table, of rowgroups (and delta stores) for a clustered columnstore table; with `backup_rman`, contiguous ranges of the table's blocks. Each thread opens the shared, already indexed backup and reads its own slice, so the threads do not read the same pages twice. Each slice is logged as `Completed Pages Load sub-process : rows x columns in ms`. `--sourceschema`/`--sourcetable`Required Both are required. `--query` can be added to filter the table (simple query with a WHERE clause). `--distributekeycolumn`Not used `Physical` does not use a distribute key column. Missing --sourceschema or --sourcetable Error: `ERROR in command line parameters : With Physical (Ctid) Method you must define source schema (--sourceschema) and source table (--sourcetable) ==> With Physical (Ctid) Method --sourceschema and --sourcetable are both mandatory` How to fix FastBCP stops with an error when one of them is missing: give both `--sourceschema` and `--sourcetable`. Unsupported source Error: `ERROR in command line parameters : Physical method is not supported for connection type 'mysql' ==> supported sources are PostgreSQL, Oracle, SQL Server, SQL Server backups, Oracle RMAN backups and Netezza` How to fix Any other connection type (`odbc`, `oledb`, `mysql`, `clickhouse`, `hana`, `teradata`, `adbc_teradata`, `adbc_db2`) stops with an error. ODBC and OLE DB Error: `ERROR in command line parameters : Physical method cannot identify the source engine behind connection type 'odbc' ==> use a native connection type (pgsql, pgcopy, oraodp, mssql, msoledbsql, nzsql, nzcopy, nzoledb or their adbc_* counterpart, backup_mssql, backup_rman)` How to fix With `odbc` and `oledb`, FastBCP cannot know which engine is behind the driver, so the error asks for a native connection type. Good to know: logs The resolved strategy is written to the log as the distribute method: `Distribute Method : Physical (Ctid)`. The OpenTelemetry spans carry the resolved method in `fastbcp.method`. When `Physical` was resolved, `fastbcp.method.requested` holds `Physical`. ### Physical Examples[​](#physical-examples "Direct link to Physical Examples") * PostgreSQL * SQL Server * Oracle * Oracle RMAN backup * SQL Server backup Windows ``` # PostgreSQL: resolved to Ctid .\FastBCP.exe ` --connectiontype "pgsql" ` --server "localhost:5432" ` --database "tpch" ` --user "FastUser" ` --password "FastPassword" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --parallelmethod "Physical" ` --paralleldegree 8 ` --directory "D:\temp\orders" ` --fileoutput "orders.parquet" ` --merge "False" ``` Linux ``` # PostgreSQL: resolved to Ctid ./FastBCP \ --connectiontype "pgsql" \ --server "localhost:5432" \ --database "tpch" \ --user "FastUser" \ --password "FastPassword" \ --sourceschema "tpch_10" \ --sourcetable "orders" \ --parallelmethod "Physical" \ --paralleldegree 8 \ --directory "/data/export/orders" \ --fileoutput "orders.parquet" \ --merge "False" ``` Windows ``` # SQL Server: resolved to Physloc .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "tpch" ` --trusted ` --sourceschema "dbo" ` --sourcetable "orders" ` --parallelmethod "Physical" ` --paralleldegree -2 ` --directory "D:\temp\orders" ` --fileoutput "orders.parquet" ` --merge "False" ``` Linux ``` # Oracle: resolved to Rowid ./FastBCP \ --connectiontype "oraodp" \ --server "dbserver:1521/ORCLPDB" \ --user "FastUser" \ --password "FastPassword" \ --sourceschema "SALES" \ --sourcetable "ORDERS" \ --parallelmethod "Physical" \ --paralleldegree 8 \ --directory "/data/export/orders" \ --fileoutput "orders.parquet" \ --merge "False" ``` Windows ``` # Oracle RMAN backup set: resolved to Pages .\FastBCP.exe ` --connectiontype "backup_rman" ` --server "D:\Backups\RMAN" ` --database "full_*" ` --sourceschema "SALES" ` --sourcetable "ORDERS" ` --parallelmethod "Physical" ` --paralleldegree 8 ` --directory "D:\temp\orders" ` --fileoutput "orders.parquet" ` --merge "False" ``` Linux ``` # Oracle RMAN backup set (multi-piece, compressed): resolved to Pages ./FastBCP \ --connectiontype "backup_rman" \ --server "/backup/rman/orcl" \ --database "full_*" \ --sourceschema "SALES" \ --sourcetable "LINEITEM" \ --parallelmethod "Physical" \ --paralleldegree 8 \ --directory "/data/export/lineitem" \ --fileoutput "lineitem.parquet" \ --merge "False" ``` Windows ``` # SQL Server backup file: resolved to Pages .\FastBCP.exe ` --connectiontype "backup_mssql" ` --server "D:\Backups\MSSQL" ` --database "tpch_full.bak" ` --sourceschema "dbo" ` --sourcetable "orders" ` --parallelmethod "Physical" ` --paralleldegree 8 ` --directory "D:\temp\orders" ` --fileoutput "orders.parquet" ` --merge "False" ``` Linux ``` # SQL Server backup files (striped over 3 files): resolved to Pages ./FastBCP \ --connectiontype "backup_mssql" \ --server "/var/opt/mssql/backup" \ --database "tpch_*.bak" \ --sourceschema "dbo" \ --sourcetable "lineitem" \ --parallelmethod "Physical" \ --paralleldegree 8 \ --directory "/data/export/lineitem" \ --fileoutput "lineitem.parquet" \ --merge "False" ``` ## 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. FastBCP 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. Good to know This parameter is mandatory when using methods that require a distributed column: Random, DataDriven, RangeId, Ntile, or Timepartition. It is not used by `Physical` (nor by the deprecated Ctid, Rowid, Physloc and NZDataSlice) or `DBPartition`. With the `Timepartition` method, the distribute key column must be specified in a special format: | Format | Partitions by | | -------------------------------- | -------------------- | | `(datecolumn, year)` | Year only | | `(datecolumn, year, month)` | Year and month | | `(datecolumn, year, month, day)` | Year, month, and day | | `(datecolumn, year, week)` | Year and week | Example: `--distributekeycolumn "(o_orderdate, year, month)"` * Windows * Linux ``` # Using a column name .\FastBCP.exe ` ... --distributekeycolumn order_date ` ... # Using an expression .\FastBCP.exe ` ... --distributekeycolumn "YEAR(order_date)" ` ... ``` ``` # Using a column name ./FastBCP \ ... --distributekeycolumn order_date \ ... # Using an expression ./FastBCP \ ... --distributekeycolumn "YEAR(order_date)" \ ... ``` `--distributekeycolumn`or`-c` `--distributekeycolumn ` (short form: `-c `) ## Degree of Parallelism[​](#degree-of-parallelism "Direct link to Degree of Parallelism") Use the `--paralleldegree` parameter to control how many parallel threads will be used for the export. ### DOP Values[​](#dop-values "Direct link to DOP Values") `n > 0`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. `n < 0`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 .\FastBCP.exe ` ... --paralleldegree 8 ` ... # Auto-detect based on CPU cores .\FastBCP.exe ` ... --paralleldegree 0 ` ... # Use half of available cores .\FastBCP.exe ` ... --paralleldegree -2 ` ... ``` ``` # Use 8 parallel threads ./FastBCP \ ... --paralleldegree 8 \ ... # Auto-detect based on CPU cores ./FastBCP \ ... --paralleldegree 0 \ ... # Use half of available cores ./FastBCP \ ... --paralleldegree -2 \ ... ``` `--paralleldegree`or`-p`default `-2` `--paralleldegree ` (short form: `-p `) ## 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 ``` .\FastBCP.exe ` ... --datadrivenquery "SELECT tagname FROM tags" ` ... ``` ``` .\FastBCP.exe ` ... --datadrivenquery "SELECT o_orderdate FROM dim_date where ref_date > getdate() - 30" ` ... ``` ``` ./FastBCP \ ... --datadrivenquery "SELECT tagname FROM tags" \ ... ``` ``` ./FastBCP \ ... --datadrivenquery "SELECT o_orderdate FROM dim_date where ref_date > getdate() - 30" \ ... ``` `--datadrivenquery`Long form only `--datadrivenquery ""`, with the `DataDriven` method. ## Merge (boolean)[​](#merge "Direct link to Merge (boolean)") Use `--merge` true/false to specify if the files generated by the parallel export should be merged into a single output file (`true`) or kept as separate files (`false`). `--merge`or`-M`default `false` `--merge true` or `--merge false` (short form: `-M`) warning * Current version allows valid merge for CSV and Parquet formats only. * Merge is not available for cloud destinations: `--merge true` is forced to `false` (with a warning in the log) when `--directory` is a cloud URI. * Merge is not supported with gzip compressed output (`.csv.gz`, `.tsv.gz`, `.json.gz`): FastBCP stops with an error. - Windows - Linux ``` # Merge files after parallel export .\FastBCP.exe ` ... --merge true ` ... # Keep distributed files (default) .\FastBCP.exe ` ... --merge false ` ... ``` ``` # Merge files after parallel export ./FastBCP \ ... --merge true \ ... # Keep distributed files (default) ./FastBCP \ ... --merge false \ ... ``` ## 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 PostgreSQL database on localhost:15432 | | **Data** | A query on the `tpch_10.orders` table | | **Method** | `DataDriven`, distributing work on the month of the order date, computed with an expression | | **Split values** | A custom query generates the month values to extract from a light query (instead of a `SELECT DISTINCT o_ordermonth` from the source query) | | **Threads** | 10 parallel threads (even if there are 12 months to export) | | **Output** | Distributed files kept, without merging (`--merge false`) | | **Run ID** | A custom Run ID for tracking | * Windows * Linux ``` .\FastBCP.exe ` --connectiontype "pgcopy" ` --server "localhost:15432" ` --database "tpch" ` --user "FastUser" ` --password "FastPassword" ` --query "with T1 AS (select *, to_char(o_orderdate, 'YYYYMM') o_ordermonth from tpch_10.orders) SELECT * FROM T1" ` --directory "D:\temp\tpch\orders\" ` --fileoutput "pgcopy_orders.parquet" ` --method "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" ` --paralleldegree 10 ` --merge "False" ` --runid "pgcopy_to_parquet_parallel12_DataDriven" ``` ``` ./FastBCP \ --connectiontype "pgcopy" \ --server "localhost:15432" \ --database "tpch" \ --user "FastUser" \ --password "FastPassword" \ --query "with T1 AS (select *, to_char(o_orderdate, 'YYYYMM') o_ordermonth from tpch_10.orders) SELECT * FROM T1" \ --directory "/data/export/tpch/orders/" \ --fileoutput "pgcopy_orders.parquet" \ --method "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" \ --paralleldegree 10 \ --merge "False" \ --runid "pgcopy_to_parquet_parallel12_DataDriven" ``` ## Timepartition Example[​](#timepartition-example "Direct link to Timepartition Example") Here's an example using the Timepartition method to partition data based on a date column: | | This example | | ----------- | -------------------------------------------------------------- | | **Source** | A SQL Server database on localhost | | **Data** | The `tpch_10.orders_date_sorted` table | | **Method** | `Timepartition`, by year and month on the `o_orderdate` column | | **Threads** | 16 parallel threads | | **Output** | Distributed files kept, without merging | | **Run ID** | A custom Run ID for tracking | * Windows * Linux ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "tpch_copy" ` --user "FastUser" ` --password "FastPassword" ` --sourceschema "tpch_10" ` --sourcetable "orders_date_sorted" ` --directory "D:\temp\TestPartition" ` --fileoutput "orders.csv" ` --decimalseparator "," ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --method "Timepartition" ` --distributekeycolumn "(o_orderdate,year,month)" ` --paralleldegree 16 ` --merge "False" ` --runid "mssql_to_csv_parallel8_timepartition" ``` ``` ./FastBCP \ --connectiontype "mssql" \ --server "localhost" \ --database "tpch_copy" \ --user "FastUser" \ --password "FastPassword" \ --sourceschema "tpch_10" \ --sourcetable "orders_date_sorted" \ --directory "/data/export/TestPartition" \ --fileoutput "orders.csv" \ --decimalseparator "," \ --delimiter "|" \ --dateformat "yyyy-MM-dd HH:mm:ss" \ --encoding "UTF-8" \ --method "Timepartition" \ --distributekeycolumn "(o_orderdate,year,month)" \ --paralleldegree 16 \ --merge "False" \ --runid "mssql_to_csv_parallel8_timepartition" ``` ## DBPartition Example[​](#dbpartition-example "Direct link to DBPartition Example") Here's an example using the DBPartition method to export each partition of a partitioned table into a Hive-style directory: | | This example | | -------------- | ------------------------------------------------------------------------------------------------ | | **Source** | A PostgreSQL database on localhost:5432 | | **Data** | The partitioned table `tpch_10.orders_partitioned`, one extraction per leaf table | | **Scheduling** | Starts with the largest partitions and runs up to 8 of them in parallel | | **Output** | Each partition written to `partition=/orders.parquet` (`HIVE` mode), without merging | | **Run ID** | A custom Run ID for tracking | * Windows * Linux ``` $env:FASTBCP_DBPARTITION_TARGET_MODE = "HIVE" .\FastBCP.exe ` --connectiontype "pgsql" ` --server "localhost:5432" ` --database "tpch" ` --user "FastUser" ` --password "FastPassword" ` --sourceschema "tpch_10" ` --sourcetable "orders_partitioned" ` --method "DBPartition" ` --paralleldegree 8 ` --directory "D:\temp\orders" ` --fileoutput "orders.parquet" ` --merge "False" ` --runid "pgsql_to_parquet_dbpartition" ``` ``` export FASTBCP_DBPARTITION_TARGET_MODE=HIVE ./FastBCP \ --connectiontype "pgsql" \ --server "localhost:5432" \ --database "tpch" \ --user "FastUser" \ --password "FastPassword" \ --sourceschema "tpch_10" \ --sourcetable "orders_partitioned" \ --method "DBPartition" \ --paralleldegree 8 \ --directory "/data/export/orders" \ --fileoutput "orders.parquet" \ --merge "False" \ --runid "pgsql_to_parquet_dbpartition" ``` --- # Parquet Formatting [Apache Parquet](https://parquet.apache.org/) is a columnar storage format optimized for analytics. FastBCP automatically uses Parquet format when the output file has a `.parquet` extension. ## Parquet Compression[​](#parquet-compression "Direct link to Parquet Compression") Use the `--parquetcompression` parameter to specify the parquet compression codec. ``` ./FastBCP \ ... --fileoutput "orders.parquet" \ --parquetcompression Snappy \ ... ``` `--parquetcompression`default `Zstd` Syntax: `--parquetcompression ` (long form). The default, `Zstd`, is faster and has a better compression ratio than the others. **Available Algorithms:** `None` No compression `Snappy` Fast, small compression, classic `Gzip` Smaller files, slower `Lzo` Slower, medium compression (rarely used) `Lz4` Slower, moderate compression `Zstd`Default Best compression and Fast tip The **Zstd** (default) is best for most cases. It provides the best compression ratio with moderate speed, ideal for cloud storage to minimize storage costs and transfer time. * So no need to set this parameter to use Zstd. ## Row Group Size Configuration[​](#row-group-size-configuration "Direct link to Row Group Size Configuration") Available since version 0.30.1 This feature is available starting from FastBCP version 0.30.1. You can control the Parquet row group size using the `FASTBCP_RGSIZE` environment variable. Row groups are the unit of parallelization in Parquet files, and their size can impact query performance and memory usage. `FASTBCP_RGSIZE`Environment variabledefault `max(2^18/sqrt(degree),64000)` Row group size of the Parquet files, in rows. See [FASTBCP\_RGSIZE](/latest/documentation/environment-variables/fastbcp-rgsize.md). **Usage:** * Windows * Linux ``` # Set the row group size to 500,000 rows $env:FASTBCP_RGSIZE = "500000" # Run FastBCP .\FastBCP.exe --connectiontype mssql --server "localhost" ... ``` ``` # Set the row group size to 500,000 rows export FASTBCP_RGSIZE=500000 # Run FastBCP ./FastBCP --connectiontype mssql --server "localhost" ... ``` ## Complete Example[​](#complete-example "Direct link to Complete Example") * Windows * Linux ``` $env:FASTBCP_RGSIZE = "500000" .\FastBCP.exe ` --connectiontype mssql ` --server "localhost" ` --database "sales" ` --trusted ` --query "SELECT * FROM orders WHERE OrderDate >= '2024-01-01'" ` --directory "C:\exports" ` --fileoutput "orders.parquet" ` --parquetcompression Snappy ``` ``` export FASTBCP_RGSIZE=500000 ./FastBCP \ --connectiontype mssql \ --server "localhost" \ --database "sales" \ --trusted \ --query "SELECT * FROM orders WHERE OrderDate >= '2024-01-01'" \ --directory "/exports" \ --fileoutput "orders.parquet" \ --parquetcompression Snappy ``` --- # Source Info FastBCP offers multiple ways to define your data source for extraction. You can use a query, an input file, or specify schema and table names directly. ## Query[​](#query "Direct link to Query") Use the `--query` parameter to specify your extraction as a SELECT statement. ``` ./FastBCP \ ... --query "SELECT * FROM Sales.Orders WHERE OrderDate >= '2024-01-01'" \ ... ``` `--query`or`-q` `--query "SELECT_statement"` (short form: `-q "SELECT_statement"`) ## Input File[​](#input-file "Direct link to Input File") Use the `--fileinput` parameter to specify an input file that contains only one query. ``` ./FastBCP \ ... --fileinput "/sources/sql/queries/my_extraction.sql" \ ... ``` `--fileinput`or`-F` `--fileinput "file_path"` (short form: `-F "file_path"`) Warning The query in the input file must not end with a semicolon (`;`). ## Source Schema[​](#source-schema "Direct link to Source Schema") If no query or input file is used, you can specify the source schema with the `--sourceschema` parameter. Combined with the source table, this will extract data from `sourceschema.sourcetable`. ``` ./FastBCP \ ... --sourceschema "Sales" \ --sourcetable "Orders" \ ... ``` `--sourceschema`or`-s` `--sourceschema "schema_name"` (short form: `-s "schema_name"`) Information This field is mandatory with the `Physical` (and the deprecated `Ctid`, `Rowid`, `Physloc`) and `DBPartition` parallel methods. See **[Parallel Parameters](/latest/documentation/cli/parallel_parameters.md#physical-method)** for more details. ## Source Table[​](#source-table "Direct link to Source Table") If no query or input file is used, you can specify the source table with the `--sourcetable` parameter. Combined with the source schema, this will extract data from `sourceschema.sourcetable`. ``` ./FastBCP \ ... --sourceschema "Sales" \ --sourcetable "Orders" \ ... ``` `--sourcetable`or`-T` `--sourcetable "table_name"` (short form: `-T "table_name"`) Information This field is mandatory with the `Physical` (and the deprecated `Ctid`, `Rowid`, `Physloc`) and `DBPartition` parallel methods. See **[Parallel Parameters](/latest/documentation/cli/parallel_parameters.md#physical-method)** for more details. Warning if you use the placeholder `{sourceschema}` and `{sourcetable}` in the `--directory` or `--fileoutput` (See **[Output Info](/latest/documentation/cli/output_info.md)**) then you must set the `--sourceschema `and the `--sourcetable `even you use `--query `or `--inputfile` Related * [Parallel Parameters](/latest/documentation/cli/parallel_parameters.md#physical-method)the `Physical` method * [Output Info](/latest/documentation/cli/output_info.md)tokens in `--directory` and `--fileoutput` --- # AWS S3 Configuration Complete guide for configuring AWS S3 connectivity with FastBCP. ## Authentication Methods[​](#authentication-methods "Direct link to Authentication Methods") FastBCP supports multiple AWS authentication methods, listed in order of precedence: 1\. AWS Credentials File The most common method for local development and testing * Recommended forLocal development * Configured with`~/.aws/credentials` (and optionally `~/.aws/config`), profiles selected with `--cloudprofile` 2\. Environment Variables Useful for CI/CD pipelines and containerized environments * Recommended forCI/CD * Configured with`AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, `AWS_DEFAULT_REGION`, optionally `AWS_SESSION_TOKEN` 3\. IAM Roles EC2, ECS, Lambda, Batch and EKS * Recommended forAWS infrastructure * Configured withThe instance's IAM role, no credentials configuration needed ### 1. AWS Credentials File[​](#1-aws-credentials-file "Direct link to 1. AWS Credentials File") The most common method for local development and testing. | OS | Credentials file 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):** `~/.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 FastBCP:** ``` # Use default profile ./FastBCP \ ... --directory "s3://my-bucket/exports" \ --fileoutput "data.parquet" \ ... # Use production profile ./FastBCP \ ... --directory "s3://prod-bucket/exports" \ --cloudprofile "production" \ --fileoutput "data.parquet" \ ... # Use development profile ./FastBCP \ ... --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 FastBCP .\FastBCP.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 FastBCP ./FastBCP \ ... --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 FastBCP runs on AWS infrastructure, it can automatically use 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 FastBCP:** ``` { "Version": "2012-10-17", "Statement": [ { "Sid": "FastBCPRequired", "Comment": "REQUIRED - actual operations performed by FastBCP (multipart upload)", "Effect": "Allow", "Action": [ "s3:PutObject", "s3:AbortMultipartUpload" ], "Resource": "arn:aws:s3:::MY-BUCKET/exports/*" }, { "Sid": "FastBCPOptionalConvenience", "Comment": "OPTIONAL - operational convenience, not required by the code", "Effect": "Allow", "Action": [ "s3:GetObject", "s3:ListBucket" ], "Resource": [ "arn:aws:s3:::MY-BUCKET/exports/*", "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 ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "orders" ` --directory "s3://my-bucket/exports/{sourcetable}" ` --fileoutput "{sourcetable}.parquet" ``` ``` ./FastBCP \ --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 ``` .\FastBCP.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" ``` ``` ./FastBCP \ --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 ``` .\FastBCP.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 ``` ``` ./FastBCP \ --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") FastBCP 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/*" } } } ] } ``` ## Server-Side Encryption with AWS KMS (SSE-KMS)[​](#server-side-encryption-with-aws-kms-sse-kms "Direct link to Server-Side Encryption with AWS KMS (SSE-KMS)") FastBCP can write to buckets encrypted with SSE-KMS. Encryption is done by S3 on the server side, so FastBCP never calls AWS KMS directly: S3 calls KMS on behalf of the identity that uploads the files. Encryption can come from: * **Bucket default encryption:** the bucket is configured with SSE-KMS as its default encryption, and S3 encrypts every new object with the configured key. Nothing needs to be set on the FastBCP side. * **App-driven encryption:** the upload request itself asks for SSE-KMS (and optionally a specific KMS key). The required permissions are the same. ### KMS Permissions[​](#kms-permissions "Direct link to KMS Permissions") FastBCP uploads files with S3 multipart uploads. With SSE-KMS, a multipart upload needs both `kms:GenerateDataKey` and `kms:Decrypt` on the KMS key, in addition to the S3 permissions above. | Key type | What to configure | | ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | **AWS managed key** (`aws/s3`) | Nothing more: its key policy already lets any principal of the account use it through S3. It cannot be used across accounts. | | **Customer managed key** | Allow `kms:GenerateDataKey` and `kms:Decrypt` in the IAM policy of the identity running FastBCP **and** make sure the key policy allows that identity (or delegates to IAM policies). | **Example IAM policy for a customer managed key:** ``` { "Version": "2012-10-17", "Statement": [ { "Sid": "FastBCPS3Upload", "Effect": "Allow", "Action": [ "s3:PutObject", "s3:AbortMultipartUpload" ], "Resource": "arn:aws:s3:::MY-BUCKET/exports/*" }, { "Sid": "FastBCPKmsForSSE", "Effect": "Allow", "Action": [ "kms:GenerateDataKey", "kms:Decrypt" ], "Resource": "arn:aws:kms:eu-west-1:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab", "Condition": { "StringEquals": { "kms:ViaService": "s3.eu-west-1.amazonaws.com" } } } ] } ``` S3 Bucket Keys Enabling **S3 Bucket Keys** on the bucket reduces the number of calls from S3 to KMS, and therefore KMS costs and throttling, which matters for parallel exports that write many files. With Bucket Keys, the KMS encryption context is the bucket ARN instead of the object ARN: update any `kms:EncryptionContext` condition in your policies accordingly. ### Network / Egress[​](#network--egress "Direct link to Network / Egress") Since S3 calls KMS itself, FastBCP only needs network access to the S3 endpoint, not to the KMS endpoint. In a private VPC, an S3 gateway or interface endpoint is enough. --- # Azure Configuration Complete guide for configuring Azure Blob Storage and Azure Data Lake Gen2 connectivity with FastBCP. ## 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") FastBCP supports multiple Azure authentication methods: | Method | Best for | | ---------------------------------------------------- | ------------------------------------ | | [**1. Azure CLI**](#1-azure-cli) | Recommended for local development | | [**2. Connection String**](#2-connection-string) | Simple but less secure | | [**3. Storage Account Key**](#3-storage-account-key) | Via environment variables | | [**4. Managed Identity**](#4-managed-identity) | Recommended for Azure infrastructure | | [**5. SAS URL**](#5-sas-url) | Scoped, time-limited access | For direct commit to Azure Blob Storage, FastBCP uses `AZURE_STORAGE_CONNECTION_STRING` or `AZURE_STORAGE_SAS_URL` when one of them is set, and falls back to `DefaultAzureCredential` (Azure CLI, Managed Identity, environment credentials, …) otherwise. The selected authentication method is written to the log. ### 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 ``` FastBCP will automatically use the Azure CLI's authentication credentials. **Using with FastBCP:** ``` # No additional configuration needed - just run FastBCP ./FastBCP \ ... --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. Copy the connection string Azure Portal›Storage Account›Security + networking›Access keys 1. Navigate to your Storage Account 2. Go to **Security + networking** › **Access keys** 3. Copy the **Connection string** for key1 or key2 Goes into the environment variable * Connection string→`AZURE_STORAGE_CONNECTION_STRING` ``` 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 FastBCP .\FastBCP.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 FastBCP ./FastBCP \ ... --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. Copy a storage account key Azure Portal›Storage Account›Security + networking›Access keys 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 FastBCP .\FastBCP.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 FastBCP ./FastBCP \ ... --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 FastBCP 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. Enable the system-assigned identity Azure Portal›Your resource›Identity 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}" ``` ### 5. SAS URL[​](#5-sas-url "Direct link to 5. SAS URL") Since FastBCP 1.3, you can authenticate to Azure Blob Storage with a Shared Access Signature (SAS) URL, set in the `AZURE_STORAGE_SAS_URL` environment variable. A SAS grants scoped, time-limited access without sharing the account key. **Generate a container SAS URL:** * Azure Portal * Azure CLI 1. Generate a container SAS URL Azure Portal›Storage Account›Containers›Your container›Shared access tokens 1. Navigate to your Storage Account › **Containers** › your container 2. Go to **Shared access tokens** 3. Select the **Create** and **Write** permissions and an expiry date 4. Click **Generate SAS token and URL** and copy the **Blob SAS URL** Goes into the environment variable * Blob SAS URL→`AZURE_STORAGE_SAS_URL` ``` az storage container generate-sas \ --account-name mystorageaccount \ --name mycontainer \ --permissions cw \ --expiry 2026-12-31T23:59Z \ --auth-mode key \ --output tsv # Then build the URL: https://mystorageaccount.blob.core.windows.net/mycontainer? ``` **Set the SAS URL:** * Windows (PowerShell) * Linux/macOS ``` $env:AZURE_STORAGE_SAS_URL="https://mystorageaccount.blob.core.windows.net/mycontainer?sv=...&sig=..." # Run FastBCP .\FastBCP.exe ` ... --directory "abs://mystorageaccount.blob.core.windows.net/mycontainer/exports" ` --fileoutput "data.parquet" ` ... ``` ``` export AZURE_STORAGE_SAS_URL="https://mystorageaccount.blob.core.windows.net/mycontainer?sv=...&sig=..." # Run FastBCP ./FastBCP \ ... --directory "abs://mystorageaccount.blob.core.windows.net/mycontainer/exports" \ --fileoutput "data.parquet" \ ... ``` tip Quote the SAS URL: it contains `&` characters that the shell would otherwise interpret. ## 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 ``` .\FastBCP.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" ``` ``` ./FastBCP \ --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 ``` .\FastBCP.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 ``` ``` ./FastBCP \ --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 ``` .\FastBCP.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" ``` ``` ./FastBCP \ --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 ``` .\FastBCP.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 ``` ``` ./FastBCP \ --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") | Role | Access | | | --------------------------------- | ------------------------------------ | ----------- | | **Storage Blob Data Contributor** | Full read/write access to blobs | Recommended | | **Storage Blob Data Owner** | Full access including ACL management | Alternative | | **Storage Blob Data Reader** | Read-only access (for verification) | Alternative | ### Container Access[​](#container-access "Direct link to Container Access") FastBCP creates the target container if it does not exist. When the container already exists, a missing permission to create it (HTTP 403 or 409 on the create call) is tolerated, so an identity or SAS that can only write blobs into an existing container is enough. ### Troubleshooting 403 Errors[​](#troubleshooting-403-errors "Direct link to Troubleshooting 403 Errors") A `403 Forbidden` from Azure Storage usually comes from one of the following. FastBCP logs the authentication method it used, which helps tell these cases apart. Firewall Error: `403 Forbidden` How to fix **Cause:** the storage account's network rules do not allow the IP address or virtual network FastBCP runs from. RBAC Error: `403 Forbidden` How to fix **Cause:** the identity used by `DefaultAzureCredential` has no data-plane role (such as **Storage Blob Data Contributor**) on the account or container. Management roles such as *Owner* or *Contributor* are not enough. Role assignments can take a few minutes to apply. SAS permissions Error: `403 Forbidden` How to fix **Cause:** the SAS token is expired, is scoped to another container, or lacks the **Create** / **Write** permissions. ### Assign Role via Azure Portal[​](#assign-role-via-azure-portal "Direct link to Assign Role via Azure Portal") 1. Add a role assignment Azure Portal›Storage Account›Access Control (IAM) 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 FastBCP. ## Authentication Methods[​](#authentication-methods "Direct link to Authentication Methods") FastBCP supports multiple Google Cloud authentication methods: 1\. gcloud CLIRecommended The simplest method for local development and testing * Recommended forLocal development * Configured with`gcloud auth application-default login` 2\. Service Account Key File Production environments, CI/CD pipelines, and automated workflows * Recommended forProduction * Configured withA JSON key file, set in `GOOGLE_APPLICATION_CREDENTIALS` 3\. Default Application Credentials Compute Engine, GKE, Cloud Run, Cloud Functions, App Engine * Recommended forGCP infrastructure * Configured withThe default service account, no credentials configuration needed ### 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 ``` FastBCP will automatically use the gcloud CLI's authentication credentials. **Using with FastBCP:** ``` # No additional configuration needed - just run FastBCP ./FastBCP \ ... --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. Create the service account [Google Cloud Console›IAM & Admin›Service Accounts](https://console.cloud.google.com/iam-admin/serviceaccounts) 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., "fastbcp-export") 4. Click **Create and Continue** 5. Grant **Storage Object Admin** role 6. Click **Continue** › **Done** 2. Create a JSON key Google Cloud Console›Service Accounts›Your service account›Keys 1. Click on the service account 2. Go to **Keys** tab 3. Click **Add Key** › **Create new key** 4. Select **JSON** format 5. Click **Create** (JSON file will download) Goes into the environment variable * Path to the downloaded JSON key file→`GOOGLE_APPLICATION_CREDENTIALS` ``` # Create service account gcloud iam service-accounts create fastbcp-export \ --display-name="FastBCP Export Service Account" # Grant Storage Object Admin role gcloud projects add-iam-policy-binding my-project-id \ --member="serviceAccount:fastbcp-export@my-project-id.iam.gserviceaccount.com" \ --role="roles/storage.objectAdmin" # Create and download key file gcloud iam service-accounts keys create ~/fastbcp-key.json \ --iam-account=fastbcp-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\fastbcp-key.json" # Run FastBCP .\FastBCP.exe ` ... --directory "gs://my-bucket/exports" ` --fileoutput "data.parquet" ` ... ``` ``` # Set path to service account key file export GOOGLE_APPLICATION_CREDENTIALS="/path/to/fastbcp-key.json" # Run FastBCP ./FastBCP \ ... --directory "gs://my-bucket/exports" \ --fileoutput "data.parquet" \ ... ``` ### 3. Default Application Credentials[​](#3-default-application-credentials "Direct link to 3. Default Application Credentials") When FastBCP 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 ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Orders" ` --directory "gs://my-bucket/exports/orders" ` --fileoutput "orders.parquet" ``` ``` ./FastBCP \ --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 ``` .\FastBCP.exe ` --connectiontype "pgsql" ` --server "localhost" ` --port "5432" ` --database "analytics" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "events" ` --query "SELECT * FROM events WHERE event_date >= '2024-01-01'" ` --directory "gs://analytics-bucket/events/2024" ` --fileoutput "events.parquet" ` --parallelmethod "Physical" ` --paralleldegree 10 ``` ``` ./FastBCP \ --connectiontype "pgsql" \ --server "localhost" \ --port "5432" \ --database "analytics" \ --user "postgres" \ --password "postgres" \ --sourceschema "public" \ --sourcetable "events" \ --query "SELECT * FROM events WHERE event_date >= '2024-01-01'" \ --directory "gs://analytics-bucket/events/2024" \ --fileoutput "events.parquet" \ --parallelmethod "Physical" \ --paralleldegree 10 ``` ### Export with Date Partitioning[​](#export-with-date-partitioning "Direct link to Export with Date Partitioning") * Windows * Linux ``` .\FastBCP.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 ``` ``` ./FastBCP \ --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 the Physical parallel method[​](#export-from-oracle-to-gcs-using-the-physical-parallel-method "Direct link to Export from Oracle to GCS using the Physical parallel method") * Windows * Linux ``` .\FastBCP.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 "Physical" ` --paralleldegree 8 ``` ``` ./FastBCP \ --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 "Physical" \ --paralleldegree 8 \ --merge "False" ``` ## Bucket Configuration[​](#bucket-configuration "Direct link to Bucket Configuration") ### Create Bucket[​](#create-bucket "Direct link to Create Bucket") * Google Cloud Console * gcloud CLI 1. Create the bucket [Google Cloud Console›Cloud Storage›Buckets](https://console.cloud.google.com/storage/browser) 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:** | Role | ID | Access | | -------------------------- | ----------------------------- | ------------------- | | **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. Grant access on the bucket [Google Cloud Console›Cloud Storage›Buckets›Your bucket›Permissions](https://console.cloud.google.com/storage/browser) 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:fastbcp-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 FastBCP instead of bucket storage admin: | Permission | Purpose | | ------------------------ | ------------------------------- | | `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 FastBCP connects to OneLake with an Entra application (service principal): set it up once in Entra and Fabric, then set its credentials as environment variables before running FastBCP. ## Authentication Setup[​](#authentication-setup "Direct link to Authentication Setup") 1. Create an application account in your tenant Entra Create an application account in your tenant. Goes into the environment variable * Application (Entra) ID→`AZURE_CLIENT_ID` 2. Create a secret for this application Entra Create a secret for the application created in step 1. Goes into the environment variable * Client secret→`AZURE_CLIENT_SECRET` 3. Grant the application on Power BI Service Entra›API Permission Grant the application on **PowerBI Service** in **API Permission**. 4. Give the service principal the Admin role Fabric›Your workspace Give the service principal created in step 1 the **Admin** role in your workspace. ## Set the Environment Variables and Export[​](#set-the-environment-variables-and-export "Direct link to Set the Environment Variables and Export") In your shell, set the environment variables, then run FastBCP with an `onelake://` directory: * Windows * Linux ``` $env:AZURE_TENANT_ID="YOUR_TENANT_ID" $env:AZURE_CLIENT_ID="APPLICATION_ENTRA_ID" $env:AZURE_CLIENT_SECRET="Your_AZCLient_Secret" .\FastBCP.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 "onelake://myworkspace/mylakehouse/{sourcedatabase}/{sourceschema}/{sourcetable}/year=2024/" ` --fileoutput "orders_2024.parquet" ` --parallelmethod "Physical" ` --paralleldegree 8 ``` ``` export AZURE_TENANT_ID="YOUR_TENANT_ID" export AZURE_CLIENT_ID="APPLICATION_ENTRA_ID" export AZURE_CLIENT_SECRET="Your_AZCLient_Secret" ./FastBCP ` --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 "onelake://myworkspace/mylakehouse/{sourcedatabase}/{sourceschema}/{sourcetable}/year=2024/" \ --fileoutput "orders_2024.parquet" \ --parallelmethod "Physical" \ --paralleldegree 8 ``` --- # Cloud Connectivity Overview FastBCP 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") [![](/img/logos/aws-s3.png)AWS S3`s3://`](/latest/documentation/cloud-connectivity/aws-s3.md) Authentication * Credentials file * Environment variables * IAM roles [![](/img/logos/azure-blob.svg)Azure Blob Storage`abs://`](/latest/documentation/cloud-connectivity/azure.md) Authentication * Azure CLI * Connection string * Access keys * Managed Identity [![](/img/logos/azure-blob.svg)Azure Data Lake Gen2`abfss://`](/latest/documentation/cloud-connectivity/azure.md) Authentication * Azure CLI * Connection string * Access keys * Managed Identity [![](/img/logos/gcs.png)Google Cloud Storage`gs://`](/latest/documentation/cloud-connectivity/google-cloud.md) Authentication * gcloud CLI * Service account * Default credentials [![](/img/logos/onelake.png)OneLake`onelake://`](/latest/documentation/cloud-connectivity/onelake.md) Authentication * Azure CLI * Connection string * Access keys * Managed Identity S3-Compatible Storage`s3://` Authentication * Credentials file * Environment variables ## Key Features[​](#key-features "Direct link to Key Features") * Direct UploadExport data directly to cloud storage without local disk space requirements. * Multiple Authentication MethodsCLI profiles, credentials files, environment variables, and cloud-native identity solutions. * Profile ManagementThe `--cloudprofile` parameter switches between different cloud accounts and environments (development, staging, production). * Automatic RetryBuilt-in retry logic for network failures and transient cloud service errors. ### Direct Upload[​](#direct-upload "Direct link to Direct Upload") Good to know FastBCP uses multi-part uploads for all cloud providers. Warning Since FastBCP 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") Authentication is resolved through a fallback chain, in the following order: 1. 1`--cloudprofile`Used first, if provided. 2. 2Environment variablesStandard authentication environment variables are used as the first fallback. 3. 3Managed IdentityUsed as the second fallback. 4. 4IAM role / profileUsed as the final fallback. ## 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: * [![](/img/logos/aws-s3.png)AWS S3 Setup](/latest/documentation/cloud-connectivity/aws-s3.md) * [![](/img/logos/azure-blob.svg)Azure Setup](/latest/documentation/cloud-connectivity/azure.md) * [![](/img/logos/gcs.png)Google Cloud Storage Setup](/latest/documentation/cloud-connectivity/google-cloud.md) * [![](/img/logos/onelake.png)OneLake Setup](/latest/documentation/cloud-connectivity/onelake.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 * Azure Blob * Azure Data Lake Gen2 * Google Cloud Storage * OneLake ``` # AWS S3 & S3-Compatible ./FastBCP / ... --directory "s3://my-bucket/exports" / --fileoutput "data.parquet" / ... ``` ``` # Azure Blob ./FastBCP \ ... --directory "abs://account.blob.core.windows.net/container/exports/" \ --fileoutput "data.parquet" \ ... ``` ``` # Azure Datalake Gen 2 ./FastBCP \ ... --directory "abs://account.dfs.core.windows.net/container/exports/" \ --fileoutput "data.parquet" \ ... ``` ``` # Google Cloud Storage ./FastBCP \ ... --directory "gs://my-bucket/exports" \ --fileoutput "data.parquet" \ ... ``` ``` # OneLake ./FastBCP \ ... --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: ``` ./FastBCP \ ... --directory "s3://prod-bucket/exports" \ --cloudprofile "production" \ ... ./FastBCP \ ... --directory "s3://dev-bucket/exports" \ --cloudprofile "development" ... ``` --- # Operating Systems FastBCP supports Windows and Linux 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 | | ------------------------ | -------------------------- | ------------- | --------- | | Amazon Linux | 2023 (Kernel 6.1) | Arm64, x64 | 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 FastBCP supports a wide range of database systems across different platforms. ## Supported Databases & Platforms[​](#supported-databases--platforms "Direct link to Supported Databases & Platforms") | Database | Windows AMD64 | Linux AMD64 | Linux ARM64 | | ---------------------------------------- | ------------- | ------------- | ------------- | | **SQL Server** | Supported | Supported | Supported | | **SQL Server (ADBC)** | Supported | Supported | Not supported | | **SQL Server backup files (.bak, ADBC)** | Supported | Supported | Not supported | | **PostgreSQL** | Supported | Supported | Supported | | **PostgreSQL (ADBC)** | Supported | Supported | Not supported | | **MySQL** | Supported | Supported | Supported | | **Oracle** | Supported | Supported | Supported | | **Oracle (ADBC)** | Supported | Supported | Not supported | | **Oracle RMAN backup sets (ADBC)** | Supported | Supported | Not supported | | **ClickHouse** | Supported | Supported | Supported | | **DuckDB** | Supported | Supported | Supported | | **Teradata** | Supported | Supported | Not supported | | **Teradata (ADBC)** | Supported | Supported | Not supported | | **Db2 (ADBC)** | Supported | Supported | Not supported | | **Netezza** | Supported | Supported | Not supported | | **Netezza (ADBC)** | Supported | Supported | Not supported | | **SAP HANA** | Supported | Supported | Not supported | | **ODBC** | Supported | Supported | Supported | | **OLEDB** | Supported | Not supported | Not supported | Good to know The ADBC FastDriver connectors (**SQL Server (ADBC)**, **SQL Server backup files**, **PostgreSQL (ADBC)**, **Oracle (ADBC)**, **Oracle RMAN backup sets**, **Netezza (ADBC)**, **Teradata (ADBC)** and **Db2 (ADBC)**) are not supported on **Linux ARM64**. --- # FASTBCP\_ADBC\_BATCHCELLS ## Overview[​](#overview "Direct link to Overview") The `FASTBCP_ADBC_BATCHCELLS` environment variable controls the size of the Arrow record batches fetched by the ADBC connectors (`adbc_mssql`, `adbc_pgsql`), expressed in **cells** (rows × columns) rather than rows alone. Because a batch's memory footprint depends on both its row count and its column count, sizing by cell count keeps memory usage predictable across tables of very different widths: a narrow table fetches more rows per batch, a wide table fewer, for a comparable memory footprint. ## Syntax[​](#syntax "Direct link to Syntax") * Windows * Linux ``` $env:FASTBCP_ADBC_BATCHCELLS = 1000000 ``` ``` export FASTBCP_ADBC_BATCHCELLS=1000000 ``` ## Configuration[​](#configuration "Direct link to Configuration") | Property | Value | | -------------- | ------------------------------------------------------------------- | | **Type** | Integer (> 0) | | **Default** | `500000` (500,000 cells) | | **Applies to** | `adbc_mssql` and `adbc_pgsql` connections (Arpe.io ADBC FastDriver) | | **Since** | FastBCP 1.2 | ## How Batch Size Is Derived[​](#how-batch-size-is-derived "Direct link to How Batch Size Is Derived") For a given table, the effective number of rows per Arrow record batch is computed as: ``` rows per batch = FASTBCP_ADBC_BATCHCELLS / number of columns ``` For example, with the default `500000` cells: | Columns | Rows per batch | | ------- | -------------- | | 10 | 50,000 | | 50 | 10,000 | | 500 | 1,000 | ## When to Change It[​](#when-to-change-it "Direct link to When to Change It") * **Increase** the value to reduce the number of round trips for very wide or very narrow tables when more memory is available, which can improve throughput. * **Decrease** the value to lower peak memory usage in constrained environments (containers, small VMs) or when exporting extremely wide tables. ## Examples[​](#examples "Direct link to Examples") ### Increase batch size for higher throughput[​](#increase-batch-size-for-higher-throughput "Direct link to Increase batch size for higher throughput") * Windows * Linux ``` $env:FASTBCP_ADBC_BATCHCELLS = 2000000 fastbcp -S myserver.database.windows.net ` -d MyDatabase ` -T dbo.MyTable ` -C adbc_mssql ` --fileoutput "output.parquet" ``` ``` export FASTBCP_ADBC_BATCHCELLS=2000000 fastbcp -S myserver.database.windows.net \ -d MyDatabase \ -T dbo.MyTable \ -C adbc_mssql \ --fileoutput "output.parquet" ``` ### Reduce batch size to limit memory usage[​](#reduce-batch-size-to-limit-memory-usage "Direct link to Reduce batch size to limit memory usage") * Windows * Linux ``` $env:FASTBCP_ADBC_BATCHCELLS = 100000 fastbcp -S pg-server:5432 ` -d MyDatabase ` -Q "SELECT * FROM public.orders" ` -C adbc_pgsql ` --fileoutput "orders.parquet" ``` ``` export FASTBCP_ADBC_BATCHCELLS=100000 fastbcp -S pg-server:5432 \ -d MyDatabase \ -Q "SELECT * FROM public.orders" \ -C adbc_pgsql \ --fileoutput "orders.parquet" ``` Platform availability This variable only applies to the ADBC FastDriver connectors (`adbc_mssql`, `adbc_pgsql`), available on **Windows x64** and **Linux x64** only. See [Connection Parameters](/latest/documentation/cli/connection_parameters.md#connection-type) for details. --- # FASTBCP\_BACKUP\_RESTORE\_MODE ## Overview[​](#overview "Direct link to Overview") `--connectiontype backup_mssql` (since FastBCP 1.6.7) and `--connectiontype backup_rman` (since FastBCP 1.6.8) read the latest version of a table among the files you give them. When a backup that could be the newest cannot be used, the export **fails and names it**, rather than reading older data without saying so. The `FASTBCP_BACKUP_RESTORE_MODE` environment variable changes that without touching the command. Set it to `best_effort` to skip that backup and read the newest version that can be used. ## Syntax[​](#syntax "Direct link to Syntax") * Windows * Linux ``` $env:FASTBCP_BACKUP_RESTORE_MODE = "best_effort" ``` ``` export FASTBCP_BACKUP_RESTORE_MODE=best_effort ``` ## Configuration[​](#configuration "Direct link to Configuration") | Property | Value | | -------------- | ------------------------------------------------------------------------------------------------------------------- | | **Values** | `strict` or `best_effort`, in any case. Any other value stops the run at startup with a message naming the variable | | **Default** | Not set: `strict` | | **Applies to** | `--connectiontype backup_mssql` (since 1.6.7), `--connectiontype backup_rman` (since 1.6.8) | | **Since** | FastBCP 1.6.7 | | Value | A backup that could be the newest and cannot be used | | ------------- | ------------------------------------------------------------------------------- | | `strict` | The export fails, naming the backup, and the logs say what can be done about it | | `best_effort` | It is skipped, and the newest usable version is read, however old | With `backup_rman`, this applies to an incremental backup whose level 0, or a level in between, is missing, and to a backup set that lacks a piece or is still being written. The tables of the other datafiles are read either way. ## What FastBCP Logs[​](#what-fastbcp-logs "Direct link to What FastBCP Logs") At the start of each export: ``` Backup version to read : restore point "latest", restore mode "strict" ``` With `strict`, a refusal is followed by a warning with the ways out. With `best_effort`, a warning at the start of each export says that older rows may be read. What `best_effort` skipped The backups skipped are reported on the **standard error output only**, not in the FastBCP logs. A job that captures only the logs sees that this can happen, not that it did: keep the standard error output of the job if you use this mode. Good to know `best_effort` needs another version to read. A SQL Server full backup alone that lost the end of its file fails with this mode too, and the logs then point to [`FASTBCP_BACKUP_RESTORE_POINT=full`](/latest/documentation/environment-variables/fastbcp-backup-restore-point.md). ## With `--sourceconnectstring`[​](#with---sourceconnectstring "Direct link to with---sourceconnectstring") An `adbc.arpemsbackup.restore_mode` option (`backup_mssql`) or `adbc.arpeorabackup.restore_mode` option (`backup_rman`) in [`--sourceconnectstring`](/latest/documentation/cli/connection_parameters.md#source-connection-string) wins over the variable. ## See Also[​](#see-also "Direct link to See Also") * [SQL Server backups that cannot be used](/latest/documentation/cli/connection_parameters.md#backups-that-cannot-be-used) * [Oracle RMAN backups that cannot be used](/latest/documentation/cli/connection_parameters.md#rman-backups-that-cannot-be-used) * [Upgrading to 1.6.7](/latest/documentation/cli/connection_parameters.md#upgrading-to-1-6-7) (`backup_mssql`) * [Upgrading to 1.6.8](/latest/documentation/cli/connection_parameters.md#upgrading-to-1-6-8) (`backup_rman`) --- # FASTBCP\_BACKUP\_RESTORE\_POINT ## Overview[​](#overview "Direct link to Overview") FastBCP reads the **latest version** the backup files hold: * `--connectiontype backup_mssql` (since FastBCP 1.6.7): the newest full backup, and the newest [differential backup](/latest/documentation/cli/connection_parameters.md#differential-backups) taken from it. * `--connectiontype backup_rman` (since FastBCP 1.6.8): for each datafile, the newest full or level 0 backup, and the [incremental backups](/latest/documentation/cli/connection_parameters.md#incremental-rman-backups) taken on it. The `FASTBCP_BACKUP_RESTORE_POINT` environment variable changes that without touching the command. Set it to `full` to ignore the differential or incremental backups and read the full backup. ## Syntax[​](#syntax "Direct link to Syntax") * Windows * Linux ``` $env:FASTBCP_BACKUP_RESTORE_POINT = "full" ``` ``` export FASTBCP_BACKUP_RESTORE_POINT=full ``` ## Configuration[​](#configuration "Direct link to Configuration") | Property | Value | | -------------- | ------------------------------------------------------------------------------------------------------------ | | **Values** | `latest` or `full`, in any case. Any other value stops the run at startup with a message naming the variable | | **Default** | Not set: `latest` | | **Applies to** | `--connectiontype backup_mssql` (since 1.6.7), `--connectiontype backup_rman` (since 1.6.8) | | **Since** | FastBCP 1.6.7 | | Value | `backup_mssql` | `backup_rman` | | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------- | | `latest` | The newest full backup among the files, and the newest differential taken from it | For each datafile, the newest full or level 0 backup, and the incremental backups taken on it | | `full` | The last full backup of one backup, as up to FastBCP 1.6.6. Its later differentials are ignored, and several backups in `--database` are refused | For each datafile, the most recent full or level 0 backup. The incremental backups are ignored | warning With `full`, an export does not read the differential or incremental backups, and so gets older rows, without any message saying so. Use it when that is what you want. ## With `--sourceconnectstring`[​](#with---sourceconnectstring "Direct link to with---sourceconnectstring") An `adbc.arpemsbackup.restore_point` option (`backup_mssql`) or `adbc.arpeorabackup.restore_point` option (`backup_rman`) in [`--sourceconnectstring`](/latest/documentation/cli/connection_parameters.md#source-connection-string) wins over the variable. ## See Also[​](#see-also "Direct link to See Also") * [`FASTBCP_BACKUP_RESTORE_MODE`](/latest/documentation/environment-variables/fastbcp-backup-restore-mode.md), what happens when a backup cannot be used * [Upgrading to 1.6.7](/latest/documentation/cli/connection_parameters.md#upgrading-to-1-6-7) (`backup_mssql`) * [Upgrading to 1.6.8](/latest/documentation/cli/connection_parameters.md#upgrading-to-1-6-8) (`backup_rman`) --- # FASTBCP\_CLOUD\_ISBUFFERED ## Overview[​](#overview "Direct link to Overview") The `FASTBCP_CLOUD_ISBUFFERED` environment variable controls whether FastBCP uses buffered uploads when writing to cloud storage. ## Syntax[​](#syntax "Direct link to Syntax") * Windows * Linux ``` $env:FASTBCP_CLOUD_ISBUFFERED = "True" # or "False" ``` ``` export FASTBCP_CLOUD_ISBUFFERED=True # or False ``` ## Configuration[​](#configuration "Direct link to Configuration") | Property | Value | | -------------- | --------------------------------------------------------------------- | | **Type** | Boolean (`True` / `False`) | | **Default** | `False` | | **Applies to** | Azure Data Lake Storage (ADLS), OneLake, AWS S3, Google Cloud Storage | | **Since** | FastBCP 1.0 | ## Behavior[​](#behavior "Direct link to Behavior") FalseDefault FastBCP uses the cloud SDK's OpenWriteAsync streaming upload * UploadData is written directly to the cloud storage in chunks. Each chunk blocks the writer until acknowledged * Performance**Simpler** but can be **slower** for Azure storage TrueRecommended for Azure FastBCP uses buffered uploads * UploadData is first written to a local temporary file (see [`FASTBCP_TMPPATH`](/latest/documentation/environment-variables/fastbcp-tmppath.md)). When the stream is closed, the file is uploaded in parallel blocks (azcopy-like pattern) * Performance**Significantly faster** for Azure Data Lake Storage and OneLake * Disk spaceRequires temporary disk space --- # FASTBCP\_CLOUD\_MAXUPLOADTHREAD\_PER\_STREAM ## Overview[​](#overview "Direct link to Overview") The `FASTBCP_CLOUD_MAXUPLOADTHREAD_PER_STREAM` environment variable controls the maximum number of parallel threads used to upload each file to cloud storage during buffered uploads. ## Syntax[​](#syntax "Direct link to Syntax") * Windows * Linux ``` $env:FASTBCP_CLOUD_MAXUPLOADTHREAD_PER_STREAM = 16 ``` ``` export FASTBCP_CLOUD_MAXUPLOADTHREAD_PER_STREAM=16 ``` ## Configuration[​](#configuration "Direct link to Configuration") | Property | Value | | -------------- | ----------------------------------------------------------------------------------------------------------------------------- | | **Type** | Integer (> 0) | | **Default** | `8` when `parallelmethod=None`, `2` otherwise | | **Applies to** | Cloud uploads when [`FASTBCP_CLOUD_ISBUFFERED=True`](/latest/documentation/environment-variables/fastbcp-cloud-isbuffered.md) | | **Since** | FastBCP 1.0 | ## Behavior[​](#behavior "Direct link to Behavior") ### Default Values[​](#default-values "Direct link to Default Values") FastBCP automatically adjusts the default based on the parallel extraction method: | Parallel Method | Default Threads | Reason | | --------------------------- | --------------- | ---------------------------------------------------------------------------------------------- | | `None` (single stream) | `8` | FastBCP itself is not parallelized, so more bandwidth can be allocated to upload | | `Ntile`, `DataDriven`, etc. | `2` | FastBCP is already extracting in parallel, so limit upload threads to avoid saturating network | ### How It Works[​](#how-it-works "Direct link to How It Works") When [`FASTBCP_CLOUD_ISBUFFERED=True`](/latest/documentation/environment-variables/fastbcp-cloud-isbuffered.md): 1. Data is written to a local temporary file 2. On stream close, the file is uploaded in parallel blocks 3. `FASTBCP_CLOUD_MAXUPLOADTHREAD_PER_STREAM` controls how many threads upload blocks concurrently 4. Maps to `StorageTransferOptions.MaximumConcurrency` in Azure SDK --- # FASTBCP\_DATEFORMAT ## Overview[​](#overview "Direct link to Overview") The `FASTBCP_DATEFORMAT` environment variable lets you specify a custom format string for converting date values to strings in the output. When not set, FastBCP uses the default `yyyy-MM-dd HH:mm:sszzz`. The format string follows [.NET standard and custom date/time format patterns](https://learn.microsoft.com/en-us/dotnet/standard/base-types/custom-date-and-time-format-strings). ## Syntax[​](#syntax "Direct link to Syntax") * Windows * Linux ``` $env:FASTBCP_DATEFORMAT = "yyyyMMdd" ``` ``` export FASTBCP_DATEFORMAT=yyyyMMdd ``` ## Configuration[​](#configuration "Direct link to Configuration") | Property | Value | | -------------- | --------------------------------------------------------------------------- | | **Type** | Format string | | **Default** | `yyyy-MM-dd HH:mm:sszzz` | | **Applies to** | All output formats that serialize date columns as strings (CSV, JSON, etc.) | | **Since** | FastBCP 1.0 | Auto-adaptive formatting The date format is auto-adaptive based on the column type: * **Date-only** columns will always output as `yyyy-MM-dd` regardless of the format string * **Timestamp/DateTime** columns will output as `yyyy-MM-dd HH:mm:ss` even if a timezone token (`zzz`) is present in the format string * **DateTimeOffset** columns will include the timezone offset as specified ## Format Examples[​](#format-examples "Direct link to Format Examples") | Format string | Example output | | ---------------------------------- | --------------------------- | | `yyyy-MM-dd HH:mm:sszzz` (default) | `2026-06-28 14:30:22+02:00` | | `yyyy-MM-dd` | `2026-06-28` | | `yyyyMMdd` | `20260628` | | `dd/MM/yyyy` | `28/06/2026` | | `MM-dd-yyyy` | `06-28-2026` | | `yyyy/MM/dd` | `2026/06/28` | | `yyyy-MM-dd HH:mm:ss` | `2026-06-28 14:30:22` | ## Examples[​](#examples "Direct link to Examples") ### Compact date format — no separators[​](#compact-date-format--no-separators "Direct link to Compact date format — no separators") * Windows * Linux ``` $env:FASTBCP_DATEFORMAT = "yyyyMMdd" fastbcp -S myserver.database.windows.net ` -d MyDatabase ` -T dbo.MyTable ` --fileoutput "output.csv" ``` ``` export FASTBCP_DATEFORMAT=yyyyMMdd fastbcp -S myserver.database.windows.net \ -d MyDatabase \ -T dbo.MyTable \ --fileoutput "output.csv" ``` Output column value: `20260628` ### Restore default ISO 8601 format[​](#restore-default-iso-8601-format "Direct link to Restore default ISO 8601 format") * Windows * Linux ``` Remove-Item Env:FASTBCP_DATEFORMAT ``` ``` unset FASTBCP_DATEFORMAT ``` --- # FASTBCP\_DBPARTITION\_TARGET\_MODE ## Overview[​](#overview "Direct link to Overview") The `FASTBCP_DBPARTITION_TARGET_MODE` environment variable controls how the files produced by the [`DBPartition`](/latest/documentation/cli/parallel_parameters.md#available-methods) parallel method are named and laid out. `DBPartition` runs one extraction per native partition / subpartition of the source table. Each extraction writes its own file, either as a numbered chunk (`CHUNK`) or in a Hive-style directory named after the partition (`HIVE`). ## Syntax[​](#syntax "Direct link to Syntax") * Windows * Linux ``` $env:FASTBCP_DBPARTITION_TARGET_MODE = "HIVE" ``` ``` export FASTBCP_DBPARTITION_TARGET_MODE=HIVE ``` ## Configuration[​](#configuration "Direct link to Configuration") | Property | Value | | -------------- | ------------------------------ | | **Type** | `CHUNK` / `HIVE` | | **Default** | `CHUNK` | | **Applies to** | `--parallelmethod DBPartition` | | **Since** | FastBCP 1.3 | ## Modes[​](#modes "Direct link to Modes") ### CHUNK (default)[​](#chunk-default "Direct link to CHUNK (default)") Each partition is written as a numbered chunk next to the target file: ``` _chunk_NNN. ``` For example, with `--fileoutput "orders.parquet"`: ``` orders_chunk_001.parquet orders_chunk_002.parquet orders_chunk_003.parquet ``` ### HIVE[​](#hive "Direct link to HIVE") Each partition is written into a Hive-style directory named after the partition, and the subpartition when there is one: ``` partition=

/[subpartition=/]. ``` Some sources use their own directory naming: | Source | Directory layout | | ------------------------- | ------------------------------------------------ | | SQL Server | `bounds=_/.` | | Teradata | `L1=/[L2=/].` | | PostgreSQL, Oracle, MySQL | `partition=

/[subpartition=/].` | For example, an Oracle table partitioned by month, with `--fileoutput "orders.parquet"`: ``` partition=ORDERS_2024_01/orders.parquet partition=ORDERS_2024_02/orders.parquet partition=ORDERS_2024_03/orders.parquet ``` tip The `HIVE` layout can be read directly as a partitioned dataset by engines such as Spark, DuckDB, Trino or Athena. `--merge` works in both modes. ## Example[​](#example "Direct link to Example") * Windows * Linux ``` $env:FASTBCP_DBPARTITION_TARGET_MODE = "HIVE" .\FastBCP.exe ` --connectiontype oraodp ` --server "dbserver:1521/ORCLPDB" ` --user "FastUser" ` --password "FastPassword" ` --sourceschema "SALES" ` --sourcetable "ORDERS" ` --directory "D:\export\orders" ` --fileoutput "orders.parquet" ` --parallelmethod DBPartition ` --paralleldegree 8 ` --merge false ``` ``` export FASTBCP_DBPARTITION_TARGET_MODE=HIVE ./FastBCP \ --connectiontype oraodp \ --server "dbserver:1521/ORCLPDB" \ --user "FastUser" \ --password "FastPassword" \ --sourceschema "SALES" \ --sourcetable "ORDERS" \ --directory "/data/export/orders" \ --fileoutput "orders.parquet" \ --parallelmethod DBPartition \ --paralleldegree 8 \ --merge false ``` --- # FASTBCP\_INDEX\_DIR ## Overview[​](#overview "Direct link to Overview") The first export from a backup reads its structure, which can take minutes on a large compressed backup. FastBCP keeps the result in a small index file, so that the next exports from the same backup open in milliseconds (see [Backups opened again in milliseconds](/latest/release-notes/release-notes-1.6.md#backups-opened-again-in-milliseconds)). The `FASTBCP_INDEX_DIR` environment variable names the directory of these files. Set it when the account running FastBCP has no usable home directory, as a service account may have, or to keep the indexes on another disk. ## Syntax[​](#syntax "Direct link to Syntax") * Windows * Linux ``` $env:FASTBCP_INDEX_DIR = "D:\FastBCP\index" ``` ``` export FASTBCP_INDEX_DIR=/var/cache/fastbcp/index ``` ## Configuration[​](#configuration "Direct link to Configuration") | Property | Value | | -------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | **Type** | Fully qualified directory path. It does not need to exist: FastBCP creates it | | **Default** | Not set: the local application data of the user, `%LOCALAPPDATA%\ArpeMSBackup\index` and `%LOCALAPPDATA%\ArpeOraBackup\index` on Windows, `$XDG_CACHE_HOME/arpemsbackup/index` and `arpeorabackup/index` or `~/.cache/...` on Linux | | **Applies to** | `--connectiontype backup_mssql` and `backup_rman` | | **Since** | FastBCP 1.6.6 | warning On Windows, the path must name its drive and start from its root. `C:index` and `\index` depend on the current directory, and stop the run at startup with a message naming the variable. Use `C:\index`, or a UNC path such as `\\server\share\index`. ## When the Index Cannot Be Saved[​](#when-the-index-cannot-be-saved "Direct link to When the Index Cannot Be Saved") Before reading a backup, FastBCP checks that the directory can be written. If it cannot, the export still runs and FastBCP logs a warning, because every run would otherwise read the structure of the backup again, without saying so: ``` Backup index not saved: cannot write to /var/cache/fastbcp/index (...). Every run will index this backup again (minutes on a large compressed backup). To keep its index, set the FASTBCP_INDEX_DIR environment variable to a writable directory. ``` There is no warning when no index is written: with `adbc.arpemsbackup.index=off` or `readonly` in `--sourceconnectstring` (`adbc.arpeorabackup.index` for `backup_rman`). ## With `--sourceconnectstring`[​](#with---sourceconnectstring "Direct link to with---sourceconnectstring") An `adbc.arpemsbackup.index_dir` or `adbc.arpeorabackup.index_dir` option in [`--sourceconnectstring`](/latest/documentation/cli/connection_parameters.md#source-connection-string) wins over the variable. If that directory cannot be written, the warning tells you to change or remove the option, as the variable would change nothing. ## Encrypted Backups[​](#encrypted-backups "Direct link to Encrypted Backups") The index of an [encrypted backup](/latest/documentation/cli/connection_parameters.md#encrypted-backups) holds neither a key nor a password, and does not open the backup: the private key of the certificate is needed at every export. --- # FASTBCP\_PERFORMANCE\_COLLECT ## Overview[​](#overview "Direct link to Overview") The `FASTBCP_PERFORMANCE_COLLECT` environment variable controls whether FastBCP collects performance information about the machine (CPU usage, memory usage, etc.) during the run. ## Syntax[​](#syntax "Direct link to Syntax") * Windows * Linux ``` $env:FASTBCP_PERFORMANCE_COLLECT = $True ``` ``` export FASTBCP_PERFORMANCE_COLLECT=True ``` ## Configuration[​](#configuration "Direct link to Configuration") | Property | Value | | ----------- | -------------------------- | | **Type** | Boolean (`True` / `False`) | | **Default** | `False` (disabled) | | **Since** | FastBCP 1.2 | ## Behavior[​](#behavior "Direct link to Behavior") FalseDefault * CollectionNo performance information is collected during the run. True * CollectionFastBCP collects performance information of the machine (CPU, memory usage, etc.) while the run is in progress. tip Use together with [`FASTBCP_SYSTEMINFO_COLLECT`](/latest/documentation/environment-variables/fastbcp-systeminfo-collect.md) to also capture system information during the run. --- # FASTBCP\_RGSIZE ## Overview[​](#overview "Direct link to Overview") The `FASTBCP_RGSIZE` environment variable controls the row group size for Parquet file exports. Row groups are the primary unit for organizing data within a Parquet file and significantly impact query performance and compression efficiency. ## Syntax[​](#syntax "Direct link to Syntax") * Windows * Linux ``` $env:FASTBCP_RGSIZE = 500000 ``` ``` export FASTBCP_RGSIZE=500000 ``` ## Configuration[​](#configuration "Direct link to Configuration") | Property | Value | | -------------- | ------------------------------ | | **Type** | Integer (> 0) | | **Default** | `max(2^18/sqrt(degree),64000)` | | **Applies to** | Parquet file exports | | **Since** | FastBCP 0.30 | ## What is a Row Group?[​](#what-is-a-row-group "Direct link to What is a Row Group?") A **row group** is a horizontal partition of data in a Parquet file: * Parquet files are divided into one or more row groups * Each row group contains a subset of rows * Column data within a row group is compressed together * Query engines can skip entire row groups based on metadata ``` Parquet File Structure: ├── Row Group 1 (1M rows) │ ├── Column A (compressed) │ ├── Column B (compressed) │ └── Column C (compressed) ├── Row Group 2 (1M rows) │ ├── Column A (compressed) │ ├── Column B (compressed) │ └── Column C (compressed) └── Footer (metadata) ``` --- # FASTBCP\_SYSTEMINFO\_COLLECT ## Overview[​](#overview "Direct link to Overview") The `FASTBCP_SYSTEMINFO_COLLECT` environment variable controls whether FastBCP collects information about the machine it runs on (CPU, memory, OS, etc.) during the run. ## Syntax[​](#syntax "Direct link to Syntax") * Windows * Linux ``` $env:FASTBCP_SYSTEMINFO_COLLECT = $True ``` ``` export FASTBCP_SYSTEMINFO_COLLECT=True ``` ## Configuration[​](#configuration "Direct link to Configuration") | Property | Value | | ----------- | -------------------------- | | **Type** | Boolean (`True` / `False`) | | **Default** | `False` (disabled) | | **Since** | FastBCP 1.2 | ## Behavior[​](#behavior "Direct link to Behavior") FalseDefault * CollectionNo system information is collected during the run. True * CollectionFastBCP collects system information about the machine (CPU, memory, OS, etc.) while the run is in progress. tip Use together with [`FASTBCP_PERFORMANCE_COLLECT`](/latest/documentation/environment-variables/fastbcp-performance-collect.md) to also capture performance metrics during the run. --- # FASTBCP\_TMPPATH ## Overview[​](#overview "Direct link to Overview") The `FASTBCP_TMPPATH` environment variable specifies the base directory where FastBCP creates temporary files during buffered cloud uploads. ## Syntax[​](#syntax "Direct link to Syntax") * Windows * Linux ``` $env:FASTBCP_TMPPATH = "D:\temp\fastbcp" ``` ``` export FASTBCP_TMPPATH=/tmp/fastbcp ``` ## Configuration[​](#configuration "Direct link to Configuration") | Property | Value | | -------------- | ----------------------------------------------------------------------------------------------------------------------------- | | **Type** | Directory path (absolute or relative) | | **Default** | System temp directory (`%TEMP%` on Windows, `$TMPDIR` on Linux/macOS) | | **Applies to** | Cloud uploads when [`FASTBCP_CLOUD_ISBUFFERED=True`](/latest/documentation/environment-variables/fastbcp-cloud-isbuffered.md) | | **Since** | FastBCP 1.0 | ## Behavior[​](#behavior "Direct link to Behavior") ### Default Behavior (Not Set)[​](#default-behavior-not-set "Direct link to Default Behavior (Not Set)") FastBCP uses the system's default temporary directory: * **Windows**: `%TEMP%` (typically `C:\Users\\AppData\Local\Temp`) * **Linux/macOS**: `$TMPDIR` (typically `/tmp`) ### Custom Path[​](#custom-path "Direct link to Custom Path") When set, FastBCP creates a unique subdirectory per process: ``` /fastbcp_/ ``` **Example:** ``` D:\temp\fastbcp\fastbcp_a1b2c3d4-e5f6-7890-abcd-ef1234567890\ ``` ### Automatic Cleanup[​](#automatic-cleanup "Direct link to Automatic Cleanup") * Subdirectories are created automatically * Temporary files are deleted after successful upload * In case of errors, files may remain and need manual cleanup --- # FASTBCP\_TTU\_PATH ## Overview[​](#overview "Direct link to Overview") The `FASTBCP_TTU_PATH` environment variable tells FastBCP where to find the customer's **Teradata Tools and Utilities (TTU)** for the [`adbc_teradata`](/latest/documentation/cli/connection_parameters.md#adbc_teradata) connection type. The embedded ArpeTeradata driver needs TTU (CLIv2, `libcliv2.so`) only for the **legacy-port logon**: `sslmode=disable`, or the fallback of the default `sslmode=prefer` when the server has no TLS. The default TLS logon on the HTTPS port never uses TTU. Linux only The lookup only runs on Linux. On Windows, FastBCP passes nothing and the driver finds `wincli32.dll` itself (`ARPETERADATA_TTU_PATH`, its own directory, the registered TTU installation). ## Syntax[​](#syntax "Direct link to Syntax") ``` export FASTBCP_TTU_PATH=/opt/teradata/client/20.00 ``` ## Configuration[​](#configuration "Direct link to Configuration") | Property | Value | | -------------- | ----------------------------------------- | | **Type** | Directory path | | **Default** | Not set | | **Applies to** | `--connectiontype adbc_teradata` on Linux | | **Since** | FastBCP 1.4 | ## Search Order[​](#search-order "Direct link to Search Order") FastBCP looks for TTU in this order and uses the first match: 1. 1`FASTBCP_TTU_PATH`The environment variable. If the directory does not exist or holds no `libcliv2.so`, FastBCP logs a warning and goes on. 2. 2`ttu`A `ttu` directory next to the FastBCP binary. 3. 3`TeradataToolsAndUtilitiesBase`A `TeradataToolsAndUtilitiesBase` directory next to the FastBCP binary (the folder of Teradata's Linux download). 4. 4Nothing foundNo TTU path is passed, and the driver searches itself (`ARPETERADATA_TTU_PATH`, `/opt/teradata/client`, the system library path). The library directory found is passed to the driver as `adbc.arpeteradata.ttu_path` and logged: ``` TTU (adbc_teradata legacy-port logon): /opt/teradata/client/20.00/lib64 (from FASTBCP_TTU_PATH) ``` ## Accepted Layouts[​](#accepted-layouts "Direct link to Accepted Layouts") Give a **full TTU client directory**, not only `libcliv2.so`. Each location can hold: * the client directory itself, e.g. `/opt/teradata/client/20.00` (with its `lib64` directory); * the library directory itself, e.g. `/opt/teradata/client/20.00/lib64`; * a directory above the client directory laid out as `/`, `client//`, `teradata/client//` or `opt/teradata/client//` (the last one is what unpacking the TTU RPMs gives). When several versions are found, the newest wins. Keep the version folder name CLIv2 reaches its own files through `lib64/tdclientdir` (which holds `../..`) and appends its version, so the client directory must keep its version name (for example `20.00`). A copy of an installed TTU next to the binary must be `ttu/20.00`, not `ttu/` alone. ## Using Teradata's TTU Download Without Installing It[​](#using-teradatas-ttu-download-without-installing-it "Direct link to Using Teradata's TTU Download Without Installing It") Teradata's Linux download is a set of RPMs. To use it without installing it, run these commands next to the FastBCP binary. They unpack CLIv2 and its ICU libraries into `TeradataToolsAndUtilitiesBase/opt/teradata/client/20.00` and add the two things the TTU installer would add: `lib64/tdclientdir` and the ICU links. Adapt the file name to your TTU version. ``` tar xzf TeradataToolsAndUtilitiesBase__linux_x8664.20.00.39.00-1.tar.gz cd TeradataToolsAndUtilitiesBase for r in Linux/x8664/cliv2*.rpm Linux/x8664/tdicu*.rpm; do rpm2cpio "$r" | cpio -idm; done cd opt/teradata/client/20.00/lib64 printf '../..' > tdclientdir for f in libicu*td.so.*.*; do ln -sf "$f" "${f%.*}"; ln -sf "$f" "${f%.so.*}.so"; done ``` FastBCP finds this `TeradataToolsAndUtilitiesBase` folder by itself; `FASTBCP_TTU_PATH` is not needed. FastBCP warns at startup when the TTU folder it found lacks `tdclientdir` or the ICU links (`libicu*td.so.65` and `libicu*td.so`), or when the client directory is not named after its version. CLIv2 would otherwise fail at logon with `DBCHINI failed`. ## Example[​](#example "Direct link to Example") ``` export FASTBCP_TTU_PATH=/opt/teradata/client/20.00 ./FastBCP \ --connectiontype adbc_teradata \ --sourceconnectstring "Server=td-host;Port=1025;User Id=FastUser;Password=FastPassword;SSL Mode=disable" \ --sourceschema "TPCH" \ --sourcetable "ORDERS" \ --directory "/data/export/orders" \ --fileoutput "orders.parquet" \ --parallelmethod Ntile \ --distributekeycolumn "o_orderkey" \ --paralleldegree 8 ``` --- # FASTBCP\_UID\_STRING\_CASING ## Overview[​](#overview "Direct link to Overview") The `FASTBCP_UID_STRING_CASING` environment variable controls whether UID (UUID) values are converted to lowercase or uppercase strings in the output. The default is lowercase, which follows [RFC 4122](https://www.rfc-editor.org/rfc/rfc4122) standard formatting (e.g. `550e8400-e29b-41d4-a716-446655440000`). SQL Server backups With `--connectiontype backup_mssql`, the variable applies since FastBCP 1.6.5. Earlier versions always write lowercase from a backup. ## Syntax[​](#syntax "Direct link to Syntax") * Windows * Linux ``` $env:FASTBCP_UID_STRING_CASING = "upper" ``` ``` export FASTBCP_UID_STRING_CASING=upper ``` ## Configuration[​](#configuration "Direct link to Configuration") | Property | Value | | -------------- | -------------------------------------------------------- | | **Type** | `lower` / `upper` | | **Default** | `lower` | | **Applies to** | All output formats that serialize UID columns as strings | | **Since** | FastBCP 1.0 | ## Values[​](#values "Direct link to Values") | Value | Output example | | ----------------- | -------------------------------------- | | `lower` (default) | `550e8400-e29b-41d4-a716-446655440000` | | `upper` | `550E8400-E29B-41D4-A716-446655440000` | ## Examples[​](#examples "Direct link to Examples") ### Export with uppercase UIDs[​](#export-with-uppercase-uids "Direct link to Export with uppercase UIDs") * Windows * Linux ``` $env:FASTBCP_UID_STRING_CASING = "upper" fastbcp -S myserver.database.windows.net ` -d MyDatabase ` -T dbo.MyTable ` --fileoutput "output.csv" ``` ``` export FASTBCP_UID_STRING_CASING=upper fastbcp -S myserver.database.windows.net \ -d MyDatabase \ -T dbo.MyTable \ --fileoutput "output.csv" ``` ### Restore default lowercase (RFC 4122)[​](#restore-default-lowercase-rfc-4122 "Direct link to Restore default lowercase (RFC 4122)") * Windows * Linux ``` $env:FASTBCP_UID_STRING_CASING = "lower" ``` ``` export FASTBCP_UID_STRING_CASING=lower ``` --- # Environment Variables Overview FastBCP supports several environment variables to customize its behavior. This page provides a comprehensive overview of all available environment variables. ## Quick Reference Table[​](#quick-reference-table "Direct link to Quick Reference Table") | Variable | Type | Default | Category | Description | | ------------------------------------------------------------------------------------------------------------------------------------- | ------------------------ | ---------------------------- | ------------ | -------------------------------------------------------------------------------------------------------------------- | | [`FASTBCP_CLOUD_ISBUFFERED`](/latest/documentation/environment-variables/fastbcp-cloud-isbuffered.md) | `True` / `False` | `False` | Cloud Upload | Enables buffered cloud uploads for better performance | | [`FASTBCP_TMPPATH`](/latest/documentation/environment-variables/fastbcp-tmppath.md) | Directory path | System temp | Cloud Upload | Base directory for temporary files during buffered uploads | | [`FASTBCP_CLOUD_MAXUPLOADTHREAD_PER_STREAM`](/latest/documentation/environment-variables/fastbcp-cloud-maxuploadthread-per-stream.md) | Integer (> 0) | `8` or `2` | Cloud Upload | Maximum parallel upload threads per cloud stream | | [`FASTBCP_RGSIZE`](/latest/documentation/environment-variables/fastbcp-rgsize.md) | Integer (> 0) | max(2^18/sqrt(degree),64000) | Parquet | Row group size for Parquet files | | [`FASTBCP_UID_STRING_CASING`](/latest/documentation/environment-variables/fastbcp-uid-string-casing.md) | `lower` / `upper` | `lower` | Output | Casing for UID-to-string conversion (RFC 4122) | | [`FASTBCP_DATEFORMAT`](/latest/documentation/environment-variables/fastbcp-dateformat.md) | Format string | `yyyy-MM-dd HH:mm:sszzz` | Output | Custom date format string for date-to-string conversion | | [`FASTBCP_ADBC_BATCHCELLS`](/latest/documentation/environment-variables/fastbcp-adbc-batchcells.md) | Integer (> 0) | `500000` | ADBC | Arrow record batch size (in cells) for ADBC connectors | | [`FASTBCP_SYSTEMINFO_COLLECT`](/latest/documentation/environment-variables/fastbcp-systeminfo-collect.md) | `True` / `False` | `False` | Diagnostics | Collects system information about the machine during the run | | [`FASTBCP_PERFORMANCE_COLLECT`](/latest/documentation/environment-variables/fastbcp-performance-collect.md) | `True` / `False` | `False` | Diagnostics | Collects performance information about the machine during the run | | [`FASTBCP_DBPARTITION_TARGET_MODE`](/latest/documentation/environment-variables/fastbcp-dbpartition-target-mode.md) | `CHUNK` / `HIVE` | `CHUNK` | Parallel | Output file layout of the `DBPartition` parallel method | | [`FASTBCP_INDEX_DIR`](/latest/documentation/environment-variables/fastbcp-index-dir.md) | Directory path | Driver default | Backups | Directory of the index of the backups (`backup_mssql`, `backup_rman`) | | [`FASTBCP_BACKUP_RESTORE_POINT`](/latest/documentation/environment-variables/fastbcp-backup-restore-point.md) | `latest` / `full` | `latest` | Backups | Which version of a table `backup_mssql` and `backup_rman` read: the latest, or the last full backup | | [`FASTBCP_BACKUP_RESTORE_MODE`](/latest/documentation/environment-variables/fastbcp-backup-restore-mode.md) | `strict` / `best_effort` | `strict` | Backups | What `backup_mssql` and `backup_rman` do with a backup that could be the newest and cannot be used: fail, or skip it | | [`FASTBCP_TTU_PATH`](/latest/documentation/environment-variables/fastbcp-ttu-path.md) | Directory path | Not set | ADBC | Teradata Tools and Utilities (TTU) folder for the `adbc_teradata` legacy-port logon (Linux) | --- # Advanced Scenarios Advanced use cases, partition functions, and troubleshooting examples: SQL Server partition functions, date-based partitioning, complex queries, performance tuning and debug logging. ## SQL Server Partition Functions[​](#sql-server-partition-functions "Direct link to SQL Server Partition Functions") Use SQL Server partition functions for efficient parallel exports. ### Using Partition Function with DataDriven[​](#using-partition-function-with-datadriven "Direct link to Using Partition Function with DataDriven") Leverage existing partition functions to distribute work: ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "tpch10_collation_bin2" ` --trusted ` --sourceschema "dbo" ` --sourcetable "orders_part" ` --directory "D:\temp" ` --fileoutput "orders_partitioned.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "DataDriven" ` --distributekeycolumn "`$partition.PF_DATE(o_orderdate)" ` --paralleldegree 10 ` --merge "False" ``` Partition Function Syntax Use `` `$partition.FunctionName(ColumnName) `` to reference a partition function. The backtick escapes the dollar sign in PowerShell. ### Date-based Partitioning[​](#date-based-partitioning "Direct link to Date-based Partitioning") #### Partition by date ranges for time-series data using database partitions:[​](#partition-by-date-ranges-for-time-series-data-using-database-partitions "Direct link to Partition by date ranges for time-series data using database partitions:") ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "TimeSeriesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "SensorReadings" ` --directory "C:\temp" ` --fileoutput "sensor_readings.parquet" ` --parallelmethod "DataDriven" ` --distributekeycolumn "`$partition.PF_Monthly(reading_date)" ` --paralleldegree 12 ` --merge "False" ``` #### Partition by date ranges for time-series data using Timepartition FastBCP parallelmethod :[​](#partition-by-date-ranges-for-time-series-data-using-timepartition-fastbcp-parallelmethod-- "Direct link to Partition by date ranges for time-series data using Timepartition FastBCP parallelmethod :") ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "TimeSeriesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "SensorReadings" ` --directory "s3://mycorpexportbucket/raw/TimeSeriesDB/SensorReadings/" ` --fileoutput "sensor_readings.parquet" ` --cloudprofile "mycorps3profile" ` --parallelmethod "Timepartition" ` --distributekeycolumn "(reading_date,year,month,day)" ` --paralleldegree 12 ` --merge "False" ``` This technique produces one file per day inside a directory structure (local or cloud) as a Hive partitioning directory: `/year=2026/month=11/day=11/sensor_readings.parquet` After a full export, you can use a query to filter your data and overwrite the files that were already generated on the overlapping period. ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "TimeSeriesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "SensorReadings_Part" ` --query "SELECT * FROM dbo.SensorReadings_Part WHERE reading_date >= CAST(GETDATE() - 10 AS DATE)" ` --directory "s3://mycorpexportbucket/raw/TimeSeriesDB/SensorReadings/" ` --fileoutput "sensor_readings.parquet" ` --cloudprofile "mycorps3profile" ` --parallelmethod "Timepartition" ` --distributekeycolumn "(reading_date,year,month,day)" ` --paralleldegree 10 ` --merge "False" ``` ## Complex Queries[​](#complex-queries "Direct link to Complex Queries") ### Multi-table Joins[​](#multi-table-joins "Direct link to Multi-table Joins") Export data with a query with joins: ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --query "SELECT o.order_id, o.order_date, c.customer_name, od.product_id, od.quantity, od.unit_price FROM orders o INNER JOIN customers c ON o.customer_id = c.customer_id INNER JOIN order_details od ON o.order_id = od.order_id WHERE o.order_date >= '2024-01-01'" ` --directory "C:\temp" ` --fileoutput "sales_detail.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Ntile" ` --distributekeycolumn "o.order_id" ` --paralleldegree 8 ` --merge "False" ``` ### Aggregated Data[​](#aggregated-data "Direct link to Aggregated Data") Export pre-aggregated data: ``` .\FastBCP.exe ` --connectiontype "pgsql" ` --server "localhost" ` --port "5432" ` --database "analytics" ` --user "postgres" ` --password "postgres" ` --query "SELECT date_trunc('day', order_date) as order_day, customer_region, COUNT(*) as order_count, SUM(total_amount) as total_sales FROM orders GROUP BY date_trunc('day', order_date), customer_region" ` --directory "C:\temp" ` --fileoutput "daily_sales_by_region.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd" ` --encoding "UTF-8" ` --parallelmethod "None" ``` ## Performance Tuning[​](#performance-tuning "Direct link to Performance Tuning") ### Optimal Parallel Degree[​](#optimal-parallel-degree "Direct link to Optimal Parallel Degree") * Auto-detect * Manual Use negative values to auto-calculate based on CPU cores: ``` # Use all cores minus 2 .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "LargeDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "BigTable" ` --directory "C:\temp" ` --fileoutput "bigtable.parquet" ` --parallelmethod "RangeId" ` --distributekeycolumn "id" ` --paralleldegree -2 ` --merge "False" ``` Specify exact thread count: ``` # Use exactly 16 threads .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "LargeDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "BigTable" ` --directory "C:\temp" ` --fileoutput "bigtable.parquet" ` --parallelmethod "RangeId" ` --distributekeycolumn "id" ` --paralleldegree 16 ` --merge "False" ``` ### Parquet RowGroup Size[​](#parquet-rowgroup-size "Direct link to Parquet RowGroup Size") To reduce memory pressure and, in many cases, improve export performance, you can configure the Parquet row group size by setting the `FASTBCP_RGSIZE` environment variable. A smaller `FASTBCP_RGSIZE` value reduces memory usage during export. However, this comes with a trade-off: smaller row groups may reduce Parquet compression efficiency and can sometimes increase the final file size. Good to know Recommended values range from `1000` to `1_000_000`. In practice, values between 32,000 and 64,000 often provide a good balance between memory usage, performance, and compression efficiency. * Windows * Linux ``` $Env:FASTBCP_RGSIZE=32000 .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "LargeDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "BigTable" ` --directory "C:\temp" ` --fileoutput "bigtable.parquet" ` --parallelmethod "RangeId" ` --distributekeycolumn "id" ` --paralleldegree -2 ` --merge "False" ``` Specify exact thread count: ``` export FASTBCP_RGSIZE=32000 .\FastBCP / --connectiontype "mssql" / --server "mssqlhost.domain.lan,1433" / --database "LargeDB" / --user "FastUSer" / --password "FastPassword" / --sourceschema "dbo" / --sourcetable "BigTable" / --directory "/data/export/bigtable/" / --fileoutput "bigtable.parquet" / --parallelmethod "RangeId" / --distributekeycolumn "id" / --paralleldegree 16 / --merge "False" ``` ### Merge vs No-Merge[​](#merge-vs-no-merge "Direct link to Merge vs No-Merge") With Merge * Parameter`--merge "True"` * Resultsingle file `data_merged.parquet` * Notesslower and only OnPremise Without Merge * Parameter`--merge "False"` * Resultmultiple files `data_part_Chunk000.parquet`, `data_part_Chunk001.parquet`, etc. * Noteskeeps separate files for parallel processing - With Merge - Without Merge Combine parallel outputs into single file: ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "DataDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Data" ` --directory "C:\temp" ` --fileoutput "data_merged.parquet" ` --parallelmethod "RangeId" ` --distributekeycolumn "id" ` --paralleldegree 8 ` --merge "True" ``` Keep separate files for parallel processing: ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "DataDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Data" ` --directory "C:\temp" ` --fileoutput "data_part.parquet" ` --parallelmethod "RangeId" ` --distributekeycolumn "id" ` --paralleldegree 8 ` --merge "False" ``` ### Enable Debug Logging[​](#enable-debug-logging "Direct link to Enable Debug Logging") Get detailed execution information: ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "TestDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "TestTable" ` --directory "C:\temp" ` --fileoutput "debug_export.csv" ` --parallelmethod "Random" ` --distributekeycolumn "id" ` --paralleldegree 4 ` --merge "False" ` --loglevel "Debug" ` --runid "debug_test_run" ``` Debug Mode Use `--loglevel "Debug"` to see detailed execution steps, connection strings (without passwords), and query generation details. tip Build your command with the [Doc Wizard](/latest/wizard.md) Related * [Parallel Parameters](/latest/documentation/cli/parallel_parameters.md)parallel methods, degree and distribute key column * [FASTBCP\_​RGSIZE](/latest/documentation/environment-variables/fastbcp-rgsize.md)Parquet row group size * [Parquet Formatting](/latest/documentation/cli/parquet_formatting.md)compression and row group size * [Logging](/latest/documentation/logging/Overview.md)log targets (console, database, file) and OpenTelemetry --- # Cloud Storage Examples Examples for exporting data directly to cloud storage platforms: AWS S3, Azure Blob Storage and Azure Data Lake Gen2, plus hourly exports and best practices for cloud exports. ## AWS S3[​](#aws-s3 "Direct link to AWS S3") Export data directly to Amazon S3 buckets using date-based placeholders. ### S3 with Date Placeholders[​](#s3-with-date-placeholders "Direct link to S3 with Date Placeholders") Automatically organize files by date using placeholder tokens: ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "DailySales" ` --directory "s3://my-bucket/data/sales/full/" ` --fileoutput "sales.parquet" ` --parallelmethod "RangeId" ` --distributekeycolumn "sale_id" ` --paralleldegree 8 ` --runid "sales_to_s3_daily" ``` ### S3 with Nested Structure[​](#s3-with-nested-structure "Direct link to S3 with Nested Structure") Create hierarchical folder structures: ``` .\FastBCP.exe ` --connectiontype "pgsql" ` --server "localhost" ` --port "5432" ` --database "ecommerce" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "orders" ` --directory "s3://analytics-bucket/exports/orders/" ` --fileoutput "orders.parquet" ` --parallelmethod "DataDriven" ` --distributekeycolumn "o_orderdate" ` --paralleldegree 10 ` --merge "False" ``` ### S3 with CSV Format[​](#s3-with-csv-format "Direct link to S3 with CSV Format") Export CSV files to S3 with manual date partitioning: ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "LogsDB" ` --trusted ` --query "SELECT * FROM ApplicationLogs WHERE log_date = '2024-05-01'" ` --directory "s3://logs-bucket/app-logs/appdate=2024-05-01/" ` --fileoutput "app_logs.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ``` ## Azure Blob Storage[​](#azure-blob-storage "Direct link to Azure Blob Storage") Export data to Azure Blob Storage containers. ### Azure with Date Partitioning[​](#azure-with-date-partitioning "Direct link to Azure with Date Partitioning") ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "AnalyticsDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Events" ` --directory "abs://mystorageaccount.blob.core.windows.net/datacontainer/events/full/" ` --fileoutput "events.parquet" ` --parallelmethod "Timepartition" ` --distributekeycolumn "event_timestamp(year,month)" ` --paralleldegree 10 ``` ### Azure Data Lake Gen2[​](#azure-data-lake-gen2 "Direct link to Azure Data Lake Gen2") Export to Azure Data Lake Storage Gen2: ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "AnalyticsDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Events" ` --directory "abfss://mystorageaccount.dfs.core.windows.net/datacontainer/events/full/" ` --fileoutput "events.parquet" ` --parallelmethod "Timepartition" ` --distributekeycolumn "event_timestamp(year,month)" ` --paralleldegree 10 ``` ## Hourly Exports[​](#hourly-exports "Direct link to Hourly Exports") Create exports with hourly granularity. ### Hourly Data Partition by Sensor with an incremental time range driven from outside[​](#hourly-data-partition-by-sensor-with-an-incremental-time-range-driven-from-outside "Direct link to Hourly Data Partition by Sensor with an incremental time range driven from outside") ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "StreamingDB" ` --trusted ` --query "SELECT * FROM SensorData WHERE reading_time >= '2024-02-03 14:00:00' and reading_time < '2024-02-03 15:00:00'" ` --directory "s3://iot-bucket/sensor-data/" ` --fileoutput "sensors_20240203140000_20240203150000.parquet" ` --parallelmethod "DataDriven" ` --distributekeycolumn "sensor_id" ` --datadrivenquery "SELECT sensor_id From SensorList" ` --paralleldegree 8 ` --runid "hourly_sensor_export_20240203140000_20240203150000" ``` ## Best for Cloud Exports[​](#best-for-cloud-exports "Direct link to Best for Cloud Exports") ### Performance Tips[​](#performance-tips "Direct link to Performance Tips") * Use Parquet for cloud storagebetter compression and query performance, reduced network traffic. * Enable parallel execution when neededif you need to split data on a business criterion, or if you have a lot of data to extract. * Dynamic parallel degreeuse a negative value for `--paralleldegree` to automatically set threads to (CPU cores / abs(degree)), leaving resources for other processes. For example, `--paralleldegree -2` uses half of the cores of the machine from where FastBCP is launched. * DataDriven queryuse `--datadrivenquery` to speed up the retrieval of the list of elements to extract, or as a technique for incremental extraction, by putting a WHERE clause in `--datadrivenquery` instead of the main `--query`. warning Keep the degree safe for your source, to avoid a total saturation. ### Example with All Best Practices[​](#example-with-all-best-practices "Direct link to Example with All Best Practices") ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "DataWarehouse" ` --trusted ` --sourceschema "dbo" ` --sourcetable "FactSales" ` --directory "s3://analytics-bucket/warehouse/sales/{sourcetable}" ` --fileoutput "FactSales.parquet" ` --parallelmethod "DataDriven" ` --datadrivenquery "SELECT ref_date from calendar where ref_date > cast(getdate()-30 as date)" ` --distributekeycolumn "sale_date" ` --paralleldegree -2 ` --runid "daily_sales_to_s3" ` --loglevel "Information" ``` tip Build your command with the [Doc Wizard](/latest/wizard.md) Related * [Cloud Connectivity](/latest/documentation/cloud-connectivity/overview.md)supported platforms and authentication setup * [![](/img/logos/aws-s3.png)AWS S3](/latest/documentation/cloud-connectivity/aws-s3.md)authentication, S3 URI format and required permissions * [![](/img/logos/azure-blob.svg)Azure](/latest/documentation/cloud-connectivity/azure.md)Azure Blob Storage and Azure Data Lake Gen2 * [![](/img/logos/gcs.png)Google Cloud Storage](/latest/documentation/cloud-connectivity/google-cloud.md)authentication, GCS URI format and required permissions * [![](/img/logos/onelake.png)OneLake](/latest/documentation/cloud-connectivity/onelake.md)authentication setup and export * [Cloud Options](/latest/documentation/cli/cloud_options.md)AWS, Azure and Google Cloud authentication and storage --- # DB2 Examples FastBCP exports IBM Db2 in two ways: | Connection type | Client software | Output | When to use it | | ------------------------------------------------------------- | ------------------------------------ | -------------------------- | ---------------------------------------------------------------- | | [`adbc_db2`](#native-adbc-connector-adbc_db2) *(since 1.7.0)* | None: the ArpeDb2 driver is embedded | Parquet | Db2 for LUW (and Db2 for i queries) to Parquet, the fastest path | | [`odbc`](#odbc-connection-string) | IBM Db2 ODBC / CLI driver | CSV, TSV, JSON, Parquet, … | Other output formats, or Db2 for z/OS | ## Native ADBC Connector (adbc\_db2)[​](#native-adbc-connector-adbc_db2 "Direct link to Native ADBC Connector (adbc_db2)") `--connectiontype adbc_db2` reads Db2 through the embedded **ArpeDb2** driver: no IBM client to install. `--database` is required; the port defaults to `50000`. See [Connection Parameters](/latest/documentation/cli/connection_parameters.md#adbc_db2) for TLS and the supported targets. **Single-threaded export:** ``` .\FastBCP.exe ` --connectiontype "adbc_db2" ` --server "db2server.company.corp:50000" ` --database "SAMPLE" ` --user "db2user" ` --password "password" ` --sourceschema "DB2ADMIN" ` --sourcetable "ORDERS" ` --directory "C:\temp" ` --fileoutput "db2_orders.parquet" ` --parquetcompression "Zstd" ` --parallelmethod "None" ``` **Parallel export with Ntile method (Linux):** ``` ./FastBCP \ --connectiontype "adbc_db2" \ --server "db2server.company.corp:50000" \ --database "SAMPLE" \ --user "db2user" \ --password "password" \ --sourceschema "DB2ADMIN" \ --sourcetable "ORDERS" \ --directory "/data/export" \ --fileoutput "db2_orders.parquet" \ --parallelmethod "Ntile" \ --distributekeycolumn "ORDER_ID" \ --paralleldegree 8 \ --merge "False" ``` **One export per data partition with DBPartition** (Db2 for LUW range-partitioned table; a table that is not range partitioned falls back to `None`): ``` .\FastBCP.exe ` --connectiontype "adbc_db2" ` --server "db2server.company.corp:50000" ` --database "SAMPLE" ` --user "db2user" ` --password "password" ` --sourceschema "DB2ADMIN" ` --sourcetable "SALES_HISTORY" ` --directory "C:\temp\sales_history" ` --fileoutput "sales_history.parquet" ` --parallelmethod "DBPartition" ` --paralleldegree 4 ``` **TLS** (Db2's TLS runs on the server's SSL port, here `50001`), with a connection string: ``` ./FastBCP \ --connectiontype "adbc_db2" \ --sourceconnectstring "Server=db2server.company.corp;Port=50001;Database=SAMPLE;User Id=db2user;Password=password;SSL Mode=verify-full;SSL Root Cert=/etc/ssl/db2/ca.pem" \ --query "SELECT * FROM DB2ADMIN.ORDERS WHERE ORDER_DATE >= CURRENT DATE - 30 DAYS" \ --directory "/data/export" \ --fileoutput "db2_orders_last30.parquet" \ --parallelmethod "None" ``` Db2 syntax in --query *Since FastBCP 1.7.0*, a `--query` on Db2 (`adbc_db2`, or `odbc` when the driver reports a Db2 server) accepts Db2 special registers written as several words (`CURRENT DATE`, `CURRENT TIMESTAMP(6)`, `CURRENT SCHEMA`, …) and labeled durations (`CURRENT DATE - 30 DAYS`, `ORDER_DATE + 1 MONTH`). Up to 1.6 these queries failed to parse. ## ODBC: Connection String[​](#odbc-connection-string "Direct link to ODBC: Connection String") DB2 ODBC Driver With `--connectiontype odbc`, install the IBM Db2 ODBC driver, then provide either a DSN (`--dsn`) or a full connection string (`--sourceconnectstring`) as shown below. DECIMAL values with IBM's ODBC driver On a Windows machine whose regional settings use a decimal comma (French, German, …), IBM's Db2 ODBC / CLI driver returned `DECIMAL` values multiplied by 10^scale (`173665.47` read as `17366547`), with no error. *Since FastBCP 1.7.0*, FastBCP adds `Patch2=15` to the connection when it detects IBM's driver on a Db2 server, keeping the `Patch2` values you give, and logs the resulting list. Nothing to change in your commands. **Single-threaded export:** ``` .\FastBCP.exe ` --connectiontype "odbc" ` --sourceconnectstring "Driver={IBM DB2 ODBC DRIVER};Database=SAMPLE;Hostname=db2server.company.corp;Port=25010;Protocol=TCPIP;Uid=db2user;Pwd=password;CurrentSchema=DB2ADMIN" ` --query "SELECT * FROM DB2ADMIN.ORDERS" ` --directory "C:\temp" ` --fileoutput "db2_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` **Parallel export with Ntile method:** ``` .\FastBCP.exe ` --connectiontype "odbc" ` --sourceconnectstring "Driver={IBM DB2 ODBC DRIVER};Database=SAMPLE;Hostname=db2server.company.corp;Port=25010;Protocol=TCPIP;Uid=db2user;Pwd=password;CurrentSchema=DB2ADMIN" ` --query "SELECT * FROM DB2ADMIN.ORDERS" ` --directory "C:\temp" ` --fileoutput "db2_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Ntile" ` --distributekeycolumn "ORDER_ID" ` --paralleldegree -2 ` --merge "False" ``` **Parallel export with Random method:** ``` .\FastBCP.exe ` --connectiontype "odbc" ` --sourceconnectstring "Driver={IBM DB2 ODBC DRIVER};Database=SAMPLE;Hostname=db2server.company.corp;Port=25010;Protocol=TCPIP;Uid=db2user;Pwd=password;CurrentSchema=DB2ADMIN" ` --query "SELECT * FROM DB2ADMIN.ORDERS" ` --directory "C:\temp" ` --fileoutput "db2_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "ORDER_ID" ` --paralleldegree 8 ` --merge "False" ``` ## DSN Connection[​](#dsn-connection "Direct link to DSN Connection") If a DSN is already configured on the machine, you can use `--dsn` instead of `--sourceconnectstring`. ``` .\FastBCP.exe ` --connectiontype "odbc" ` --dsn "DB2_DSN" ` --query "SELECT * FROM DB2ADMIN.ORDERS" ` --directory "C:\temp" ` --fileoutput "db2_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` Good to know **Quoting special identifiers**: if your DB2 schema or table name contains special characters (e.g. `HCR_BI."APER@XPSAHISTO"`), keep the double quotes around the identifier inside your `--query` value so DB2 treats it as a delimited identifier. tip Build your command with the [Doc Wizard](/latest/wizard.md) Related * [Connection Parameters](/latest/documentation/cli/connection_parameters.md)DSN, source connection string and authentication * [Parallel Parameters](/latest/documentation/cli/parallel_parameters.md)parallel methods, degree and distribute key column --- # MySQL Examples Examples for exporting data from MySQL databases with the `mysql` connection type: single-threaded, parallel (Random and DataDriven) and Parquet output. ## Single-threaded Export[​](#single-threaded-export "Direct link to Single-threaded Export") Simple export without parallelization. ``` .\FastBCP.exe ` --connectiontype "mysql" ` --server "localhost" ` --port "3306" ` --database "test" ` --user "root" ` --password "password" ` --query "SELECT * FROM test_table LIMIT 1000" ` --directory "C:\temp" ` --fileoutput "mysql_test.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` ## Parallel Export - Random Method[​](#parallel-export---random-method "Direct link to Parallel Export - Random Method") Export using Random distribution. ``` .\FastBCP.exe ` --connectiontype "mysql" ` --server "localhost" ` --port "3306" ` --database "test" ` --user "root" ` --password "password" ` --sourceschema "test" ` --sourcetable "orders" ` --directory "C:\temp" ` --fileoutput "mysql_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "order_id" ` --paralleldegree 8 ` --merge "False" ` --runid "mysql_to_csv_parallel8_random" ``` ## Parallel Export - DataDriven Method[​](#parallel-export---datadriven-method "Direct link to Parallel Export - DataDriven Method") Export using DataDriven distribution based on distinct column values. ``` .\FastBCP.exe ` --connectiontype "mysql" ` --server "localhost" ` --port "3306" ` --database "test" ` --user "root" ` --password "password" ` --sourceschema "test" ` --sourcetable "orders" ` --directory "C:\temp" ` --fileoutput "mysql_orders_dd.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "DataDriven" ` --distributekeycolumn "status" ` --paralleldegree 10 ` --merge "False" ` --runid "mysql_to_csv_parallel10_datadriven" ``` ## Export to Parquet[​](#export-to-parquet "Direct link to Export to Parquet") Export MySQL data to Parquet format. ``` .\FastBCP.exe ` --connectiontype "mysql" ` --server "localhost" ` --port "3306" ` --database "test" ` --user "root" ` --password "password" ` --sourceschema "test" ` --sourcetable "orders" ` --directory "C:\temp" ` --fileoutput "mysql_orders.parquet" ` --parallelmethod "Random" ` --distributekeycolumn "order_id" ` --paralleldegree 6 ` --merge "False" ``` tip Build your command with the [Doc Wizard](/latest/wizard.md) Related * [Connection Parameters](/latest/documentation/cli/connection_parameters.md)connection types, authentication and connection strings * [Parallel Parameters](/latest/documentation/cli/parallel_parameters.md)parallel methods, degree and distribute key column * [![](/img/logos/mysql.svg)MySQL datatype mappings](/latest/datatypes-conversion/mysql/parquet.md)how MySQL types map to Parquet --- # Oracle Examples Comprehensive examples for exporting data from Oracle databases, from a single-threaded export to each parallel method, Parquet output, ADBC and RMAN backup sets. ## Connection Types[​](#connection-types "Direct link to Connection Types") Oracle exports support multiple connection types: oraodpRecommended * Connects withNative Oracle Data Provider oledb * Connects withOracle OLEDB Provider (OraOLEDB) odbc * Connects withODBC DSN adbc\_oracleUltra-fast * Connects withADBC FastDriver * OutputParquet only (see [ADBC Examples](#adbc-examples)) backup\_rman * Readstables straight from **RMAN backup sets**, full and incremental, without Oracle and without a restore * OutputParquet only (see [Oracle RMAN Backup Sets](#oracle-rman-backup-sets-backup_rman)) Good to know The `adbc_oracle` connection type uses the Arpe.io ADBC FastDriver for ultra-fast, Arrow-native Parquet exports, and also supports the `Physical` parallel method (resolved to Rowid). Output is Parquet-only — see the [ADBC Examples](#adbc-examples) section below. Oracle syntax in --query *Since FastBCP 1.7.0*, a `--query` on Oracle (`oraodp`, `adbc_oracle`, or `odbc` when the driver reports an Oracle server) is read with Oracle's own SQL rules: * `#` is part of a name, so `SELECT SID, SERIAL# FROM V$SESSION` keeps its `SERIAL#` column (up to 1.6 the end of the line was dropped as a comment); * a backslash is an ordinary character: `'C:\temp\'` parses, and `LIKE 'C:\temp\f1%'` matches what Oracle matches (up to 1.6, `\t` became a tab and the filter could silently return no rows); * the `(+)` outer join, `IGNORE NULLS` in window functions and database links (`T@DBLINK`) keep working. ## Single-threaded Export[​](#single-threaded-export "Direct link to Single-threaded Export") Simple export without parallelization. * Oracle Data Provider * OLEDB Provider ``` .\FastBCP.exe ` --connectiontype "oraodp" ` --server "localhost:1521/ORCLPDB1" ` --user "system" ` --password "password" ` --query "SELECT * FROM customers WHERE ROWNUM <= 1000" ` --directory "C:\temp" ` --fileoutput "oracle_customers.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` ``` .\FastBCP.exe ` --connectiontype "oledb" ` --provider "OraOLEDB.Oracle" ` --server "localhost:1521/ORCLPDB1" ` --user "system" ` --password "password" ` --query "SELECT * FROM customers WHERE ROWNUM <= 1000" ` --directory "C:\temp" ` --fileoutput "oracle_customers.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` ## Parallel Export - Physical Method[​](#parallel-export---physical-method "Direct link to Parallel Export - Physical Method") Parallel export using the physical row identifier (ROWID). Good to know **Physical on Oracle**: with an Oracle connection type (`oraodp`, `adbc_oracle`), the `Physical` method resolves to the Oracle ROWID strategy (formerly `--parallelmethod Rowid`, now deprecated). It is very efficient for full table exports and does not require a distribute key column. `--sourceschema` and `--sourcetable` are required. **Full table export:** ``` .\FastBCP.exe ` --connectiontype "oraodp" ` --server "localhost:1521/ORCLPDB1" ` --user "system" ` --password "password" ` --sourceschema "SYSTEM" ` --sourcetable "ORDERS" ` --directory "C:\temp" ` --fileoutput "oracle_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Physical" ` --paralleldegree 8 ` --merge "False" ` --runid "oraodp_to_csv_parallel8_physical" ``` **With query filter:** ``` .\FastBCP.exe ` --connectiontype "oraodp" ` --server "localhost:1521/ORCLPDB1" ` --user "system" ` --password "password" ` --sourceschema "SYSTEM" ` --sourcetable "ORDERS" ` --query "SELECT * FROM SYSTEM.ORDERS WHERE order_date >= TO_DATE('2024-01-01', 'YYYY-MM-DD')" ` --directory "C:\temp" ` --fileoutput "oracle_orders_2024.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Physical" ` --paralleldegree 8 ` --merge "False" ` --runid "oraodp_to_csv_parallel8_physical_filtered" ``` ## Parallel Export - Random Method[​](#parallel-export---random-method "Direct link to Parallel Export - Random Method") Export using Random distribution with modulo operation. ``` .\FastBCP.exe ` --connectiontype "oraodp" ` --server "localhost:1521/ORCLPDB1" ` --user "system" ` --password "password" ` --sourceschema "SYSTEM" ` --sourcetable "ORDERS" ` --directory "C:\temp" ` --fileoutput "oracle_orders_random.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "order_id" ` --paralleldegree 8 ` --merge "False" ` --runid "oraodp_to_csv_parallel8_random" ``` ## Parallel Export - DataDriven Method[​](#parallel-export---datadriven-method "Direct link to Parallel Export - DataDriven Method") Export using DataDriven distribution based on distinct column values. ``` .\FastBCP.exe ` --connectiontype "oraodp" ` --server "localhost:1521/ORCLPDB1" ` --user "system" ` --password "password" ` --sourceschema "SYSTEM" ` --sourcetable "ORDERS" ` --directory "C:\temp" ` --fileoutput "oracle_orders_dd.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "DataDriven" ` --distributekeycolumn "order_status" ` --paralleldegree 10 ` --merge "False" ` --runid "oraodp_to_csv_parallel10_datadriven" ``` ## Export to Parquet[​](#export-to-parquet "Direct link to Export to Parquet") Export Oracle data to Parquet format. **Single-threaded:** ``` .\FastBCP.exe ` --connectiontype "oraodp" ` --server "localhost:1521/ORCLPDB1" ` --user "system" ` --password "password" ` --sourceschema "SYSTEM" ` --sourcetable "ORDERS" ` --directory "C:\temp" ` --fileoutput "oracle_orders.parquet" ` --parallelmethod "None" ``` **Parallel with Physical (Rowid):** ``` .\FastBCP.exe ` --connectiontype "oraodp" ` --server "localhost:1521/ORCLPDB1" ` --user "system" ` --password "password" ` --sourceschema "SYSTEM" ` --sourcetable "ORDERS" ` --directory "C:\temp" ` --fileoutput "oracle_orders.parquet" ` --parallelmethod "Physical" ` --paralleldegree 10 ` --merge "False" ``` ## OLEDB Connection Examples[​](#oledb-connection-examples "Direct link to OLEDB Connection Examples") Using Oracle OLEDB Provider for connections. **Single-threaded:** ``` .\FastBCP.exe ` --connectiontype "oledb" ` --provider "OraOLEDB.Oracle" ` --server "localhost:1521/ORCLPDB1" ` --user "system" ` --password "password" ` --query "SELECT * FROM SYSTEM.ORDERS WHERE ROWNUM <= 10000" ` --directory "C:\temp" ` --fileoutput "oracle_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` **Parallel Random:** ``` .\FastBCP.exe ` --connectiontype "oledb" ` --provider "OraOLEDB.Oracle" ` --server "localhost:1521/ORCLPDB1" ` --user "system" ` --password "password" ` --query "SELECT * FROM SYSTEM.ORDERS" ` --directory "C:\temp" ` --fileoutput "oracle_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "order_id" ` --paralleldegree 6 ` --merge "False" ``` **Parallel DataDriven:** ``` .\FastBCP.exe ` --connectiontype "oledb" ` --provider "OraOLEDB.Oracle" ` --server "localhost:1521/ORCLPDB1" ` --user "system" ` --password "password" ` --query "SELECT * FROM SYSTEM.ORDERS" ` --directory "C:\temp" ` --fileoutput "oracle_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "DataDriven" ` --distributekeycolumn "order_status" ` --paralleldegree 6 ` --merge "False" ``` ## ADBC Examples[​](#adbc-examples "Direct link to ADBC Examples") The `adbc_oracle` connection type uses the Arpe.io ADBC FastDriver for ultra-fast, Arrow-native exports. **Output is Parquet-only**, and the `Physical` parallel method (resolved to Rowid) is also supported — see [Connection Parameters](/latest/documentation/cli/connection_parameters.md#connection-type) and [Parallel Parameters](/latest/documentation/cli/parallel_parameters.md#parallel-method) for details. ``` ./FastBCP \ --connectiontype "adbc_oracle" \ --server "localhost:1521/orclpdb1" \ --user "MIG_EXPRESS" \ --password "FastPassword" \ --sourceschema "TPCH10" \ --sourcetable "LINEITEM" \ --directory "./" \ --fileoutput "{sourcetable}.parquet" \ --method "None" ``` ## Oracle RMAN Backup Sets (backup\_rman)[​](#oracle-rman-backup-sets-backup_rman "Direct link to Oracle RMAN Backup Sets (backup_rman)") The `backup_rman` connection type reads a table straight from **RMAN backup sets**, full and incremental, without restoring them and without an Oracle instance: on a backup server, from an archive, or for a database that is gone. `--server` is the directory of the backup pieces and `--database` their names or patterns. **Output is Parquet-only** — see [Oracle RMAN backup sets](/latest/documentation/cli/connection_parameters.md#oracle-rman-backup-sets-backup_rman) for what is supported. **A full backup, parallel export (Physical resolves to Pages):** * Windows * Linux ``` .\FastBCP.exe ` --connectiontype "backup_rman" ` --server "D:\Backups\RMAN\ORCL" ` --database "full_*" ` --sourceschema "TPCH10" ` --sourcetable "LINEITEM" ` --directory "D:\export\{sourcetable}" ` --fileoutput "{sourcetable}.parquet" ` --parallelmethod "Physical" ` --paralleldegree 8 ``` ``` ./FastBCP \ --connectiontype "backup_rman" \ --server "/backup/rman/orcl" \ --database "full_*" \ --sourceschema "TPCH10" \ --sourcetable "LINEITEM" \ --directory "/export/{sourcetable}" \ --fileoutput "{sourcetable}.parquet" \ --parallelmethod "Physical" \ --paralleldegree 8 ``` **Pieces of several backup sets** (several channels, `FILESPERSET`, `MAXPIECESIZE`, or a separate control file backup): every piece, by patterns separated by `;`, in any order. A compressed backup (`AS COMPRESSED BACKUPSET`, BASIC, LOW, MEDIUM or HIGH) is read the same way: ``` ./FastBCP \ --connectiontype "backup_rman" \ --server "/backup/rman/orcl" \ --database "db_*;ctl_*" \ --sourceschema "SALES" \ --sourcetable "ORDERS" \ --directory "/export/{sourcetable}" \ --fileoutput "{sourcetable}.parquet" \ --parallelmethod "Physical" \ --paralleldegree 8 ``` **A table of another PDB, a few columns** (`CONTAINER.OWNER.TABLE` in `--query`; the columns of types that cannot be read, such as a LOB, are simply left out): ``` ./FastBCP \ --connectiontype "backup_rman" \ --server "/backup/rman/cdb1" \ --database "full_*" \ --query "SELECT EMPLOYEE_ID, LAST_NAME, HIRE_DATE FROM HRPDB.HR.EMPLOYEES" \ --directory "/export/employees" \ --fileoutput "employees.parquet" \ --parallelmethod "None" ``` **A level 0 and its incremental backups** (since FastBCP 1.6.8): name the whole chain, in any order. The latest version of the table is read, the whole table. Here the level 0 is in `l0` and the level 1 backups in a directory per day below `l1`: * Windows * Linux ``` .\FastBCP.exe ` --connectiontype "backup_rman" ` --server "D:\Backups\RMAN\ORCL" ` --database "l0\*;l1\**" ` --sourceschema "SALES" ` --sourcetable "ORDERS" ` --directory "D:\export\{sourcetable}" ` --fileoutput "{sourcetable}.parquet" ` --parallelmethod "Physical" ` --paralleldegree 8 ``` ``` ./FastBCP \ --connectiontype "backup_rman" \ --server "/backup/rman/orcl" \ --database "l0/*;l1/**" \ --sourceschema "SALES" \ --sourcetable "ORDERS" \ --directory "/export/{sourcetable}" \ --fileoutput "{sourcetable}.parquet" \ --parallelmethod "Physical" \ --paralleldegree 8 ``` **Every backup below the directory**, whatever its level (`**`): older backups can match too, only the latest version is read: ``` ./FastBCP \ --connectiontype "backup_rman" \ --server "/backup/rman/orcl" \ --database "**" \ --sourceschema "SALES" \ --sourcetable "ORDERS" \ --directory "/export/{sourcetable}" \ --fileoutput "{sourcetable}.parquet" \ --parallelmethod "Physical" \ --paralleldegree 8 ``` **The level 0 only**, the incremental backups ignored, with [`FASTBCP_BACKUP_RESTORE_POINT`](/latest/documentation/environment-variables/fastbcp-backup-restore-point.md): ``` export FASTBCP_BACKUP_RESTORE_POINT=full ./FastBCP \ --connectiontype "backup_rman" \ --server "/backup/rman/orcl" \ --database "l0/*;l1/**" \ --sourceschema "SALES" \ --sourcetable "ORDERS" \ --directory "/export/{sourcetable}" \ --fileoutput "{sourcetable}.parquet" \ --parallelmethod "None" ``` See [Incremental backups](/latest/documentation/cli/connection_parameters.md#incremental-rman-backups) for what is read, [Naming the backup pieces](/latest/documentation/cli/connection_parameters.md#naming-the-backup-pieces) for the patterns, and [Backups that cannot be used](/latest/documentation/cli/connection_parameters.md#rman-backups-that-cannot-be-used) for when an export fails. Good to know An incremental backup without its level 0, a backup set without one of its pieces and an encrypted backup set (`SET ENCRYPTION`) fail the export, naming the backup. Image copies are not read. tip Build your command with the [Doc Wizard](/latest/wizard.md) Related * [Connection Parameters](/latest/documentation/cli/connection_parameters.md)connection types, authentication and Oracle RMAN backup sets * [Parallel Parameters](/latest/documentation/cli/parallel_parameters.md)parallel methods, degree and distribute key column * [![](/img/logos/oracle.svg)Oracle datatype mappings](/latest/datatypes-conversion/oracle/parquet.md)how Oracle types map to Parquet * [Datatypes Conversion](/latest/datatypes-conversion/overview.md)mappings for every source and connection type --- # Other Databases Examples for exporting data from Clickhouse, SAP HANA, Netezza and Teradata databases. ## Clickhouse[​](#clickhouse "Direct link to Clickhouse") Export data from Clickhouse database. **Single-threaded export:** ``` .\FastBCP.exe ` --connectiontype "clickhouse" ` --server "localhost" ` --port "9000" ` --database "default" ` --user "default" ` --password "password" ` --query "SELECT * FROM orders LIMIT 1000" ` --directory "C:\temp" ` --fileoutput "clickhouse_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` **Parallel export with Random method:** ``` .\FastBCP.exe ` --connectiontype "clickhouse" ` --server "localhost" ` --port "9000" ` --database "default" ` --user "default" ` --password "password" ` --sourceschema "default" ` --sourcetable "orders" ` --directory "C:\temp" ` --fileoutput "clickhouse_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "order_id" ` --paralleldegree 8 ` --merge "False" ``` ## SAP HANA[​](#sap-hana "Direct link to SAP HANA") Export data from SAP HANA database with the `hana` connection type. ### HANA Connection Type[​](#hana-connection-type "Direct link to HANA Connection Type") Standard HANA connection for general exports. **Single-threaded export:** ``` .\FastBCP.exe ` --connectiontype "hana" ` --server "hanaserver:30015" ` --user "SYSTEM" ` --password "password" ` --query "SELECT * FROM ORDERS WHERE ORDER_DATE >= '2024-01-01'" ` --directory "C:\temp" ` --fileoutput "hana_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` **Parallel export with Random method:** ``` .\FastBCP.exe ` --connectiontype "hana" ` --server "hanaserver:30015" ` --user "SYSTEM" ` --password "password" ` --sourceschema "SYSTEM" ` --sourcetable "ORDERS" ` --directory "C:\temp" ` --fileoutput "hana_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "ORDER_ID" ` --paralleldegree 8 ` --merge "False" ``` ## Netezza[​](#netezza "Direct link to Netezza") Export data from Netezza database using OLEDB provider. **Single-threaded export:** ``` .\FastBCP.exe ` --connectiontype "oledb" ` --provider "NZOLEDB" ` --server "netezza_server" ` --database "SYSTEM" ` --user "admin" ` --password "password" ` --query "SELECT * FROM orders" ` --directory "C:\temp" ` --fileoutput "netezza_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` **Parallel export with Random method:** ``` .\FastBCP.exe ` --connectiontype "oledb" ` --provider "NZOLEDB" ` --server "netezza_server" ` --database "SYSTEM" ` --user "admin" ` --password "password" ` --query "SELECT * FROM orders" ` --directory "C:\temp" ` --fileoutput "netezza_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "order_id" ` --paralleldegree 6 ` --merge "False" ``` **Parallel export with DataDriven method:** ``` .\FastBCP.exe ` --connectiontype "oledb" ` --provider "NZOLEDB" ` --server "netezza_server" ` --database "SYSTEM" ` --user "admin" ` --password "password" ` --query "SELECT * FROM orders" ` --directory "C:\temp" ` --fileoutput "netezza_orders.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "DataDriven" ` --distributekeycolumn "region" ` --paralleldegree 6 ` --merge "False" ``` **Parallel export with Physical method (native Netezza connection):** With a native Netezza connection type (`nzsql`, `nzcopy`, `nzoledb`, `adbc_netezza`), `--parallelmethod Physical` resolves to the Netezza data slices (formerly `NZDataSlice`, now deprecated). Good to know `--parallelmethod Physical` does not work through the generic `oledb` connection type, because FastBCP cannot know which engine is behind the provider. ``` .\FastBCP.exe ` --connectiontype "nzsql" ` --server "netezza_server" ` --database "SYSTEM" ` --user "admin" ` --password "password" ` --sourceschema "ADMIN" ` --sourcetable "ORDERS" ` --directory "C:\temp" ` --fileoutput "netezza_orders.parquet" ` --parallelmethod "Physical" ` --paralleldegree 8 ` --merge "False" ``` ## Teradata[​](#teradata "Direct link to Teradata") Export data from Teradata with the embedded .NET provider (`teradata`) or the embedded ArpeTeradata ADBC driver (`adbc_teradata`, Parquet output only). teradata * Driverembedded .NET provider adbc\_teradata * Driverembedded ArpeTeradata ADBC driver * OutputParquet only Good to know `--parallelmethod Physical` is not available for Teradata. Use `Ntile`, `RangeId`, `Random`, `DataDriven`, `Timepartition` or `DBPartition`. **Single-threaded export (`teradata`):** ``` .\FastBCP.exe ` --connectiontype "teradata" ` --server "td-host:443" ` --database "TPCH" ` --user "FastUser" ` --password "FastPassword" ` --query "SELECT * FROM TPCH.ORDERS" ` --directory "C:\temp\teradata" ` --fileoutput "teradata_orders.parquet" ` --parallelmethod "None" ``` **Parallel export with RangeId (`teradata`):** ``` .\FastBCP.exe ` --connectiontype "teradata" ` --server "td-host:1025" ` --database "TPCH" ` --user "FastUser" ` --password "FastPassword" ` --query "SELECT * FROM TPCH.ORDERS" ` --directory "C:\temp\teradata" ` --fileoutput "teradata_orders.parquet" ` --parallelmethod "RangeId" ` --distributekeycolumn "o_orderkey" ` --paralleldegree 16 ``` **Parallel export with Ntile (`adbc_teradata`):** ``` .\FastBCP.exe ` --connectiontype "adbc_teradata" ` --server "td-host" ` --database "TPCH" ` --user "FastUser" ` --password "FastPassword" ` --sourceschema "TPCH" ` --sourcetable "ORDERS" ` --directory "C:\temp\teradata" ` --fileoutput "teradata_orders.parquet" ` --parallelmethod "Ntile" ` --distributekeycolumn "o_orderkey" ` --paralleldegree 8 ``` The default `adbc_teradata` logon uses TLS and needs no Teradata client software. For the legacy-port logon (no TLS on the server, or `SSL Mode=disable`), see [FASTBCP\_TTU\_PATH](/latest/documentation/environment-variables/fastbcp-ttu-path.md) and [Connection Parameters](/latest/documentation/cli/connection_parameters.md#adbc_teradata). tip Build your command with the [Doc Wizard](/latest/wizard.md) Related * [Connection Parameters](/latest/documentation/cli/connection_parameters.md)connection types, providers and ADBC connection strings * [Parallel Parameters](/latest/documentation/cli/parallel_parameters.md)parallel methods, degree and distribute key column * [FASTBCP\_​TTU\_​PATH](/latest/documentation/environment-variables/fastbcp-ttu-path.md)legacy-port logon for `adbc_teradata` * [![](/img/logos/sap.svg)SAP HANA datatype mappings](/latest/datatypes-conversion/saphana/parquet.md)how SAP HANA types map to Parquet * [![](/img/logos/teradata.svg)Teradata datatype mappings](/latest/datatypes-conversion/teradata/parquet.md)how Teradata types map to Parquet --- # Output Formats Examples demonstrating different output formats supported by FastBCP. The extension of `--fileoutput` in the examples below matches the format. CSV * File`.csv` * Formatstandard comma/delimiter-separated values Parquet * File`.parquet` * Formatcolumnar storage optimized for analytical queries Excel * File`.xlsx` * FormatMicrosoft Excel ## CSV Format[​](#csv-format "Direct link to CSV Format") Standard comma/delimiter-separated values format. ### Basic CSV Export[​](#basic-csv-export "Direct link to Basic CSV Export") ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Sales" ` --directory "C:\temp" ` --fileoutput "sales.csv" ` --decimalseparator "." ` --delimiter "," ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` ### CSV with Custom Delimiter[​](#csv-with-custom-delimiter "Direct link to CSV with Custom Delimiter") Using pipe delimiter for better data separation: ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Sales" ` --directory "C:\temp" ` --fileoutput "sales.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "sale_id" ` --paralleldegree 8 ` --merge "False" ``` ### CSV with European Format[​](#csv-with-european-format "Direct link to CSV with European Format") Using comma as decimal separator (common in European countries): ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Sales" ` --directory "C:\temp" ` --fileoutput "sales_european.csv" ` --decimalseparator "," ` --delimiter ";" ` --dateformat "dd/MM/yyyy HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "sale_id" ` --paralleldegree 8 ` --merge "False" ``` ## Parquet Format[​](#parquet-format "Direct link to Parquet Format") Columnar storage format optimized for analytical queries. ### Basic Parquet Export[​](#basic-parquet-export "Direct link to Basic Parquet Export") ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Sales" ` --directory "C:\temp" ` --fileoutput "sales.parquet" ` --parallelmethod "None" ``` ### Parallel Parquet Export[​](#parallel-parquet-export "Direct link to Parallel Parquet Export") Maximize performance with parallel execution: ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Sales" ` --directory "C:\temp" ` --fileoutput "sales.parquet" ` --parallelmethod "RangeId" ` --distributekeycolumn "sale_id" ` --paralleldegree 12 ` --merge "False" ``` ### Parquet with PostgreSQL[​](#parquet-with-postgresql "Direct link to Parquet with PostgreSQL") ``` .\FastBCP.exe ` --connectiontype "pgcopy" ` --server "localhost" ` --port "5432" ` --database "salesdb" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "sales" ` --directory "C:\temp" ` --fileoutput "pg_sales.parquet" ` --parallelmethod "Physical" ` --paralleldegree 10 ` --merge "False" ``` ### Parquet with Oracle[​](#parquet-with-oracle "Direct link to Parquet with Oracle") ``` .\FastBCP.exe ` --connectiontype "oraodp" ` --server "localhost:1521/ORCLPDB1" ` --user "system" ` --password "password" ` --sourceschema "SYSTEM" ` --sourcetable "SALES" ` --directory "C:\temp" ` --fileoutput "oracle_sales.parquet" ` --parallelmethod "Physical" ` --paralleldegree 8 ` --merge "False" ``` ## Excel Format[​](#excel-format "Direct link to Excel Format") Export data to Microsoft Excel format (.xlsx). Good to know Excel exports automatically format data for spreadsheet applications. Large datasets may be split across multiple sheets if they exceed Excel's row limits. ### Basic Excel Export[​](#basic-excel-export "Direct link to Basic Excel Export") ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Sales" ` --directory "C:\temp" ` --fileoutput "sales.xlsx" ` --parallelmethod "None" ``` ### Parallel Excel Export[​](#parallel-excel-export "Direct link to Parallel Excel Export") ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --sourceschema "dbo" ` --sourcetable "Sales" ` --directory "C:\temp" ` --fileoutput "sales.xlsx" ` --parallelmethod "RangeId" ` --distributekeycolumn "sale_id" ` --paralleldegree 6 ` --merge "False" ``` ### Excel with Custom Query[​](#excel-with-custom-query "Direct link to Excel with Custom Query") Export filtered data to Excel: ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "SalesDB" ` --trusted ` --query "SELECT * FROM dbo.Sales WHERE sale_date >= '2024-01-01' AND sale_date < '2025-01-01'" ` --directory "C:\temp" ` --fileoutput "sales_2024.xlsx" ` --parallelmethod "Ntile" ` --distributekeycolumn "sale_id" ` --paralleldegree 4 ` --merge "False" ``` tip Build your command with the [Doc Wizard](/latest/wizard.md) Related * [CSV Formatting](/latest/documentation/cli/csv_formatting.md)delimiter, quotes, date format, decimal separator, header and booleans * [Parquet Formatting](/latest/documentation/cli/parquet_formatting.md)compression and row group size * [Output Info](/latest/documentation/cli/output_info.md)directory, output file, tokens and encoding * [Datatypes Conversion](/latest/datatypes-conversion/overview.md)how source types map to Parquet --- # PostgreSQL Examples Comprehensive examples for exporting data from PostgreSQL using native connectors (pgsql, pgcopy). ## Connection Types[​](#connection-types "Direct link to Connection Types") PostgreSQL exports support three connection types. Most examples below show `pgsql` and `pgcopy` side by side in tabs. pgsql * ProtocolStandard PostgreSQL protocol pgcopyFastest for bulk exports * ProtocolPostgreSQL COPY protocol adbc\_pgsqlUltra-fast * ProtocolADBC FastDriver * OutputParquet only (see [ADBC Examples](#adbc-examples)) Good to know The `adbc_pgsql` connection type uses the Arpe.io ADBC FastDriver for ultra-fast, Arrow-native Parquet exports. Output is Parquet-only — see the [ADBC Examples](#adbc-examples) section below. ## Single-threaded Export[​](#single-threaded-export "Direct link to Single-threaded Export") Simple export without parallelization. * Standard Protocol * COPY Protocol ``` .\FastBCP.exe ` --connectiontype "pgsql" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --query "SELECT * FROM lineitem LIMIT 1000" ` --directory "C:\temp" ` --fileoutput "pg_lineitem.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` ``` .\FastBCP.exe ` --connectiontype "pgcopy" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --query "SELECT * FROM lineitem LIMIT 1000" ` --directory "C:\temp" ` --fileoutput "pg_lineitem.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` ## Parallel Export - Random Method[​](#parallel-export---random-method "Direct link to Parallel Export - Random Method") Export using Random distribution with modulo operation. * Standard Protocol * COPY Protocol ``` .\FastBCP.exe ` --connectiontype "pgsql" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --query "SELECT * FROM lineitem" ` --directory "C:\temp" ` --fileoutput "pg_lineitem_random.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "l_linenumber" ` --paralleldegree 8 ` --merge "False" ` --runid "pgsql_to_csv_parallel8_random" ``` ``` .\FastBCP.exe ` --connectiontype "pgcopy" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --query "SELECT * FROM lineitem" ` --directory "C:\temp" ` --fileoutput "pg_lineitem_random.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "l_linenumber" ` --paralleldegree 8 ` --merge "False" ` --runid "pgcopy_to_csv_parallel8_random" ``` ## Parallel Export - DataDriven Method[​](#parallel-export---datadriven-method "Direct link to Parallel Export - DataDriven Method") Export using DataDriven distribution based on distinct column values. * Standard Protocol * COPY Protocol ``` .\FastBCP.exe ` --connectiontype "pgsql" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "lineitem" ` --directory "C:\temp" ` --fileoutput "pg_lineitem_dd.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "DataDriven" ` --distributekeycolumn "l_shipmode" ` --paralleldegree 10 ` --merge "False" ` --runid "pgsql_to_csv_parallel10_datadriven" ``` ``` .\FastBCP.exe ` --connectiontype "pgcopy" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "lineitem" ` --directory "C:\temp" ` --fileoutput "pg_lineitem_dd.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "DataDriven" ` --distributekeycolumn "l_shipmode" ` --paralleldegree 10 ` --merge "False" ` --runid "pgcopy_to_csv_parallel10_datadriven" ``` ## Parallel Export - Ntile Method[​](#parallel-export---ntile-method "Direct link to Parallel Export - Ntile Method") Export using Ntile for evenly distributed chunks. * Standard Protocol * COPY Protocol **Full table:** ``` .\FastBCP.exe ` --connectiontype "pgsql" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "lineitem" ` --directory "C:\temp" ` --fileoutput "pg_lineitem_ntile.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Ntile" ` --distributekeycolumn "l_orderkey" ` --paralleldegree 12 ` --merge "False" ` --runid "pgsql_to_csv_parallel12_ntile" ``` **With query filter:** ``` .\FastBCP.exe ` --connectiontype "pgsql" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --query "SELECT * FROM lineitem WHERE l_shipdate BETWEEN '1995-01-01' AND '1995-12-31'" ` --directory "C:\temp" ` --fileoutput "pg_lineitem_ntile.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Ntile" ` --distributekeycolumn "l_orderkey" ` --paralleldegree 12 ` --merge "False" ` --runid "pgsql_to_csv_parallel12_ntile_filtered" ``` **Full table:** ``` .\FastBCP.exe ` --connectiontype "pgcopy" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "lineitem" ` --directory "C:\temp" ` --fileoutput "pg_lineitem_ntile.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Ntile" ` --distributekeycolumn "l_orderkey" ` --paralleldegree 12 ` --merge "False" ` --runid "pgcopy_to_csv_parallel12_ntile" ``` **With query filter:** ``` .\FastBCP.exe ` --connectiontype "pgcopy" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --query "SELECT * FROM lineitem WHERE l_shipdate BETWEEN '1995-01-01' AND '1995-12-31'" ` --directory "C:\temp" ` --fileoutput "pg_lineitem_ntile.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Ntile" ` --distributekeycolumn "l_orderkey" ` --paralleldegree 12 ` --merge "False" ` --runid "pgcopy_to_csv_parallel12_ntile_filtered" ``` ## Parallel Export - Physical Method[​](#parallel-export---physical-method "Direct link to Parallel Export - Physical Method") Parallel export using the physical row identifier (ctid). Good to know **Physical on PostgreSQL**: with a PostgreSQL connection type (`pgsql`, `pgcopy`, `adbc_pgsql`), the `Physical` method resolves to the ctid strategy (formerly `--parallelmethod Ctid`, now deprecated). It is very efficient for full table exports and does not require a distribute key column. `--sourceschema` and `--sourcetable` are required. * Standard Protocol * COPY Protocol ``` .\FastBCP.exe ` --connectiontype "pgsql" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "lineitem" ` --directory "C:\temp" ` --fileoutput "pg_lineitem_physical.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Physical" ` --paralleldegree 8 ` --merge "False" ` --runid "pgsql_to_csv_parallel8_physical" ``` ``` .\FastBCP.exe ` --connectiontype "pgcopy" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "lineitem" ` --directory "C:\temp" ` --fileoutput "pg_lineitem_physical.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Physical" ` --paralleldegree 8 ` --merge "False" ` --runid "pgcopy_to_csv_parallel8_physical" ``` ## Export to Parquet[​](#export-to-parquet "Direct link to Export to Parquet") Export PostgreSQL data to Parquet format. * Standard Protocol * COPY Protocol **Single-threaded:** ``` .\FastBCP.exe ` --connectiontype "pgsql" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "lineitem" ` --directory "C:\temp" ` --fileoutput "pg_lineitem.parquet" ` --parallelmethod "None" ``` **Parallel with Physical (Ctid):** ``` .\FastBCP.exe ` --connectiontype "pgsql" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "lineitem" ` --directory "C:\temp" ` --fileoutput "pg_lineitem.parquet" ` --parallelmethod "Physical" ` --paralleldegree 10 ` --merge "False" ``` **Single-threaded:** ``` .\FastBCP.exe ` --connectiontype "pgcopy" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "lineitem" ` --directory "C:\temp" ` --fileoutput "pg_lineitem.parquet" ` --parallelmethod "None" ``` **Parallel with Physical (Ctid):** ``` .\FastBCP.exe ` --connectiontype "pgcopy" ` --server "localhost" ` --port "5432" ` --database "postgres" ` --user "postgres" ` --password "postgres" ` --sourceschema "public" ` --sourcetable "lineitem" ` --directory "C:\temp" ` --fileoutput "pg_lineitem.parquet" ` --parallelmethod "Physical" ` --paralleldegree 10 ` --merge "False" ``` ## ODBC Connection[​](#odbc-connection "Direct link to ODBC Connection") Using ODBC DSN for PostgreSQL connection. **Single-threaded:** ``` .\FastBCP.exe ` --connectiontype "odbc" ` --dsn "PostgreSQL_DSN" ` --directory "C:\temp" ` --fileoutput "pg_test.csv" ` --query "SELECT * FROM public.test_table" ` --parallelmethod "None" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ``` **Parallel Random:** ``` .\FastBCP.exe ` --connectiontype "odbc" ` --dsn "PostgreSQL_DSN" ` --directory "C:\temp" ` --fileoutput "pg_test.csv" ` --query "SELECT * FROM public.test_table" ` --parallelmethod "Random" ` --distributekeycolumn "id" ` --paralleldegree 6 ` --merge "False" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ``` **Parallel DataDriven:** ``` .\FastBCP.exe ` --connectiontype "odbc" ` --dsn "PostgreSQL_DSN" ` --directory "C:\temp" ` --fileoutput "pg_test.csv" ` --query "SELECT * FROM public.test_table" ` --parallelmethod "DataDriven" ` --distributekeycolumn "category" ` --paralleldegree 6 ` --merge "False" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ``` ## ADBC Examples[​](#adbc-examples "Direct link to ADBC Examples") The `adbc_pgsql` connection type uses the Arpe.io ADBC FastDriver for ultra-fast, Arrow-native exports. **Output is Parquet-only** — see [Connection Parameters](/latest/documentation/cli/connection_parameters.md#connection-type) for details. ``` ./FastBCP \ --connectiontype "adbc_pgsql" \ --server "localhost:5432" \ --user "pytabextract_pguser" \ --password "FastPassword" \ --database "tpch" \ --sourceschema "tpch10" \ --sourcetable "lineitem" \ --directory "./" \ --fileoutput "{sourcetable}.parquet" \ --method "None" ``` tip Build your command with the [Doc Wizard](/latest/wizard.md) Related * [Connection Parameters](/latest/documentation/cli/connection_parameters.md)connection types, authentication and connection strings * [Parallel Parameters](/latest/documentation/cli/parallel_parameters.md)parallel methods, degree and distribute key column * [![](/img/logos/postgresql.svg)PostgreSQL datatype mappings](/latest/datatypes-conversion/postgresql/parquet.md)`pgsql` types mapped to Parquet * [![](/img/logos/postgresql.svg)PostgreSQL COPY datatype mappings](/latest/datatypes-conversion/postgresql-copy/parquet.md)`pgcopy` types mapped to Parquet --- # SQL Server Examples Comprehensive examples for exporting data from SQL Server (MSSQL, OLEDB, ODBC), from a single-threaded export to each parallel method, Parquet output, ADBC and SQL Server backup files. Good to know SQL Server also supports the `adbc_mssql` connection type, powered by the Arpe.io ADBC FastDriver for ultra-fast, Arrow-native Parquet exports. Output is Parquet-only — see the [ADBC Examples](#adbc-examples) section below. ## Single-threaded Export[​](#single-threaded-export "Direct link to Single-threaded Export") Simple export without parallelization for smaller datasets. ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "FASTExportData" ` --trusted ` --query "SELECT top 1000 * FROM dbo.TEST_71_1M_12m" ` --directory "C:\temp" ` --fileoutput "TEST1000.csv" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "None" ``` ## Parallel Export - Random Method[​](#parallel-export---random-method "Direct link to Parallel Export - Random Method") Export using Random distribution based on modulo operation. * Windows Authentication * SQL Authentication ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "FASTExportData" ` --trusted ` --query "SELECT * FROM dbo.TEST_71_1M_12m" ` --directory "C:\temp" ` --fileoutput "TEST_71c_1Mr.csv" ` --decimalseparator "," ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "ID_ARTICLE" ` --paralleldegree 8 ` --merge "False" ` --runid "mssql_to_csv_parallel8_random" ``` ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "FASTExportData" ` --user "FastUser" ` --password "FastPassword" ` --query "SELECT * FROM dbo.TEST_71_1M_12m" ` --directory "C:\temp" ` --fileoutput "TEST_71c_1Mr.csv" ` --decimalseparator "," ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Random" ` --distributekeycolumn "ID_ARTICLE" ` --paralleldegree 8 ` --merge "False" ` --runid "mssql_to_csv_parallel8_random" ``` ## Parallel Export - Physical Method[​](#parallel-export---physical-method "Direct link to Parallel Export - Physical Method") Parallel export using the physical row location (`%%physloc%%`), without a distribute key column. Good to know **Physical on SQL Server**: with a SQL Server connection type (`mssql`, `msoledbsql`, `adbc_mssql`), the `Physical` method resolves to the Physloc strategy (formerly `--parallelmethod Physloc`, now deprecated). `--sourceschema` and `--sourcetable` are required. On a clustered columnstore table, FastBCP detects it and splits on the columnstore row id. ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "tpch10_collation_bin2" ` --trusted ` --sourceschema "dbo" ` --sourcetable "orders" ` --directory "D:\temp" ` --fileoutput "mssql_orders.parquet" ` --parallelmethod "Physical" ` --paralleldegree -2 ` --merge "False" ` --runid "mssql_to_parquet_parallel-2_physical" ``` ## Parallel Export - RangeId Method[​](#parallel-export---rangeid-method "Direct link to Parallel Export - RangeId Method") Export using RangeId distribution for evenly distributed integer keys. **Using table name:** ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "tpch10_collation_bin2" ` --trusted ` --sourceschema "dbo" ` --sourcetable "orders" ` --directory "D:\temp" ` --fileoutput "mssql_orders.csv" ` --decimalseparator "," ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "RangeId" ` --distributekeycolumn "o_orderkey" ` --paralleldegree -2 ` --merge "False" ` --runid "mssql_to_csv_parallel-2_rangeid" ``` **Using query with filter:** ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "tpch10_collation_bin2" ` --trusted ` --query "select * from orders WHERE o_orderdate between '19950101' and '19951231'" ` --directory "D:\temp" ` --fileoutput "mssql_orders.csv" ` --decimalseparator "," ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "RangeId" ` --distributekeycolumn "o_orderkey" ` --paralleldegree -2 ` --merge "False" ` --runid "mssql_to_csv_parallel-2_rangeid_using_query" ``` ## Parallel Export - Ntile Method[​](#parallel-export---ntile-method "Direct link to Parallel Export - Ntile Method") Export using Ntile distribution for evenly distributed chunks. **Full table export:** ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "tpch10_collation_bin2" ` --trusted ` --sourceschema "dbo" ` --sourcetable "orders" ` --directory "D:\temp" ` --fileoutput "mssql_orders.csv" ` --decimalseparator "," ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Ntile" ` --distributekeycolumn "o_orderkey" ` --paralleldegree 12 ` --merge "False" ` --runid "mssql_to_csv_parallel12_Ntile" ``` **Filtered export with date column:** ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "tpch10_collation_bin2" ` --trusted ` --query "select * from orders WHERE o_orderdate between '19950101' and '19951231'" ` --directory "D:\temp" ` --fileoutput "mssql_orders.csv" ` --decimalseparator "," ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "Ntile" ` --distributekeycolumn "o_orderdate" ` --paralleldegree 12 ` --merge "False" ` --runid "mssql_to_csv_parallel12_Ntile_using_query" ``` ## Parallel Export - DataDriven Method[​](#parallel-export---datadriven-method "Direct link to Parallel Export - DataDriven Method") Export using DataDriven distribution based on distinct values of a column. **Using partition function:** ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "tpch10_collation_bin2" ` --directory "D:\temp" ` --fileoutput "mssql_orders.csv" ` --trusted ` --sourceschema "dbo" ` --sourcetable "orders_part" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --parallelmethod "DataDriven" ` --distributekeycolumn "`$partition.PF_DATE(o_orderdate)" ` --merge "False" ` --paralleldegree 10 ``` ## Export to Parquet[​](#export-to-parquet "Direct link to Export to Parquet") Export SQL Server data to Parquet format. **Single-threaded:** ``` .\FastBCP.exe ` --connectiontype "mssql" ` --server "localhost" ` --database "faker" ` --trusted ` --sourceschema "dbo" ` --sourcetable "faker_s1000" ` --directory "D:\temp" ` --fileoutput "mssql_faker_s1000.parquet" ` --parallelmethod "None" ` --runid "mssql_to_parquet_NoParallel" ``` **Parallel with RangeId:** ``` .\FastBCP.exe ` --connectiontype "mssql" ` --trusted ` --server "localhost" ` --database "tpch10_collation_bin2" ` --directory "D:\temp" ` --fileoutput "mssql_orders.parquet" ` --parallelmethod "RangeId" ` --distributekeycolumn "o_orderkey" ` --paralleldegree 7 ` --sourceschema "dbo" ` --sourcetable "orders" ` --merge "False" ``` **Parallel with Ntile and query:** ``` .\FastBCP.exe ` --connectiontype "mssql" ` --trusted ` --server "localhost" ` --database "tpch10_collation_bin2" ` --directory "D:\temp" ` --fileoutput "mssql_orders_1995.parquet" ` --parallelmethod "Ntile" ` --distributekeycolumn "o_orderkey" ` --paralleldegree 7 ` --query "select * from dbo.orders where o_orderdate between '1995-01-01' and '1995-12-31'" ` --merge "False" ``` ## OLEDB Connection[​](#oledb-connection "Direct link to OLEDB Connection") Alternative connection method using OLEDB provider. **Single-threaded:** ``` $query="SELECT top 10000 * FROM FASTExportData.dbo.TEST_71_1M_12m" $target="localhost" .\FastBCP.exe ` --connectiontype "oledb" ` --provider "MSOLEDBSQL" ` --server $target ` --directory "C:\temp" ` --fileoutput "TEST.CSV" ` --paralleldegree 1 ` --trusted ` --query $query ` --parallelmethod "None" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ``` **Parallel Random with Windows Auth:** ``` .\FastBCP.exe ` --connectiontype "oledb" ` --provider "MSOLEDBSQL" ` --server $target ` --directory "C:\temp" ` --fileoutput "TEST.CSV" ` --paralleldegree 6 ` --trusted ` --query $query ` --parallelmethod "Random" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --distributekeycolumn "ID_ARTICLE" ` --merge "False" ``` **Parallel Random with SQL Auth:** ``` .\FastBCP.exe ` --connectiontype "oledb" ` --provider "MSOLEDBSQL" ` --server $target ` --directory "C:\temp" ` --fileoutput "TEST.CSV" ` --paralleldegree 6 ` --user "FastUser" ` --password "FastPassword" ` --query $query ` --parallelmethod "Random" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --distributekeycolumn "ID_ARTICLE" ` --merge "False" ``` **Parallel DataDriven:** ``` .\FastBCP.exe ` --connectiontype "oledb" ` --provider "MSOLEDBSQL" ` --server $target ` --directory "C:\temp" ` --fileoutput "TEST.CSV" ` --paralleldegree 6 ` --trusted ` --query $query ` --parallelmethod "DataDriven" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --distributekeycolumn "ID_DECOUPE_GEO" ` --merge "False" ``` ## ODBC Connection[​](#odbc-connection "Direct link to ODBC Connection") Using ODBC DSN for connection. **Single-threaded:** ``` .\FastBCP.exe ` --connectiontype "odbc" ` --dsn "DSN4FastBCP" ` --directory "C:\temp" ` --fileoutput "TEST.CSV" ` --paralleldegree 1 ` --trusted ` --query "SELECT * FROM [TEST_71_1M_12m]" ` --parallelmethod "None" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ``` **Parallel Random with Windows Auth:** ``` .\FastBCP.exe ` --connectiontype "odbc" ` --dsn "DSN4FastBCP" ` --directory "C:\temp" ` --fileoutput "TEST.CSV" ` --paralleldegree 6 ` --trusted ` --query "SELECT * FROM [TEST_71_1M_12m]" ` --parallelmethod "Random" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --distributekeycolumn "ID_ARTICLE" ` --merge "False" ``` **Parallel Random with SQL Auth:** ``` .\FastBCP.exe ` --connectiontype "odbc" ` --dsn "DSN4FastBCP" ` --directory "C:\temp" ` --fileoutput "TEST.CSV" ` --paralleldegree 6 ` --user "FastUser" ` --password "FastPassword" ` --query "SELECT * FROM [TEST_71_1M_12m]" ` --parallelmethod "Random" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --distributekeycolumn "ID_ARTICLE" ` --merge "False" ``` **Parallel DataDriven:** ``` .\FastBCP.exe ` --connectiontype "odbc" ` --dsn "DSN4FastBCP" ` --directory "C:\temp" ` --fileoutput "TEST.CSV" ` --paralleldegree 6 ` --trusted ` --query "SELECT * FROM [TEST_71_1M_12m]" ` --parallelmethod "DataDriven" ` --decimalseparator "." ` --delimiter "|" ` --dateformat "yyyy-MM-dd HH:mm:ss" ` --encoding "UTF-8" ` --distributekeycolumn "ID_GEO" ` --merge "False" ``` ## ADBC Examples[​](#adbc-examples "Direct link to ADBC Examples") The `adbc_mssql` connection type uses the Arpe.io ADBC FastDriver for ultra-fast, Arrow-native exports. **Output is Parquet-only** — see [Connection Parameters](/latest/documentation/cli/connection_parameters.md#connection-type) for details. **Single-threaded export:** ``` ./FastBCP \ --connectiontype "adbc_mssql" \ --server "localhost,1433" \ --database "tpch" \ --user "migadmin" \ --password "FastPassword" \ --sourceschema "tpch10" \ --sourcetable "lineitem" \ --directory "./" \ --fileoutput "{sourcetable}.parquet" \ --method "None" ``` **Parallel export with RangeId and license file:** ``` .\FastBCP.exe ` --connectiontype "adbc_mssql" ` --server "localhost" ` --trusted ` --database "TPCH_SF100_NOBACKUP" ` --sourceschema "dbo" ` --sourcetable "lineitem_ci" ` --fileoutput "{sourcetable}.parquet" ` --directory "B:\export\{sourcetable}\" ` --parquetcompression "None" ` --parallelmethod "RangeId" ` --distributekeycolumn "l_orderkey" ` --degree 32 ` --runid "1.2.0" ` --licence "C:\Sources\FastBCP\FastBCP_AetP.lic" ``` ## SQL Server Backup Files (backup\_mssql)[​](#sql-server-backup-files-backup_mssql "Direct link to SQL Server Backup Files (backup_mssql)") The `backup_mssql` connection type reads a table straight from SQL Server **full and differential backups** (`.bak`), without restoring them and without a SQL Server instance. `--server` is the directory of the backups and `--database` the backup files. **Output is Parquet-only** — see [SQL Server backup files](/latest/documentation/cli/connection_parameters.md#sql-server-backup-files-backup_mssql) for what is supported. **One backup file, parallel export (Physical resolves to Pages):** * Windows * Linux ``` .\FastBCP.exe ` --connectiontype "backup_mssql" ` --server "D:\Backups\MSSQL" ` --database "tpch_full.bak" ` --sourceschema "dbo" ` --sourcetable "orders" ` --directory "D:\export\{sourcetable}" ` --fileoutput "{sourcetable}.parquet" ` --parallelmethod "Physical" ` --paralleldegree 8 ``` ``` ./FastBCP \ --connectiontype "backup_mssql" \ --server "/var/opt/mssql/backup" \ --database "tpch_full.bak" \ --sourceschema "dbo" \ --sourcetable "orders" \ --directory "/export/{sourcetable}" \ --fileoutput "{sourcetable}.parquet" \ --parallelmethod "Physical" \ --paralleldegree 8 ``` **Striped backup** (`BACKUP DATABASE tpch TO DISK = 'tpch_1.bak', DISK = 'tpch_2.bak', DISK = 'tpch_3.bak'`): a pattern matching the stripes, or the stripes separated by `;`, in any order: ``` ./FastBCP \ --connectiontype "backup_mssql" \ --server "/var/opt/mssql/backup" \ --database "tpch_*.bak" \ --sourceschema "dbo" \ --sourcetable "lineitem" \ --directory "/export/lineitem" \ --fileoutput "lineitem.parquet" \ --parallelmethod "Physical" \ --paralleldegree 8 ``` ``` --database "tpch_1.bak;tpch_2.bak;tpch_3.bak" ``` **A query on one table** (column list, no filter: `SELECT * | columns FROM [schema.]table`): ``` .\FastBCP.exe ` --connectiontype "backup_mssql" ` --server "D:\Backups\MSSQL" ` --database "sales_full.bak" ` --query "SELECT OrderID, CustomerID, OrderDate FROM Sales.Orders" ` --directory "D:\export\orders" ` --fileoutput "orders.parquet" ``` **An encrypted backup** (`WITH ENCRYPTION`, or a TDE database): the private key of the server certificate, and its password if it has one (since FastBCP 1.6.6): * Windows * Linux ``` .\FastBCP.exe ` --connectiontype "backup_mssql" ` --server "D:\Backups\MSSQL" ` --database "sales_encrypted.bak" ` --sourceuser "D:\Secure\Keys\MyCert.pvk" ` --sourcepassword "KeyPassword" ` --sourceschema "dbo" ` --sourcetable "orders" ` --directory "D:\export\orders" ` --fileoutput "orders.parquet" ` --parallelmethod "Physical" ` --paralleldegree 8 ``` ``` ./FastBCP \ --connectiontype "backup_mssql" \ --server "/var/opt/mssql/backup" \ --database "sales_encrypted.bak" \ --sourceuser "/secure/keys/MyCert.pvk" \ --sourcepassword "KeyPassword" \ --sourceschema "dbo" \ --sourcetable "orders" \ --directory "/export/orders" \ --fileoutput "orders.parquet" \ --parallelmethod "Physical" \ --paralleldegree 8 ``` See [Encrypted backups](/latest/documentation/cli/connection_parameters.md#encrypted-backups) for the key formats and how to export the key. **A full backup and its differential:** name both, or a pattern matching them, in any order. The latest version of the table is read, the whole table (since FastBCP 1.6.7): * Windows * Linux ``` .\FastBCP.exe ` --connectiontype "backup_mssql" ` --server "D:\Backups\MSSQL" ` --database "sales_full.bak;sales_diff.bak" ` --sourceschema "dbo" ` --sourcetable "orders" ` --directory "D:\export\orders" ` --fileoutput "orders.parquet" ` --parallelmethod "Physical" ` --paralleldegree 8 ``` ``` ./FastBCP \ --connectiontype "backup_mssql" \ --server "/var/opt/mssql/backup" \ --database "sales_*.bak" \ --sourceschema "dbo" \ --sourcetable "orders" \ --directory "/export/orders" \ --fileoutput "orders.parquet" \ --parallelmethod "Physical" \ --paralleldegree 8 ``` See [Differential backups](/latest/documentation/cli/connection_parameters.md#differential-backups) for what is read, and [Backups that cannot be used](/latest/documentation/cli/connection_parameters.md#backups-that-cannot-be-used) for when an export fails. Good to know A file holding several backups (`WITH NOINIT`) is read at the latest version it holds: its newest full backup, and the newest differential taken from it. tip Build your command with the [Doc Wizard](/latest/wizard.md) Related * [Connection Parameters](/latest/documentation/cli/connection_parameters.md)connection types, authentication and SQL Server backup files * [Parallel Parameters](/latest/documentation/cli/parallel_parameters.md)parallel methods, degree and distribute key column * [![](/img/logos/sqlserver.svg)SQL Server datatype mappings](/latest/datatypes-conversion/mssql/parquet.md)how SQL Server types map to Parquet * [Datatypes Conversion](/latest/datatypes-conversion/overview.md)mappings for every source and connection type --- # Configuration Examples Here are sample configuration files for different logging scenarios: Samples on this page * [FastBCP\_​Settings.json](#fastbcp_settingsjson---sinks-on-console--files-windows-path-style--mssql)Console + Files (Windows path style) + MSSQL * [FastBCP\_​Settings\_​Linux\_​Console\_​Files.json](#fastbcp_settings_linux_console_filesjson)Linux with Console + Daily rolling Files * [FastBCP\_​Settings\_​Map\_​for\_​Windows.json](#fastbcp_settings_map_for_windowsjson)Console and dynamically named log file targets (Windows) * [FastBCP\_​Settings\_​Map\_​for\_​Linux\_​and\_​Container.json](#fastbcp_settings_map_for_linux_and_containerjson)Console and dynamically named log file targets (Linux/Container) * [FastBCP\_​Settings\_​Log\_​to\_​PGSQL.json](#fastbcp_settings_log_to_pgsqljson--console--postgresql-log-database)Console + PostgreSQL log database * [FastBCP\_​Settings\_​OpenTelemetry.json](#fastbcp_settings_opentelemetryjson)Console with trace correlation and OpenTelemetry log export ## FastBCP\_Settings.json : Sinks on Console + Files (Windows path style) + MSSQL[​](#fastbcp_settingsjson---sinks-on-console--files-windows-path-style--mssql "Direct link to FastBCP_Settings.json : Sinks on Console + Files (Windows path style) + MSSQL") For logs with Console + Files stored on Windows machine + MSSQL sinks: ``` { "ConnectionStrings": { "MS_FastBCPLogs": "Server=localhost;Database=FastBCPLogs;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\\FastBCP_.json", "retainedFileCountLimit": 10, "rollingInterval": "Day", "rollOnFileSizeLimit": true } }, { "Name": "MSSqlServer", "Args": { "connectionString": "MS_FastBCPLogs", "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": "FastBCP" } } } ``` ## FastBCP\_Settings\_Linux\_Console\_Files.json[​](#fastbcp_settings_linux_console_filesjson "Direct link to FastBCP_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/FastBCP_.json", "retainedFileCountLimit": 10, "rollingInterval": "Day", "rollOnFileSizeLimit": true } } ], "Enrich": [ "FromLogContext", "WithMachineName", "WithProcessId", "WithThreadId" ], "Properties": { "Application": "FastBCP" } } } ``` ## FastBCP\_Settings\_Map\_for\_Windows.json[​](#fastbcp_settings_map_for_windowsjson "Direct link to FastBCP_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}\\FastBCP-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": "FastBCP" } } } ``` ## FastBCP\_Settings\_Map\_for\_Linux\_and\_Container.json[​](#fastbcp_settings_map_for_linux_and_containerjson "Direct link to FastBCP_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}/FastBCP-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": "FastBCP" } } } ``` ## FastBCP\_Settings\_Log\_to\_PGSQL.json : Console + PostgreSQL log database[​](#fastbcp_settings_log_to_pgsqljson--console--postgresql-log-database "Direct link to FastBCP_Settings_Log_to_PGSQL.json : Console + PostgreSQL log database") ``` { "ConnectionStrings": { "PG_FastBCPLogs": "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_FastBCPLogs", "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": "FastBCP" } } } ``` ## FastBCP\_Settings\_OpenTelemetry.json[​](#fastbcp_settings_opentelemetryjson "Direct link to FastBCP_Settings_OpenTelemetry.json") For Console with trace correlation and OpenTelemetry log export (e.g., to [Jaeger](https://www.jaegertracing.io/)): ``` { "Serilog": { "MinimumLevel": { "Default": "Debug", "Override": { "Microsoft": "Warning", "System": "Warning" } }, "Properties": { "LogDirectory": "logs" }, "Enrich": [ "FromLogContext", "WithEnvironmentUserName", "WithProcessId", "WithThreadId", "WithMachineName", "fulltargetname" ], "WriteTo": [ { "Name": "Console", "Args": { "restrictedToMinimumLevel": "Information", "outputTemplate": "{Timestamp:yyyy-MM-ddTHH:mm:ss.fff zzz} -|- {Application} -|- {Level:u12} -|- {fulltargetname} -|- TraceId={TraceId} SpanId={SpanId} -|- {Message}{NewLine}{Exception}", "theme": "Serilog.Sinks.SystemConsole.Themes.SystemConsoleTheme::Literate, Serilog.Sinks.Console" } }, { "Name": "OpenTelemetry", "Args": { "Endpoint": "http://localhost:4317", "Protocol": "Grpc", "ResourceAttributes": { "service.name": "FastBCP", "deployment.environment": "local-test" } } } ] } } ``` Usage with the `--traceparent` parameter to correlate with an upstream caller: ``` ./FastBCP \ --connectiontype mssql \ --server localhost \ --database "tpch10" \ --trusted \ --query "SELECT * FROM dbo.orders" \ --directory "/data/temp" \ --fileoutput "orders.csv" \ --traceparent "00-abcdef1234567890abcdef1234567890-1234567890abcdef-01" \ --settingsfile "/config/FastBCP_Settings_OpenTelemetry.json" ``` **Result in Jaeger UI:** ![FastBCP OpenTelemetry result in Jaeger UI](/assets/images/FastBCP_OpenTelemetry_result_sample-729a1de4f4ccde92a0856f3f4e8b9468.jpg) --- # Log Database FastBCP 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 `FastBCP_settings.json` * You can specify a custom settings file using the `--settingsfile` parameter Good to know * **The log table is created automatically if it does not exist, but it is not indexed.** It is up to you to choose the column(s) you prefer to index. We advise indexing the `event_timestamp` and `run_id` columns. * There is no internal purge of the log table: it is up to you to decide when and how to filter the log table. warning **If the database is not reachable, FastBCP will fail and will refuse to continue.** If you want to continue without logging in the database, you can rename the `FastBCP_settings.json` file to something else (like `FastBCP_settings.json.save`) and FastBCP will use the console log only. Configuration examples Complete configuration examples for both MSSQL and PostgreSQL * [Console + Files + MSSQL](/latest/documentation/logging/examples.md#fastbcp_settingsjson---sinks-on-console--files-windows-path-style--mssql)`FastBCP_Settings.json`, Windows path style * [Console + PostgreSQL log database](/latest/documentation/logging/examples.md#fastbcp_settings_log_to_pgsqljson--console--postgresql-log-database)`FastBCP_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 `FastBCP_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}/FastBCP-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: | 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 generated at runtime | Complete configuration examples For both Windows and Linux * [FastBCP\_​Settings\_​Map\_​for\_​Windows.json](/latest/documentation/logging/examples.md#fastbcp_settings_map_for_windowsjson)Windows * [FastBCP\_​Settings\_​Map\_​for\_​Linux\_​and\_​Container.json](/latest/documentation/logging/examples.md#fastbcp_settings_map_for_linux_and_containerjson)Linux/Container --- # Log Levels FastBCP 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") 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. CRITICAL `Critical`: severe errors causing termination. Use case: fatal application errors. ## Configuration[​](#configuration "Direct link to Configuration") You can also configure the log level in the `FastBCP_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\\FastBCP_.json", "rollingInterval": "Day" } } ] } } ``` --- # OpenTelemetry FastBCP supports [OpenTelemetry](https://opentelemetry.io/) for distributed tracing and log correlation. This allows you to correlate FastBCP operations with upstream callers (orchestrators, APIs, pipelines) and export structured logs to any OpenTelemetry-compatible backend such as [Jaeger](https://www.jaegertracing.io/), [Zipkin](https://zipkin.io/), or [Grafana Tempo](https://grafana.com/oss/tempo/). ## The `--traceparent` Parameter[​](#the---traceparent-parameter "Direct link to the---traceparent-parameter") The `--traceparent` parameter accepts a [W3C Trace Context](https://www.w3.org/TR/trace-context/) traceparent identifier. When provided, FastBCP uses this trace context to link its internal spans and logs to the calling system's trace, enabling end-to-end distributed tracing. **Syntax:** * Long form only: `--traceparent ""` **Format:** The traceparent value follows the W3C Trace Context specification: ``` {version}-{trace-id}-{parent-id}-{trace-flags} ``` | Field | Format | Description | | --------------- | ------------- | --------------------------------------------- | | **version** | 2 hex digits | Version of the trace context (currently `00`) | | **trace-id** | 32 hex digits | Globally unique trace identifier | | **parent-id** | 16 hex digits | Identifier of the calling span | | **trace-flags** | 2 hex digits | Trace flags (e.g., `01` for sampled) | **Example:** * Windows * Linux ``` .\FastBCP.exe ` ... --traceparent "00-abcdef1234567890abcdef1234567890-1234567890abcdef-01" ` ... ``` ``` ./FastBCP \ ... --traceparent "00-abcdef1234567890abcdef1234567890-1234567890abcdef-01" \ ... ``` Tips Pass the traceparent from your orchestrator (Airflow, Kestra, CI/CD pipeline, or any OpenTelemetry-instrumented caller) so that FastBCP operations appear as child spans in your distributed traces. ## Configuring the OpenTelemetry Endpoint[​](#configuring-the-opentelemetry-endpoint "Direct link to Configuring the OpenTelemetry Endpoint") FastBCP uses the Serilog OpenTelemetry sink to export logs. You can configure the endpoint using either **environment variables** or a **`FastBCP_Settings.json`** file. ### Using Environment Variables[​](#using-environment-variables "Direct link to Using Environment Variables") Set the `OTEL_EXPORTER_OTLP_ENDPOINT` environment variable to point to your OpenTelemetry collector: * Windows * Linux ``` $env:OTEL_EXPORTER_OTLP_ENDPOINT = "http://localhost:4317" ``` ``` export OTEL_EXPORTER_OTLP_ENDPOINT="http://localhost:4317" ``` ### Using `FastBCP_Settings.json`[​](#using-fastbcp_settingsjson "Direct link to using-fastbcp_settingsjson") Add the OpenTelemetry sink to the `WriteTo` section of your `FastBCP_Settings.json` file. This gives you full control over the protocol, endpoint, and resource attributes. ``` { "Serilog": { "MinimumLevel": { "Default": "Debug", "Override": { "Microsoft": "Warning", "System": "Warning" } }, "Properties": { "LogDirectory": "logs" }, "Enrich": [ "FromLogContext", "WithEnvironmentUserName", "WithProcessId", "WithThreadId", "WithMachineName", "fulltargetname" ], "WriteTo": [ { "Name": "Console", "Args": { "restrictedToMinimumLevel": "Information", "outputTemplate": "{Timestamp:yyyy-MM-ddTHH:mm:ss.fff zzz} -|- {Application} -|- {Level:u12} -|- {fulltargetname} -|- TraceId={TraceId} SpanId={SpanId} -|- {Message}{NewLine}{Exception}", "theme": "Serilog.Sinks.SystemConsole.Themes.SystemConsoleTheme::Literate, Serilog.Sinks.Console" } }, { "Name": "OpenTelemetry", "Args": { "Endpoint": "http://localhost:4317", "Protocol": "Grpc", "ResourceAttributes": { "service.name": "FastBCP", "deployment.environment": "local-test" } } } ] } } ``` **Key settings in the OpenTelemetry sink:** | Setting | Description | | ---------------------- | ----------------------------------------------------------------------------- | | **Endpoint** | URL of your OpenTelemetry collector (default: `http://localhost:4317`) | | **Protocol** | Transport protocol: `Grpc` (default) or `HttpProtobuf` | | **ResourceAttributes** | Key-value pairs attached to every log entry (e.g., service name, environment) | Good to know The `TraceId` and `SpanId` fields in the console output template allow you to see trace correlation directly in the console logs, even without an OpenTelemetry backend. Good to know When both an environment variable and a `FastBCP_Settings.json` configuration are present, the settings file takes precedence for the OpenTelemetry sink configuration. See also * [FastBCP\_​Settings\_​OpenTelemetry.json](/latest/documentation/logging/examples.md#fastbcp_settings_opentelemetryjson)complete sample with trace correlation and OpenTelemetry log export, and the result in Jaeger UI --- # Logging Overview ## Parameter Logs targets using FastBCP\_settings.json[​](#parameter-logs-targets-using-fastbcp_settingsjson "Direct link to Parameter Logs targets using FastBCP_settings.json") FastBCP can log information in 3 modes. It also supports OpenTelemetry for distributed tracing and log export to any OpenTelemetry-compatible backend. 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 * [OpenTelemetry](/latest/documentation/logging/OpenTelemetry.md)distributed tracing and log export to any OpenTelemetry-compatible backend Tips You can use several targets (sinks) at the same time. You can adapt what and where you want to log using the `FastBCP_settings.json` file. By default, if no custom path is provided, FastBCP looks for the settings file in: * the current directory (the working directory) * the same directory where the FastBCP executable is located (the executable directory). If this file is not present, FastBCP will use the console log only. You can specify a custom path to the settings file using the `--settingsfile` parameter (short form `-f`). * Windows * Linux ``` .\FastBCP.exe ` --connectiontype mssql ` --server localhost ` --database "tpch10_collation_bin2" ` --trusted ` --query "SELECT * FROM dbo.orders" ` --directory "D:\temp" ` --fileoutput "mssql_orders.csv" ` --parallelmethod Ntile ` --distributekeycolumn "o_orderkey" ` --paralleldegree 7 ` --settingsfile "D:\logs\config\FastBCP_settings.json" ``` ``` ./FastBCP \ --connectiontype mssql \ --server localhost \ --database "tpch10_collation_bin2" \ --trusted \ --query "SELECT * FROM dbo.orders" \ --directory "/data/temp" \ --fileoutput "mssql_orders.csv" \ --parallelmethod Ntile \ --distributekeycolumn "o_orderkey" \ --paralleldegree 7 \ --settingsfile "/etc/fastbcp/FastBCP_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 FastBCP, first **[request a trial](https://arpe.io/get-trial?product=FastBCP)** to download the latest version. Once downloaded, unzip FastBCP to a directory of your choice. ``` Expand-Archive -Path .\FastBCP.zip -DestinationPath .\FastBCP ``` You can verify the installation by checking the version: ``` .\FastBCP.exe --version ``` To start using FastBCP, first **[request a trial](https://arpe.io/get-trial?product=FastBCP)** to download the latest version. Once downloaded, unzip FastBCP to a directory of your choice. ``` unzip FastBCP.zip -d FastBCP ``` On **Linux**, you need to give execution rights to the FastBCP binary: ``` chmod +x FastBCP ``` You can verify the installation by checking the version: ``` ./FastBCP --version ``` FastBCP is available as a Docker image on **[Docker Hub](https://hub.docker.com/repository/docker/arpeio/fastbcp/general)**. Pull the latest version: ``` docker pull arpeio/fastbcp ``` Or pull a specific version: ``` docker pull arpeio/fastbcp:v0.0.0 ``` You can verify the installation by checking the version: ``` docker run --rm arpeio/fastbcp:latest --version ``` You are now ready to run FastBCP 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, FastBCP will try to find a `FastBCP.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 FastBCP : | Database | Embedded Drivers | | ------------------------------------------ | ---------------- | | Clickhouse | Supported | | DuckDB | Supported | | IBM Db2 (`adbc_db2`, Parquet, since 1.7.0) | 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 in order to use it with ODBC or OLEDB connection type. --- # Apache Airflow [Apache Airflow](https://airflow.apache.org/) is a powerful open-source platform for developing, scheduling, and monitoring batch-oriented workflows. FastBCP 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 providerWith pip, see [Prerequisites](#prerequisites) 2. 2Create the connectionsSource database and cloud storage, see [Configure Airflow Connections](#configure-airflow-connections) 3. 3Add the DAGA `DockerOperator` task that runs the FastBCP 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") FastBCP provides an official Docker image available on Docker Hub: `arpeio/fastbcp:latest`. * [arpeio/fastbcp on DockerHub](https://hub.docker.com/repository/docker/arpeio/fastbcp/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 FastBCP 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. FastBCP integration requires connections for your source database and cloud storage. 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** | `host.docker.internal` (your database host) | | **Port** | `11433` (your database port) | | **Login** | Your database username (e.g., `FastLogin`) | | **Password** | Your database password | | **Extra** | `{"database":"tpch10"}` | 2. AWS connection (for S3 export) 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 **Amazon Web Services** 4. Configure the connection with the settings below | Field | Value | | ------------------------- | -------------------------------------------------------- | | **Connection Id** | `aws_fastbcp` (or your preferred name) | | **Connection Type** | `Amazon Web Services` (select this from the dropdown) | | **AWS Access Key ID** | Your AWS access key (in the Login field) | | **AWS Secret Access Key** | Your AWS secret key (in the Password field) | | **Extra** | `{"region_name":"eu-west-1"}` (or your preferred region) | Good to know * For ODBC connections, the database name should be specified in the Extra JSON field using `{"database":"your_database_name"}`. * Airflow AWS providers commonly use `region_name` in Extra JSON. Alternatively, you can use `{"region":"eu-west-1"}` or `{"aws_default_region":"eu-west-1"}`. ## 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 FastBCP 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., `fastbcp_orders_mssql_to_s3.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 _mssql_parts(conn_id: str): """ Extract MSSQL connection details from Airflow connection. Expected Airflow connection (using ODBC): - Conn Id: mssql_tpch10 (conn_type: odbc) - Host: host.docker.internal - Port: 11433 - Login/Password: FastLogin / FastPassword - Extra JSON: {"database":"tpch10"} """ c = BaseHook.get_connection(conn_id) host = c.host port = c.port user = c.login pwd = c.password # For ODBC MSSQL, the database is typically stored in Extra JSON # (because the UI may not expose a dedicated "Database" field). db = c.extra_dejson.get("database") or c.schema if not db: raise ValueError( f"Connection '{conn_id}': missing database. Put it in Extra JSON " f'{{"database":"tpch10"}} (recommended for ODBC).' ) return host, port, user, pwd, db def _aws_env(conn_id: str): """ Extract AWS credentials from Airflow connection and map to container env vars. Expected Airflow AWS connection: - Conn Id: aws_fastbcp - Conn Type: Amazon Web Services - Login -> AWS_ACCESS_KEY_ID - Password -> AWS_SECRET_ACCESS_KEY - Extra -> {"region_name":"eu-west-1"} (or your region) Returns a dictionary with: - AWS_ACCESS_KEY_ID - AWS_SECRET_ACCESS_KEY - AWS_DEFAULT_REGION """ c = BaseHook.get_connection(conn_id) # Keys can be in login/password or in Extra JSON access_key = c.login or c.extra_dejson.get("aws_access_key_id") secret_key = c.password or c.extra_dejson.get("aws_secret_access_key") # Airflow AWS providers commonly use "region_name" in Extra JSON region = ( c.extra_dejson.get("region_name") or c.extra_dejson.get("region") or c.extra_dejson.get("aws_default_region") ) missing = [ k for k, v in { "AWS_ACCESS_KEY_ID": access_key, "AWS_SECRET_ACCESS_KEY": secret_key, "AWS_DEFAULT_REGION": region, }.items() if not v ] if missing: raise ValueError( f"Connection '{conn_id}': missing AWS fields: {missing}. " f"Set login/password and add Extra.region_name (or region)." ) return { "AWS_ACCESS_KEY_ID": access_key, "AWS_SECRET_ACCESS_KEY": secret_key, "AWS_DEFAULT_REGION": region, } with DAG( dag_id="fastbcp_export_orders_parquet_to_s3", start_date=datetime(2025, 1, 1), schedule=None, catchup=False, tags=["fastbcp", "mssql", "s3", "docker"], ) as dag: mssql_host, mssql_port, mssql_user, mssql_pwd, mssql_db = _mssql_parts("mssql_tpch10") aws_env = _aws_env("aws_fastbcp") DockerOperator( task_id="export_orders_parquet_to_s3", image="arpeio/fastbcp: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, environment=aws_env, command=[ "--connectiontype", "mssql", "--server", f"{mssql_host},{mssql_port}", "--user", mssql_user, "--password", mssql_pwd, "--database", mssql_db, "--sourceschema", "dbo", "--sourcetable", "orders", "--fileoutput", "orders.parquet", "--directory", "s3://fastbcp-export/orders/parquet", "--parallelmethod", "Ntile", "--paralleldegree", "12", "--distributekeycolumn", "o_orderkey", "--merge", "false", "--nobanner", ], network_mode="bridge", ) ``` ### Key Parameters[​](#key-parameters "Direct link to Key Parameters") `image` Specifies the FastBCP Docker image `docker_url` Docker daemon endpoint `environment` Dictionary of environment variables (AWS credentials in this case) `command` List of FastBCP CLI arguments `auto_remove` Automatically remove the container after successful execution ### Helper Functions Explained[​](#helper-functions-explained "Direct link to Helper Functions Explained") The DAG includes two utility functions: `_mssql_parts(conn_id)` Extracts connection details from an Airflow ODBC connection: * Retrieves host, port, username, and password * Extracts the database name from the Extra JSON field * Returns all components needed to build the FastBCP connection string `_aws_env(conn_id)` Extracts AWS credentials from an Airflow AWS connection and maps them to the environment variables expected by FastBCP: `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY` and `AWS_DEFAULT_REGION`. It supports multiple Extra JSON formats for flexibility. ## Logging[​](#logging "Direct link to Logging") All FastBCP 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., `fastbcp_export_orders_parquet_to_s3`) 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: * FastBCP 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 16:15:37] INFO - Settings file not found in the working directory nor in the executable directory [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.882 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- The "FastBCP_Settings.json" file does not exist. Using default settings. Console Only with loglevel=Information [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.892 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- FastBCP Trial – will expires on "2026‑03‑27" (24 day(s) left). [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.892 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Starting [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- FastBCP Version : "0.29.2.0" Architecture : "X64" - Framework : ".NET 8.0.24" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Internal Trace ID : "5ccea857-1538-4a28-8b1c-cfe5c51fbd43" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Internal Run ID : "5ccea857-1538-4a28-8b1c-cfe5c51fbd43" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- OS : "Debian GNU/Linux 13 (trixie)" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Connection Type : "mssql" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Source SqlInstance : "sql22,1433" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Source Database : "tpch" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Source Schema : "tpch10" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Source Table : "orders" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Trusted Connection : False [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- User : "migadmin" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Output File : "orders.parquet" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Output Directory : /data/parquet [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Degree : 12 [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Distribute Method : "Ntile" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Distribute Column : "o_orderkey" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Decimal Separator : "," [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Delimiter : "|" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Use quotes : False [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Date format: "yyyy-MM-dd" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Encoding : "UTF-8" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- No Header : False [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Timestamped : False [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Boolean Format : "automatic" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Cloud Profile : "" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Application Intent : "ReadOnly" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.906 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- file extension is ".parquet" [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.909 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Encoding used : Unicode (UTF-8) - 65001 - utf-8 [2026-03-02 16:15:37] INFO - 2026-03-02T15:15:37.965 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- 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=FastBCP;Application Intent=ReadOnly" [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.086 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- 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 16:15:38] INFO - 2026-03-02T15:15:38.110 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Get DataTypes with header end : Elapsed=6 ms [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Data Segments Computation Completed in 260 ms [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Distribute Column Type : "Int32" [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 0 : 1 : 1 - 5000001 or "o_orderkey" is null [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 1 : 2 : 5000002 - 10000002 [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 2 : 3 : 10000003 - 15000003 [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 3 : 4 : 15000004 - 20000004 [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 4 : 5 : 20000005 - 25000005 [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 5 : 6 : 25000006 - 30000006 [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 6 : 7 : 30000007 - 35000007 [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 7 : 8 : 35000032 - 40000032 [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 8 : 9 : 40000033 - 45000033 [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 9 : 10 : 45000034 - 50000034 [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 10 : 11 : 50000035 - 55000035 [2026-03-02 16:15:38] INFO - 2026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 11 : 12 : 55000036 - 60000000 [2026-03-02 16:15:46] INFO - 2026-03-02T15:15:46.611 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 002 for o_orderkey between 10000003 and 15000003 into /data/parquet/orders_chunk_002.parquet : 1250001 rows x 9 columns in 8234ms [2026-03-02 16:15:46] INFO - 2026-03-02T15:15:46.611 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 011 for o_orderkey between 55000036 and 60000000 into /data/parquet/orders_chunk_011.parquet : 1249989 rows x 9 columns in 8234ms [2026-03-02 16:15:46] INFO - 2026-03-02T15:15:46.790 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 003 for o_orderkey between 15000004 and 20000004 into /data/parquet/orders_chunk_003.parquet : 1250001 rows x 9 columns in 8413ms [2026-03-02 16:15:46] INFO - 2026-03-02T15:15:46.797 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 005 for o_orderkey between 25000006 and 30000006 into /data/parquet/orders_chunk_005.parquet : 1250001 rows x 9 columns in 8420ms [2026-03-02 16:15:46] INFO - 2026-03-02T15:15:46.936 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 008 for o_orderkey between 40000033 and 45000033 into /data/parquet/orders_chunk_008.parquet : 1250001 rows x 9 columns in 8559ms [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.139 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 010 for o_orderkey between 50000035 and 55000035 into /data/parquet/orders_chunk_010.parquet : 1250001 rows x 9 columns in 8763ms [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.154 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 000 for o_orderkey between 1 and 5000001 into /data/parquet/orders_chunk_000.parquet : 1250001 rows x 9 columns in 8777ms [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.247 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 009 for o_orderkey between 45000034 and 50000034 into /data/parquet/orders_chunk_009.parquet : 1250001 rows x 9 columns in 8870ms [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.308 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 006 for o_orderkey between 30000007 and 35000007 into /data/parquet/orders_chunk_006.parquet : 1250001 rows x 9 columns in 8931ms [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.309 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 001 for o_orderkey between 5000002 and 10000002 into /data/parquet/orders_chunk_001.parquet : 1250001 rows x 9 columns in 8932ms [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.363 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 007 for o_orderkey between 35000032 and 40000032 into /data/parquet/orders_chunk_007.parquet : 1250001 rows x 9 columns in 8986ms [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.366 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 004 for o_orderkey between 20000005 and 25000005 into /data/parquet/orders_chunk_004.parquet : 1250001 rows x 9 columns in 8989ms [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- files generation end : Elapsed=9257 ms - maxdop=12 [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total data rows : 15000000 [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total data columns : 9 [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total cells : 135000000 [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Throughput rows : 1568531 rows/s [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Throughput cells : 14116787 cells/s [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total time : Elapsed=9563 ms [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total data rows : 15000000 [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total data columns : 9 [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total cells : 135000000 [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Final Throughput rows : 1568482 rows/s [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Final Throughput cells : 14116346 cells/s [2026-03-02 16:15:47] INFO - 2026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Completed Load [2026-03-02 16:15:47] INFO - Task instance in success state [2026-03-02 16:15:47] INFO - Previous state of the Task instance: TaskInstanceState.RUNNING [2026-03-02 16:15:47] INFO - Task operator: ``` ## Related pages[​](#related-pages "Direct link to Related pages") Related pages * [Docker](/latest/integration/docker-integration.md)the FastBCP image, its volumes and logging settings * [Kestra](/latest/integration/kestra-integration.md)run the same image from a Kestra flow * [![](/img/logos/aws-s3.png)AWS S3](/latest/documentation/cloud-connectivity/aws-s3.md)credentials and options for S3 exports --- # Docker Minimal, production-ready container image to run FastBCP, a high-performance bulk copy 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/FastBCP` | | **Publishing** | Published automatically via GitHub Actions for each new release and weekly security updates | * [arpeio/fastbcp on DockerHub](https://hub.docker.com/repository/docker/arpeio/fastbcp/general)the prebuilt image * [FastBCP-Image on GitHub](https://github.com/arpe-io/FastBCP-Image)Dockerfile and sample settings files ## Prerequisites[​](#prerequisites "Direct link to Prerequisites") 1. Docker 24+ (or Podman) A container engine to pull and run the image. 2. FastBCP Linux x64 ≥ 0.28.0 binaryOptional Only needed to build the image yourself. 3. FastBCP\_Settings.jsonOptional To mount or copy into `/config` for custom logging settings. ## Using the Prebuilt Image from DockerHub[​](#using-the-prebuilt-image-from-dockerhub "Direct link to Using the Prebuilt Image from DockerHub") You can use a prebuilt image from DockerHub that already includes the FastBCP binary. You must provide your own license at runtime. ### Available Tags[​](#available-tags "Direct link to Available Tags") * Version-specific tagsAligned with FastBCP releases (e.g., `v0.28.3`) * `latest` tagAlways points to the most recent FastBCP version ### Automatic Updates[​](#automatic-updates "Direct link to Automatic Updates") * New releasesImages are automatically built when new FastBCP versions are released * Security updatesThe latest version of each minor branch (e.g., latest v0.27.x, v0.28.x, v0.29.x) is rebuilt every Monday with the latest base image and security patches Good to know All actively used versions stay secure without breaking compatibility. For example, if you use `v0.28.8` (latest of the 0.28.x branch), it still gets security updates after `v0.29.0` is released. ### Pull and Run[​](#pull-and-run "Direct link to Pull and Run") * Pull the image * Basic commands ``` # Latest version docker pull arpeio/fastbcp:latest # Specific version docker pull arpeio/fastbcp:v0.28.3 ``` ``` # Get command line help docker run --rm arpeio/fastbcp:latest # Check version docker run --rm arpeio/fastbcp:latest --version ``` ### License Requirement[​](#license-requirement "Direct link to License Requirement") Since version 0.28.0, pass the license content directly via `--license "…"`. ``` export licenseContent=$(cat ./FastBCP.lic) # Use $licenseContent in your docker run commands docker run --rm arpeio/fastbcp: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. ## Usage Examples[​](#usage-examples "Direct link to Usage Examples") The Docker image uses the FastBCP binary as its entrypoint, so you can run it directly with parameters as defined in the [FastBCP documentation](/latest/.md). * SQL Server → Parquet on S3 * SQL Server → CSV with logging * PostgreSQL → Parquet on ADLS * Oracle → Parquet on GCS ``` export licenseContent=$(cat ./FastBCP.lic) docker run --rm \ -e AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID} \ -e AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY} \ -e AWS_REGION=${AWS_REGION} \ arpeio/fastbcp:latest \ --connectiontype "mssql" \ --server "host.docker.internal,1433" \ --user "FastUser" \ --password "FastPassword" \ --database "tpch_test" \ --query "SELECT * FROM dbo.orders WHERE year(o_orderdate)=1998" \ --fileoutput "orders.parquet" \ --directory "s3://arpeioftoutput/dockertest/" \ --paralleldegree 12 \ --parallelmethod "Ntile" \ --distributekeycolumn "o_orderkey" \ --merge false \ --license "$licenseContent" ``` ``` export licenseContent=$(cat ./FastBCP.lic) docker run --rm \ -v fastbcp-config:/config \ -v fastbcp-data:/data \ -v fastbcp-logs:/logs \ arpeio/fastbcp:latest \ --settingsfile "/config/FastBCP_Settings_Logs_To_Files.json" \ --connectiontype "mssql" \ --server "host.docker.internal,1433" \ --user "FastUser" \ --password "FastPassword" \ --database "tpch_test" \ --query "SELECT * FROM dbo.orders WHERE year(o_orderdate)=1998" \ --fileoutput "orders.csv" \ --directory "/data/orders/csv" \ --delimiter "|" \ --decimalseparator "." \ --dateformat "yyyy-MM-dd HH:mm:ss" \ --paralleldegree 12 \ --parallelmethod "Ntile" \ --distributekeycolumn "o_orderkey" \ --merge false \ --license "$licenseContent" ``` ``` export licenseContent=$(cat ./FastBCP.lic) export adlscontainer="arpeioadlseu" docker run --rm \ -e AZURE_CLIENT_ID=${AZURE_CLIENT_ID} \ -e AZURE_TENANT_ID=${AZURE_TENANT_ID} \ -e AZURE_CLIENT_SECRET=${AZURE_CLIENT_SECRET} \ arpeio/fastbcp:latest \ --connectiontype "pgcopy" \ --server "host.docker.internal:15432" \ --user "FastUser" \ --password "FastPassword" \ --database "tpch" \ --sourceschema "tpch_10" \ --sourcetable "orders" \ --query "SELECT * FROM tpch_10.orders WHERE o_orderdate >= '1998-01-01' AND o_orderdate < '1999-01-01'" \ --fileoutput "orders.parquet" \ --directory "abfss://${adlscontainer}.dfs.core.windows.net/fastbcpoutput/testdfs/orders" \ --paralleldegree -2 \ --parallelmethod "Physical" \ --license "$licenseContent" ``` ``` export licenseContent=$(cat ./FastBCP.lic) export gcsbucket="arpeio-gcs-bucket" export GOOGLE_APPLICATION_CREDENTIALS_JSON=$(cat ./gcp-credentials.json) docker run --rm \ -e GOOGLE_APPLICATION_CREDENTIALS="${GOOGLE_APPLICATION_CREDENTIALS_JSON}" \ arpeio/fastbcp:latest \ --connectiontype "oraodp" \ --server "host.docker.internal:1521/FREEPDB1" \ --user "TPCH_IN" \ --password "TPCH_IN" \ --database "FREEPDB1" \ --sourceschema "TPCH_IN" \ --sourcetable "ORDERS" \ --fileoutput "orders.parquet" \ --directory "gs://${gcsbucket}/fastbcpoutput/testgs/orders" \ --parallelmethod "Physical" \ --paralleldegree -2 \ --license "$licenseContent" ``` ## 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. Stores imported or exported data files. `/work`Read-many / Write-many Temporary working directory (container WORKDIR). Used for temporary processing. `/logs`Read-many / Write-many Log output directory (per-run or aggregated logs). Stores runtime and execution logs. ## Configuring FastBCP Logging[​](#configuring-fastbcp-logging "Direct link to Configuring FastBCP Logging") info Available starting from version v0.28.3 FastBCP supports custom logging configuration through an external Serilog settings file in JSON format. This allows you to control how and where logs are written: to the console, to files, or dynamically per run. 1. 1Download a sampleGet [FastBCP\_Settings\_Logs\_To\_Files.json](https://raw.githubusercontent.com/aetperf/FastBCP-Image/main/FastBCP_Settings_Logs_To_Files.json) from GitHub 2. 2Mount itCustom settings files go under `/config` in the container 3. 3Point to itPass `--settingsfile "/config/.json"` to the container ### 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") The following configuration is recommended for most production or Airflow environments. It writes: * ConsoleLogs to the console for real-time visibility * AirflowRun summary logs to `/airflow/xcom/return.json` for Airflow integration * Per-run filesLogs under `/logs`, automatically named with `{LogTimestamp}` and `{TraceId}` FastBCP\_Settings\_Logs\_To\_Files.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": "FastBCP" } } } ``` Good to know * If a target directory (such as `/logs` or `/airflow/xcom`) does not exist, FastBCP 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") You can use the following placeholders to dynamically generate log file names or directories: `{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") Your Serilog configuration file (for example, `FastBCP_Settings_Logs_To_Files.json`) must be placed in `/config`, either by mounting a local directory or by using a Docker named volume. Example with named volumes: ``` # First, copy your config file to a volume location cp ~/FastBCP_Settings_Logs_To_Files.json /volumes/fastbcp-config/ # Then run FastBCP with mounted volumes docker run --rm \ -v fastbcp-config:/config \ -v fastbcp-data:/data \ -v fastbcp-logs:/logs \ arpeio/fastbcp:latest \ --settingsfile "/config/FastBCP_Settings_Logs_To_Files.json" \ --connectiontype "mssql" \ --server "host.docker.internal,1433" \ --user "FastUser" \ --password "FastPassword" \ --database "tpch_test" \ --query "SELECT * FROM dbo.orders" \ --fileoutput "orders.csv" \ --directory "/data" \ --paralleldegree 12 \ --parallelmethod "Ntile" \ --distributekeycolumn "o_orderkey" \ --merge false \ --license "$licenseContent" ``` Good to know If the `--settingsfile` argument is not provided, FastBCP will use its built-in default logging configuration. ## Orchestrate the container[​](#orchestrate-the-container "Direct link to Orchestrate the container") Run the image from an orchestrator * [Apache Airflow](/latest/integration/airflow-integration.md)DockerOperator in a DAG * [Kestra](/latest/integration/kestra-integration.md)`io.kestra.plugin.docker.Run` task in a flow --- # Kestra [Kestra](https://kestra.io/) is a powerful open-source orchestration platform that can be used to automate and schedule FastBCP data export workflows. FastBCP can be seamlessly integrated into Kestra flows using its Docker image. ## Docker Image[​](#docker-image "Direct link to Docker Image") FastBCP provides an official Docker image available on Docker Hub: `arpeio/fastbcp:latest`. * [arpeio/fastbcp on DockerHub](https://hub.docker.com/repository/docker/arpeio/fastbcp/general)the prebuilt image * [Docker integration](/latest/integration/docker-integration.md)tags, volumes and logging settings of the image ## Integration with Docker Run Plugin[​](#integration-with-docker-run-plugin "Direct link to Integration with Docker Run Plugin") The [`io.kestra.plugin.docker.Run`](https://kestra.io/plugins/plugin-docker/io.kestra.plugin.docker.run) plugin provides a direct way to execute FastBCP commands in a Docker container. This is the recommended method for integrating FastBCP with Kestra. ### Basic Example[​](#basic-example "Direct link to Basic Example") ``` id: fastbcp_export_orders namespace: arpe.io tasks: - id: export_orders_parquet type: io.kestra.plugin.docker.Run containerImage: arpeio/fastbcp:latest host: "tcp://host.docker.internal:2375" commands: - --connectiontype - mssql - --server - "host.docker.internal,11433" - --user - FastLogin - --password - FastPassword - --database - tpch10 - --sourceschema - dbo - --sourcetable - orders - --fileoutput - orders.parquet - --directory - /data/export - --parallelmethod - Ntile - --paralleldegree - "12" - --distributekeycolumn - o_orderkey - --nobanner ``` ### Key Parameters[​](#key-parameters "Direct link to Key Parameters") `containerImage` Specifies the FastBCP Docker image `host` Docker daemon endpoint (required for Docker Run plugin) `commands` Array of FastBCP CLI arguments ## Environment Variables for Cloud Storage[​](#environment-variables-for-cloud-storage "Direct link to Environment Variables for Cloud Storage") When exporting data to cloud storage (AWS S3, Azure Blob, Google Cloud Storage), you can pass cloud credentials using environment variables (see [Cloud Connectivity](/latest/documentation/cloud-connectivity/overview.md) for more details). ### Example with AWS S3[​](#example-with-aws-s3 "Direct link to Example with AWS S3") ``` id: fastbcp_export_to_s3 namespace: arpe.io tasks: - id: export_orders_to_s3 type: io.kestra.plugin.docker.Run containerImage: arpeio/fastbcp:latest host: "tcp://host.docker.internal:2375" env: AWS_ACCESS_KEY_ID: "AKIAIOSFODNN7EXAMPLE" AWS_SECRET_ACCESS_KEY: "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY" AWS_DEFAULT_REGION: "us-east-1" commands: - --connectiontype - mssql - --server - "host.docker.internal,11433" - --user - FastLogin - --password - FastPassword - --database - tpch10 - --sourceschema - dbo - --sourcetable - orders - --fileoutput - orders.parquet - --directory - s3://my-bucket/exports/orders - --parallelmethod - Ntile - --paralleldegree - "12" - --distributekeycolumn - o_orderkey - --merge - "false" - --nobanner ``` warning This example puts the credentials in clear text in the flow. Store them as Kestra secrets instead, as shown below. ## 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, connection strings, and cloud credentials, 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 FastBCP secrets Kestra UI›Tenant›Secrets 1. Navigate to the Kestra UI 2. Go to **Tenant** → **Secrets** 3. Add your secrets with appropriate keys: * `FASTBCP_MSSQL_USER` * `FASTBCP_MSSQL_PASSWORD` * `FASTBCP_AWS_ACCESS_KEY_ID` * `FASTBCP_AWS_SECRET_ACCESS_KEY` * `FASTBCP_AWS_DEFAULT_REGION` ### Example with Secrets[​](#example-with-secrets "Direct link to Example with Secrets") ``` id: fastbcp_export_orders_s3_secret namespace: arpe.io tasks: - id: export_orders_parquet_to_s3 type: io.kestra.plugin.docker.Run containerImage: arpeio/fastbcp:latest host: "tcp://host.docker.internal:2375" env: AWS_ACCESS_KEY_ID: "{{ secret('FASTBCP_AWS_ACCESS_KEY_ID') }}" AWS_SECRET_ACCESS_KEY: "{{ secret('FASTBCP_AWS_SECRET_ACCESS_KEY') }}" AWS_DEFAULT_REGION: "{{ secret('FASTBCP_AWS_DEFAULT_REGION') }}" commands: - --connectiontype - mssql - --server - "host.docker.internal,11433" - --user - "{{ secret('FASTBCP_MSSQL_USER') }}" - --password - "{{ secret('FASTBCP_MSSQL_PASSWORD') }}" - --database - tpch10 - --sourceschema - dbo - --sourcetable - orders - --fileoutput - orders.parquet - --directory - s3://fastbcp-export/orders/parquet - --parallelmethod - Ntile - --paralleldegree - "12" - --distributekeycolumn - o_orderkey - --merge - "false" - --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 FastBCP 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 export process: * Configuration parameters * Connection details * Data export progress * Performance metrics Full log of an example execution ``` 2026-03-02T15:15:37.882 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- The "FastBCP_Settings.json" file does not exist. Using default settings. Console Only with loglevel=Information 2026-03-02 16:15:37.8922026-03-02T15:15:37.892 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- FastBCP Trial – will expires on "2026‑03‑27" (24 day(s) left). 2026-03-02 16:15:37.8922026-03-02T15:15:37.892 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Starting 2026-03-02 16:15:37.8932026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- FastBCP Version : "0.29.2.0" Architecture : "X64" - Framework : ".NET 8.0.24" 2026-03-02 16:15:37.8932026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Internal Trace ID : "5ccea857-1538-4a28-8b1c-cfe5c51fbd43" 2026-03-02 16:15:37.8932026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Internal Run ID : "5ccea857-1538-4a28-8b1c-cfe5c51fbd43" 2026-03-02 16:15:37.8932026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- OS : "Debian GNU/Linux 13 (trixie)" 2026-03-02 16:15:37.8932026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Connection Type : "mssql" 2026-03-02 16:15:37.8932026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Source SqlInstance : "sql22,1433" 2026-03-02 16:15:37.8932026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Source Database : "tpch" 2026-03-02 16:15:37.8932026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Source Schema : "tpch10" 2026-03-02 16:15:37.8932026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Source Table : "orders" 2026-03-02 16:15:37.8932026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Trusted Connection : False 2026-03-02 16:15:37.8932026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- User : "migadmin" 2026-03-02 16:15:37.8932026-03-02T15:15:37.893 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Output File : "orders.parquet" 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Output Directory : /data/parquet 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Degree : 12 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Distribute Method : "Ntile" 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Distribute Column : "o_orderkey" 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Decimal Separator : "," 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Delimiter : "|" 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Use quotes : False 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Date format: "yyyy-MM-dd" 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Encoding : "UTF-8" 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- No Header : False 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Timestamped : False 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Boolean Format : "automatic" 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Cloud Profile : "" 2026-03-02 16:15:37.8942026-03-02T15:15:37.894 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Application Intent : "ReadOnly" 2026-03-02 16:15:37.9062026-03-02T15:15:37.906 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- file extension is ".parquet" 2026-03-02 16:15:37.9092026-03-02T15:15:37.909 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Encoding used : Unicode (UTF-8) - 65001 - utf-8 2026-03-02 16:15:37.9652026-03-02T15:15:37.965 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- 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=FastBCP;Application Intent=ReadOnly" 2026-03-02 16:15:38.0862026-03-02T15:15:38.086 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- 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 16:15:38.1102026-03-02T15:15:38.110 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Get DataTypes with header end : Elapsed=6 ms 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Data Segments Computation Completed in 260 ms 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Distribute Column Type : "Int32" 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 0 : 1 : 1 - 5000001 or "o_orderkey" is null 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 1 : 2 : 5000002 - 10000002 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 2 : 3 : 10000003 - 15000003 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 3 : 4 : 15000004 - 20000004 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 4 : 5 : 20000005 - 25000005 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 5 : 6 : 25000006 - 30000006 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 6 : 7 : 30000007 - 35000007 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 7 : 8 : 35000032 - 40000032 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 8 : 9 : 40000033 - 45000033 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 9 : 10 : 45000034 - 50000034 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 10 : 11 : 50000035 - 55000035 2026-03-02 16:15:38.3722026-03-02T15:15:38.372 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Ntile Block 11 : 12 : 55000036 - 60000000 2026-03-02 16:15:46.6112026-03-02T15:15:46.611 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 002 for o_orderkey between 10000003 and 15000003 into /data/parquet/orders_chunk_002.parquet : 1250001 rows x 9 columns in 8234ms 2026-03-02 16:15:46.6112026-03-02T15:15:46.611 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 011 for o_orderkey between 55000036 and 60000000 into /data/parquet/orders_chunk_011.parquet : 1249989 rows x 9 columns in 8234ms 2026-03-02 16:15:46.7902026-03-02T15:15:46.790 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 003 for o_orderkey between 15000004 and 20000004 into /data/parquet/orders_chunk_003.parquet : 1250001 rows x 9 columns in 8413ms 2026-03-02 16:15:46.7972026-03-02T15:15:46.797 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 005 for o_orderkey between 25000006 and 30000006 into /data/parquet/orders_chunk_005.parquet : 1250001 rows x 9 columns in 8420ms 2026-03-02 16:15:46.9362026-03-02T15:15:46.936 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 008 for o_orderkey between 40000033 and 45000033 into /data/parquet/orders_chunk_008.parquet : 1250001 rows x 9 columns in 8559ms 2026-03-02 16:15:47.1392026-03-02T15:15:47.139 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 010 for o_orderkey between 50000035 and 55000035 into /data/parquet/orders_chunk_010.parquet : 1250001 rows x 9 columns in 8763ms 2026-03-02 16:15:47.1542026-03-02T15:15:47.154 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 000 for o_orderkey between 1 and 5000001 into /data/parquet/orders_chunk_000.parquet : 1250001 rows x 9 columns in 8777ms 2026-03-02 16:15:47.2472026-03-02T15:15:47.247 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 009 for o_orderkey between 45000034 and 50000034 into /data/parquet/orders_chunk_009.parquet : 1250001 rows x 9 columns in 8870ms 2026-03-02 16:15:47.3082026-03-02T15:15:47.308 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 006 for o_orderkey between 30000007 and 35000007 into /data/parquet/orders_chunk_006.parquet : 1250001 rows x 9 columns in 8931ms 2026-03-02 16:15:47.3092026-03-02T15:15:47.309 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 001 for o_orderkey between 5000002 and 10000002 into /data/parquet/orders_chunk_001.parquet : 1250001 rows x 9 columns in 8932ms 2026-03-02 16:15:47.3632026-03-02T15:15:47.363 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 007 for o_orderkey between 35000032 and 40000032 into /data/parquet/orders_chunk_007.parquet : 1250001 rows x 9 columns in 8986ms 2026-03-02 16:15:47.3662026-03-02T15:15:47.366 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Load Completed for Query 004 for o_orderkey between 20000005 and 25000005 into /data/parquet/orders_chunk_004.parquet : 1250001 rows x 9 columns in 8989ms 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- files generation end : Elapsed=9257 ms - maxdop=12 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total data rows : 15000000 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total data columns : 9 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total cells : 135000000 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Throughput rows : 1568531 rows/s 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Throughput cells : 14116787 cells/s 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total time : Elapsed=9563 ms 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total data rows : 15000000 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total data columns : 9 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Total cells : 135000000 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Final Throughput rows : 1568482 rows/s 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Final Throughput cells : 14116346 cells/s 2026-03-02 16:15:47.3682026-03-02T15:15:47.368 +00:00 -|- FastBCP -|- 5ccea857-1538-4a28-8b1c-cfe5c51fbd43 -|- INFORMATION -|- orders.parquet -|- Completed Load ``` ## Related pages[​](#related-pages "Direct link to Related pages") Related pages * [Docker](/latest/integration/docker-integration.md)the FastBCP image, its volumes and logging settings * [Apache Airflow](/latest/integration/airflow-integration.md)run the same image from an Airflow DAG * [Cloud connectivity](/latest/documentation/cloud-connectivity/overview.md)credentials for S3, Azure, GCS and OneLake --- # PostgreSQL The **pg\_fastbcp** extension allows you to run the FastBCP tool directly from an SQL function, enabling fast data export from databases to various formats (CSV, Parquet) and cloud storage directly from PostgreSQL. ## Extension Overview[​](#extension-overview "Direct link to Extension Overview") | Item | Value | | ------------------ | ------------------------------------------------------------ | | **Repository** | [arpe-io/pg\_fastbcp](https://github.com/arpe-io/pg_fastbcp) | | **License** | MIT | | **Latest version** | v0.30.0 | | **Platforms** | Linux (Debian/Ubuntu) and Windows | ![pg\_fastbcp Demo](/assets/images/pg_fastbcp-e5e0b5519f8de77a14a8f8cba33d251c.gif) ## Features[​](#features "Direct link to Features") * Native PostgreSQL IntegrationExecute FastBCP commands directly from SQL * Secure Password ManagementBuilt-in encryption for sensitive credentials * Detailed Result ReturnGet export statistics and performance metrics as SQL results * Cross-PlatformAvailable for both Linux and Windows environments * Flexible ConfigurationSupport for all FastBCP parameters * Multiple Output FormatsExport to CSV, Parquet, or directly to cloud storage (AWS S3, Azure Blob, Google Cloud Storage, OneLake) ## 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 FastBCP license Request a trial license. * [Trial license](https://arpe.io/get-trial?product=FastBCP) 4. FastBCP binaries FastBCP 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 `FastBCP` 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\_fastbcp releases page](https://github.com/arpe-io/pg_fastbcp/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_fastbcp.so`, `pg_fastbcp.control`, `pg_fastbcp--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_fastbcp.so /usr/lib/postgresql//lib/ sudo cp pg_fastbcp.control pg_fastbcp--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 FastBCP binary sudo chmod +x /path/to/FastBCP sudo chown postgres:postgres /path/to/FastBCP sudo chmod 750 /path/to/FastBCP # 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_fastbcp.dll`, `pg_fastbcp.control`, `pg_fastbcp--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_fastbcp.dll` file into the `lib` folder 4. Copy the `pg_fastbcp.control` and `pg_fastbcp--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 `FastBCP.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_fastbcp CASCADE; ``` ### Create the extension[​](#create-the-extension "Direct link to Create the extension") ``` CREATE EXTENSION pg_fastbcp CASCADE; ``` ## Functions[​](#functions "Direct link to Functions") ### pg\_fastbcp\_encrypt[​](#pg_fastbcp_encrypt "Direct link to pg_fastbcp_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_RunFastBcp_secure` function will automatically decrypt any values passed to its `password` argument. **Syntax:** ``` pg_fastbcp_encrypt(text_to_encrypt text) RETURNS text ``` **Example:** ``` SELECT pg_fastbcp_encrypt('MySecurePassword'); -- Returns: A base64-encoded encrypted string, e.g., "PgP...base64encodedstring==" ``` ### xp\_RunFastBcp\_secure[​](#xp_runfastbcp_secure "Direct link to xp_RunFastBcp_secure") This is the main function to execute the FastBCP tool. It takes various parameters to configure the data export operation. Password arguments (`password`) will be automatically decrypted. **Syntax:** ``` xp_RunFastBcp_secure( connectiontype text DEFAULT NULL, sourceconnectstring text DEFAULT NULL, dsn text DEFAULT NULL, provider text DEFAULT NULL, server text DEFAULT NULL, user_ text DEFAULT NULL, password text DEFAULT NULL, trusted boolean DEFAULT NULL, database_name text DEFAULT NULL, applicationintent text DEFAULT NULL, fileinput text DEFAULT NULL, query text DEFAULT NULL, sourceschema text DEFAULT NULL, sourcetable text DEFAULT NULL, fileoutput text DEFAULT NULL, directory text DEFAULT NULL, timestamped boolean DEFAULT NULL, encoding text DEFAULT NULL, delimiter text DEFAULT NULL, usequotes boolean DEFAULT NULL, dateformat text DEFAULT NULL, decimalseparator text DEFAULT NULL, boolformat text DEFAULT NULL, noheader boolean DEFAULT NULL, parquetcompression text DEFAULT NULL, cloudprofile text DEFAULT NULL, parallelmethod text DEFAULT NULL, paralleldegree integer DEFAULT NULL, distributekeycolumn text DEFAULT NULL, datadrivenquery text DEFAULT NULL, merge boolean DEFAULT NULL, loglevel text DEFAULT NULL, runid text DEFAULT NULL, settingsfile text DEFAULT NULL, config text DEFAULT NULL, nobanner boolean DEFAULT NULL, license text DEFAULT NULL, fastbcp_path text DEFAULT NULL ) RETURNS TABLE ( exit_code integer, output text, total_rows bigint, total_columns integer, total_time bigint ) ``` ## Usage Examples[​](#usage-examples "Direct link to Usage Examples") ### Linux Example - PostgreSQL to CSV[​](#linux-example---postgresql-to-csv "Direct link to Linux Example - PostgreSQL to CSV") Export data from PostgreSQL to CSV files: ``` SELECT * FROM xp_RunFastBcp_secure( connectiontype := 'pgsql', server := 'localhost:5432', user_ := 'postgres', password := pg_fastbcp_encrypt('MyActualPassword'), database_name := 'tpch', sourceschema := 'tpch_1', sourcetable := 'orders', fileoutput := 'orders.csv', directory := '/tmp/export', paralleldegree := 4, parallelmethod := 'Ntile', distributekeycolumn := 'o_orderkey', noheader := false, delimiter := ',', license := '/tmp/FastBCP_linux-x64_v0.30.0/FastBCP.lic', loglevel := 'information', nobanner := false, fastbcp_path := '/tmp/FastBCP_linux-x64_v0.30.0' ); ``` ## 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 FastBCP process. `output`text The full log output from the FastBCP tool. `total_rows`bigint The total number of rows transferred. `total_columns`integer The total number of columns transferred. `total_time`bigint The total execution time in milliseconds. ## Output[​](#output "Direct link to Output") You can view the full FastBCP output using the `output` column returned by the function. ## Resources[​](#resources "Direct link to Resources") Resources * [pg\_​fastbcp GitHub Repository](https://github.com/arpe-io/pg_fastbcp) * [pg\_​fastbcp releases](https://github.com/arpe-io/pg_fastbcp/releases)download the extension * [Get a Trial License](https://arpe.io/get-trial?product=FastBCP) * [Report Issues](https://github.com/arpe-io/pg_fastbcp/issues) --- # Release Notes 0.32 ## New Features[​](#new-features "Direct link to New Features") ### OpenTelemetry Support[​](#opentelemetry-support "Direct link to OpenTelemetry Support") FastBCP now supports [OpenTelemetry](https://opentelemetry.io/) for distributed tracing and log correlation. **New parameter:** * `--traceparent`: Accept a [W3C Trace Context](https://www.w3.org/TR/trace-context/) traceparent identifier from an external caller, enabling end-to-end trace correlation across distributed systems. **OpenTelemetry log export:** * Logs can be exported to any OpenTelemetry-compatible collector (e.g., Jaeger, Zipkin, Grafana Tempo) via the Serilog OpenTelemetry sink. * Configuration through environment variables or the `FastBCP_Settings.json` file. See the [OpenTelemetry logging documentation](/latest/documentation/logging/OpenTelemetry.md) for setup details and examples. ### Gzip Compression[​](#gzip-compression "Direct link to Gzip Compression") **Streamed gzip compression** is now possible by adding `.gz` to file extension. For csv, tsv and json only. * use `--fileoutput file.csv.gz` ### BREAKING CHANGE[​](#breaking-change "Direct link to BREAKING CHANGE") * `--merge` default is Switched from `true` to `false` ### Others[​](#others "Direct link to Others") * Better datatypes coverage for csv and json --- # Release Notes 1.0 ## What's Changed[​](#whats-changed "Direct link to What's Changed") ### ADBC Parquet Export - 2x Faster Performance[​](#adbc-parquet-export---2x-faster-performance "Direct link to ADBC Parquet Export - 2x Faster Performance") FastBCP now supports ADBC (Arrow Database Connectivity) for Parquet exports via the `--connectiontype adbc_mssql` connector, powered by ArrowTDS. **Performance improvements:** * 2x faster Parquet generation compared to traditional methods * Native columnar data format (Arrow) eliminates conversion overhead * Optimized for SQL Server data types **Usage:** ``` fastbcp --server myserver.database.windows.net \ --database MyDatabase \ --query "SELECT * FROM Sales.Orders" \ --connectiontype adbc_mssql \ --fileoutput "orders.parquet" ``` See [Connection Parameters documentation](/latest/documentation/cli/connection_parameters.md#connection-type) for more details. ### Buffered Cloud Uploads[​](#buffered-cloud-uploads "Direct link to Buffered Cloud Uploads") New environment variables enable buffered cloud uploads for significantly improved Azure Data Lake Storage and OneLake performance. **New environment variables:** * `FASTBCP_CLOUD_ISBUFFERED`: When `True`, ADLS/OneLake writes are buffered to a local temp file, then uploaded in parallel. When `False`, data is streamed directly to the cloud. * `FASTBCP_TMPPATH`: Base directory for temporary files created during buffered cloud uploads. Default: System temp (`%TEMP%` / `$TMPDIR`). * `FASTBCP_CLOUD_MAXUPLOADTHREAD_PER_STREAM`: Maximum number of parallel upload threads per cloud stream. Default: `8` if `parallelmethod=None`, `2` otherwise. * `FASTBCP_UID_STRING_CASING`: Controls UID-to-string casing. Values: `lower` or `upper`. Default: `lower` (RFC 4122). **Example — Buffered cloud uploads:** ``` # Enable buffered uploads for Azure $env:FASTBCP_CLOUD_ISBUFFERED = "True" $env:FASTBCP_TMPPATH = "D:\temp\fastbcp" fastbcp --server myserver --database MyDB --sourceschema Sales --sourcetable Orders ` --fileoutput "abfss://container@storage.dfs.core.windows.net/orders.parquet" ``` **Example — UID string casing (PowerShell):** ``` # Output UIDs in uppercase $env:FASTBCP_UID_STRING_CASING = "upper" fastbcp --server myserver --database MyDB --sourcetable MyTable --fileoutput "output.parquet" ``` **Example — UID string casing (Linux):** ``` # Output UIDs in uppercase export FASTBCP_UID_STRING_CASING=upper fastbcp --server myserver --database MyDB --sourcetable MyTable --fileoutput "output.parquet" ``` See the [Environment Variables](/latest/documentation/environment-variables/overview.md) documentation for detailed configuration. ### Move to .NET 10[​](#move-to-net-10 "Direct link to Move to .NET 10") FastBCP now runs on .NET 10: * Performance improvements in runtime and GC * Enhanced security and stability * Continued long-term support * Compatibility: Windows, Linux, macOS (x64, ARM64) ### Improved SBOM Generation[​](#improved-sbom-generation "Direct link to Improved SBOM Generation") Enhanced Software Bill of Materials (SBOM) generation for better supply chain security and compliance. ### SLSA Build Provenance[​](#slsa-build-provenance "Direct link to SLSA Build Provenance") Added SLSA (Supply-chain Levels for Software Artifacts) build provenance in CI for enhanced supply chain security and compliance. ### Early Cleanup of Temp Files[​](#early-cleanup-of-temp-files "Direct link to Early Cleanup of Temp Files") When uploading to cloud storage, temporary files are now cleaned up earlier in the process to reduce disk space requirements. ## ArrowTDS ARPE.IO Driver[​](#arrowtds-arpeio-driver "Direct link to ArrowTDS ARPE.IO Driver") FastBCP 1.0 includes the ArrowTDS ARPE.IO driver for high-performance ADBC connectivity. **Key features:** * TDS 7.4 protocol compatibility * Native Arrow columnar format support * Optimized for SQL Server 2012 and later --- # Release Notes 1.1 ## What's Changed[​](#whats-changed "Direct link to What's Changed") ### ADBC PostgreSQL — Arpe.io ADBC FastDriver[​](#adbc-postgresql--arpeio-adbc-fastdriver "Direct link to ADBC PostgreSQL — Arpe.io ADBC FastDriver") FastBCP now supports ADBC for PostgreSQL via the `--connectiontype adbc_pgsql` connector, powered by the new ADBC Arrow\_FEBE drivers (Arpe.io ADBC FastDriver). **Key highlights:** * Ultra-fast Parquet exports from PostgreSQL * Native Arrow columnar format eliminates conversion overhead * Same high-performance ADBC approach as the existing `adbc_mssql` connector **Usage:** ``` fastbcp --server pg-server:5432 \ --database MyDatabase \ --query "SELECT * FROM public.orders" \ --connectiontype adbc_pgsql \ --fileoutput "orders.parquet" ``` See [Connection Parameters documentation](/latest/documentation/cli/connection_parameters.md#connection-type) for more details. ### \[Breaking] New Default Date Format[​](#breaking-new-default-date-format "Direct link to \[Breaking] New Default Date Format") The default `--dateformat` value for CSV, JSON, and XLSX outputs has changed from `yyyy-MM-dd` to `yyyy-MM-dd HH:mm:sszzz`. **Auto-adaptive behavior:** The format automatically adapts based on the column type: * **Date-only** columns remain formatted as `yyyy-MM-dd` * **Timestamp/DateTime** columns are formatted as `yyyy-MM-dd HH:mm:ss` even if a timezone token (`zzz`) is in the format string * **DateTimeOffset** columns include the full timezone offset This change also fixes date-only format handling and adds timezone support for CSV date formatting. **Migration:** If your pipeline depends on the previous default (`yyyy-MM-dd`), explicitly set `--dateformat "yyyy-MM-dd"` in your command. ### New Boolean Format Values[​](#new-boolean-format-values "Direct link to New Boolean Format Values") The `--boolformat` parameter now supports additional formats: | Format | Example output | | ------------ | --------------- | | `True/False` | `True`, `False` | | `yes/no` | `yes`, `no` | | `y/n` | `y`, `n` | These are in addition to the existing `true/false`, `t/f`, and `1/0` formats. **Example:** ``` fastbcp --server myserver \ --database MyDatabase \ --query "SELECT * FROM products" \ --fileoutput "products.csv" \ --boolformat "True/False" ``` ### Environment Variables Guardrails[​](#environment-variables-guardrails "Direct link to Environment Variables Guardrails") Security hardening of environment variable handling (internal improvement), with no user-facing impact. --- # Release Notes 1.2 ## What's Changed[​](#whats-changed "Direct link to What's Changed") ### ADBC Oracle — Arpe.io ADBC FastDriver[​](#adbc-oracle--arpeio-adbc-fastdriver "Direct link to ADBC Oracle — Arpe.io ADBC FastDriver") FastBCP now supports ADBC for Oracle via the `--connectiontype adbc_oracle` connector, powered by the new ADBC Arrow\_TTC driver (Arpe.io ADBC FastDriver). It speaks Oracle's TNS/TTC wire protocol natively — no Oracle Client / Instant Client required. **Key highlights:** * Ultra-fast Parquet exports from Oracle * Native Arrow columnar format eliminates conversion overhead * Same high-performance ADBC approach as the existing `adbc_mssql` and `adbc_pgsql` connectors * EZConnect source syntax (`host[:port]/service`) * Supports the `Rowid` parallel method for parallel extraction, in addition to `oraodp` * Parquet is the only supported output format for this connector See [Connection Parameters documentation](/latest/documentation/cli/connection_parameters.md#connection-type) for more details. ### New Environment Variables[​](#new-environment-variables "Direct link to New Environment Variables") Added three new environment variables: * `FASTBCP_ADBC_BATCHCELLS`: controls the size (in cells, i.e. rows × columns) of the Arrow record batches fetched by the ADBC connectors (`adbc_mssql`, `adbc_pgsql`). **Default:** `500000` (500,000 cells). Sizing by cell count keeps batch memory usage predictable across tables of different widths. See the [FASTBCP\_ADBC\_BATCHCELLS documentation](/latest/documentation/environment-variables/fastbcp-adbc-batchcells.md) for details. * `FASTBCP_SYSTEMINFO_COLLECT`: collects system information (CPU, memory, OS, etc.) while a run is in progress. **Disabled by default.** See the [FASTBCP\_SYSTEMINFO\_COLLECT documentation](/latest/documentation/environment-variables/fastbcp-systeminfo-collect.md) for details. * `FASTBCP_PERFORMANCE_COLLECT`: collects performance information (CPU usage, memory usage, etc.) while a run is in progress. **Disabled by default.** See the [FASTBCP\_PERFORMANCE\_COLLECT documentation](/latest/documentation/environment-variables/fastbcp-performance-collect.md) for details. To enable system and performance diagnostics collection: * Windows * Linux ``` $env:FASTBCP_SYSTEMINFO_COLLECT = $True $env:FASTBCP_PERFORMANCE_COLLECT = $True ``` ``` export FASTBCP_SYSTEMINFO_COLLECT=True export FASTBCP_PERFORMANCE_COLLECT=True ``` ## Bug Fixes[​](#bug-fixes "Direct link to Bug Fixes") ### ODBC with DSN — Login/Password Authentication[​](#odbc-with-dsn--loginpassword-authentication "Direct link to ODBC with DSN — Login/Password Authentication") Fixed an issue where the `odbc` connection type with a DSN (`--dsn`) only worked with integrated (Windows/trusted) authentication. Providing explicit `--user` / `--password` credentials had no effect and the connection silently fell back to integrated authentication. DSN connections now correctly authenticate with the supplied login/password. ### ADBC MSSQL — Column Limit Raised[​](#adbc-mssql--column-limit-raised "Direct link to ADBC MSSQL — Column Limit Raised") Fixed a limitation in the `adbc_mssql` connector that restricted exports to tables with fewer than 256 columns. The limit has been raised to support standard tables with up to 1024 columns. --- # Release Notes 1.3 ## New Features[​](#new-features "Direct link to New Features") ### ADBC Netezza — `--connectiontype adbc_netezza`[​](#adbc-netezza----connectiontype-adbc_netezza "Direct link to adbc-netezza----connectiontype-adbc_netezza") FastBCP now supports Netezza / IBM NPS through the embedded **ArpeNetezza** ADBC driver, via the new `--connectiontype adbc_netezza` connection type. The driver is used for both the metadata step and the data step. **Key highlights:** * No NZdotNET installation needed * Works with **IBM Cloud NPS** * Parquet output only, like the other `adbc_*` connection types * Supported parallel methods: `None`, `NZDataSlice`, `Ntile`, `Random`, `RangeId` and `DataDriven` * `Application Name` defaults to `FastBCP` * NPS 7.x: TLS 1.0/1.1 supported (`tls_min_version=1.0`, ArpeNetezza 0.3.2) **Connection string keys:** `--sourceconnectstring` keys no longer need the `adbc.arpenz.` prefix. The following are all accepted: * Friendly / ADO.NET keys: `Server`, `Host`, `host:port`, `Port`, `Database`, `User ID`, `Password`, `SSL Mode`, `Application Name`, … * Plain driver keys: `sslmode`, `tls_min_version`, `char_encoding`, `login_timeout`, … * `uri` and `connection_string` Keys the driver does not support (e.g. `propagate`, `Pooling`) are ignored, with a single warning. * Windows * Linux ``` .\FastBCP.exe ` --connectiontype adbc_netezza ` --sourceconnectstring "Server=nps-host;Port=5480;Database=SALES;User ID=admin;Password=FastPassword" ` --sourceschema "ADMIN" ` --sourcetable "ORDERS" ` --directory "D:\export\orders" ` --fileoutput "orders.parquet" ` --parallelmethod NZDataSlice ` --paralleldegree 8 ``` ``` ./FastBCP \ --connectiontype adbc_netezza \ --sourceconnectstring "Server=nps-host;Port=5480;Database=SALES;User ID=admin;Password=FastPassword" \ --sourceschema "ADMIN" \ --sourcetable "ORDERS" \ --directory "/data/export/orders" \ --fileoutput "orders.parquet" \ --parallelmethod NZDataSlice \ --paralleldegree 8 ``` NPS 7 pre-releases Files exported from NPS 7 with the pre-releases `v1.3.0-netezza.1` / `v1.3.0-netezza.2` may contain wrong values in `NUMERIC` columns. This is fixed in ArpeNetezza 0.3.3, shipped with FastBCP 1.3. Re-export the affected tables. See [Connection Parameters](/latest/documentation/cli/connection_parameters.md#connection-type) for more details. ### New Parallel Method — `DBPartition`[​](#new-parallel-method--dbpartition "Direct link to new-parallel-method--dbpartition") The new `--parallelmethod DBPartition` parallel method runs one extraction per native partition / subpartition of the source table. **Supported sources:** | Source | Partitioning used | | ---------- | --------------------------------------------- | | SQL Server | `$PARTITION` | | PostgreSQL | Leaf tables | | Oracle | `PARTITION (...)` | | MySQL | `PARTITION (...)` | | Teradata | Row partitioning, single- and multi-level PPI | The `adbc_*` counterparts are supported too. * Requires `--sourceschema` and `--sourcetable`. * Falls back to `None`, with a warning, when the table is not partitioned, has a single partition, or the source is not supported. * Optimised partition scheduling (internal improvement). * `FASTBCP_DOP_EQUERY` also applies to `DBPartition`. The output layout is controlled by the new [`FASTBCP_DBPARTITION_TARGET_MODE`](/latest/documentation/environment-variables/fastbcp-dbpartition-target-mode.md) environment variable: | Value | Output layout | | ----------------- | --------------------------------------------------------------------------------------------------------------------- | | `CHUNK` (default) | `_chunk_NNN.` | | `HIVE` | `partition=

/[subpartition=/].` (SQL Server uses `bounds=_`, Teradata `L1=/L2=`) | `--merge` works in both modes. See [Parallel Parameters](/latest/documentation/cli/parallel_parameters.md#available-methods) for more details. ### Azure Blob Storage — Authentication and Container Access[​](#azure-blob-storage--authentication-and-container-access "Direct link to Azure Blob Storage — Authentication and Container Access") For direct commit to Azure Blob Storage: * **Authentication:** besides `DefaultAzureCredential` (still the fallback), FastBCP now accepts `AZURE_STORAGE_CONNECTION_STRING` or `AZURE_STORAGE_SAS_URL`. The selected authentication method is logged. * **Container access:** a missing *create* permission on the container (HTTP 403/409) is tolerated when the container already exists. 403 errors now give a clearer message (firewall, RBAC or SAS permissions). See [Azure Configuration](/latest/documentation/cloud-connectivity/azure.md#authentication-methods) for more details. ### ADBC Connectors Improvements[​](#adbc-connectors-improvements "Direct link to ADBC Connectors Improvements") * **`--applicationintent` with `--connectiontype adbc_mssql`:** `--applicationintent` (default `ReadOnly`) and an `ApplicationIntent` key in `--sourceconnectstring` now reach the ArpeMSSQL driver. An Availability Group listener with read-only routing sends the export to a readable secondary, as with `--connectiontype mssql`. * **`--connectiontype adbc_pgsql` honours the libpq environment:** `PGUSER`, `PGPASSWORD`, `PGPASSFILE` / `~/.pgpass` and `PGSSLROOTCERT` are used when `--user` / `--password` / `--sourceconnectstring` do not provide them, like `--connectiontype pgsql` (ArpePGSQL 0.4.5). * **`--connectiontype adbc_oracle` resolves TNS aliases** through `tnsnames.ora` (`TNS_ADMIN`, `$ORACLE_HOME/network/admin`), like `--connectiontype oraodp` (ArpeOracle 0.3.11). ## Behaviour Changes[​](#behaviour-changes "Direct link to Behaviour Changes") ### `adbc_mssql` / `adbc_pgsql` / `adbc_oracle` Run Fully on ADBC[​](#adbc_mssql--adbc_pgsql--adbc_oracle-run-fully-on-adbc "Direct link to adbc_mssql--adbc_pgsql--adbc_oracle-run-fully-on-adbc") The metadata and planning step (row counts, column types, `Ntile`, `Random`, `Timepartition`, `DBPartition`, …) now runs on the ADBC driver instead of SqlClient, Npgsql or ODP.NET. A single connection string is used for both steps. * `--sourceconnectstring` accepts the native syntax, explicit `adbc.*` / `arpeio.*` keys (they win over translated keys), or a whole-connection `uri` / `adbc..connection_string`. * Native keys with no driver equivalent (e.g. `Pooling=false`) are dropped with a warning. With a whole-connection `uri` / `connection_string`, native keys are dropped with a warning saying to put them inside the URI / connection string. * A `Driver=` path in `--sourceconnectstring` is used by both steps. ### Oracle Network Encryption with `--connectiontype adbc_oracle`[​](#oracle-network-encryption-with---connectiontype-adbc_oracle "Direct link to oracle-network-encryption-with---connectiontype-adbc_oracle") FastBCP now sends `encryption=accepted` and `data_integrity=accepted`, so the server decides, as with `--connectiontype oraodp`. `FASTBCP_ADBC_ENCRYPTION` / `FASTBCP_ADBC_DATA_INTEGRITY` or explicit keys still override this. ### `--connectiontype adbc_pgsql` NUMERIC NaN[​](#--connectiontype-adbc_pgsql-numeric-nan "Direct link to --connectiontype-adbc_pgsql-numeric-nan") A `NaN` in a decimal column now fails the read instead of becoming `NULL`. Set `adbc.arpepgsql.numeric_special=null` in `--sourceconnectstring` to keep the previous behaviour (ArpePGSQL 0.4.2+). ### `adbc_oracle` DataDriven Keys[​](#adbc_oracle-datadriven-keys "Direct link to adbc_oracle-datadriven-keys") A scale-0 `NUMBER(<=18)` key is now treated as an integer, as with `--connectiontype oraodp`, so predicates and Hive paths are identical between both connection types. ### `NZDataSlice` Scheduling[​](#nzdataslice-scheduling "Direct link to nzdataslice-scheduling") Faster on uneven slices (internal improvement). After the first failure, no new slice starts. Output files are unchanged. ## Bug Fixes[​](#bug-fixes "Direct link to Bug Fixes") * **Ntile lost rows** (pre-existing): rows could be missing from the export in some cases; on Oracle, string keys failed. Fixed (internal improvement). * **Passwords in logs:** quoted passwords containing `;` (e.g. `Password="p;w=1"`) are now fully masked in logs and telemetry, for every connection type. * **`--connectiontype adbc_mssql` with a named instance:** `host\INSTANCE` connected to the instance on port 1433 instead of resolving the named instance through the SQL Server Browser. * **Oracle TNS alias with `--user` / `--password`:** `--connectiontype oraodp --server ALIAS --user u --password p` failed with `ORA-50008: 'USERNAME' is an invalid connection string attribute` (same for `adbc_oracle`). * **`--connectiontype nzoledb`** connection type fixed (internal improvement). * **`--connectiontype nzcopy --parallelmethod Timepartition`** generated invalid SQL for Netezza. Fixed (internal improvement). * **`NZDataSlice` with `--timestamped`:** all chunks of one export now share the same timestamp prefix (long exports were split across several prefixes). * **`NZDataSlice`** log message fix. ## Documentation[​](#documentation "Direct link to Documentation") * [AWS S3](/latest/documentation/cloud-connectivity/aws-s3.md#required-permissions): IAM roles / policies needed by FastBCP and SSE-KMS support. * [FASTBCP\_DBPARTITION\_TARGET\_MODE](/latest/documentation/environment-variables/fastbcp-dbpartition-target-mode.md): new environment variable. * [Connection Parameters](/latest/documentation/cli/connection_parameters.md#connection-type): `adbc_netezza` connection type. --- # Release Notes 1.4 **One parallel method to rule them all.** FastBCP 1.4 picks the fastest physical split for your engine on its own, brings Teradata to the high-performance ADBC family, and makes SQL Server parallel exports up to 2.6× faster. 1 parallel method, 4 engines `Physical` resolves to Ctid, Rowid, Physloc or NZDataSlice from the connection type. 2.6× faster Physloc exports At degree 8 on a 60M-row SQL Server heap, the export went from 126 s to 48 s. 0 Teradata client software The ADBC Teradata driver logs on over TLS by default, with no TTU to install. ## What's New: At a Glance[​](#whats-new-at-a-glance "Direct link to What's New: At a Glance") | | | | | - | ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ | | | **New parallel method** | [`--parallelmethod Physical`](#physical-one-parallel-method-for-every-engine): FastBCP picks the physical split of the source engine | | | **New source** | [`--connectiontype adbc_teradata`](#adbc-teradata----connectiontype-adbc_teradata): Teradata to Parquet through the embedded ArpeTeradata driver | | | **Faster exports** | `Physloc` 1.6× to 2.6× faster, better load balancing for `Timepartition` | | | **Data correctness** | Fixes for rows skipped or duplicated by `Ntile`, `Timepartition` and filters with `OR` — [see the fixes](#bug-fixes) | | | **Deprecations** | `Ctid`, `Rowid`, `Physloc` and `NZDataSlice` will be removed in 2.0 — [use `Physical`](#deprecations) | ## Physical: One Parallel Method for Every Engine[​](#physical-one-parallel-method-for-every-engine "Direct link to Physical: One Parallel Method for Every Engine") No more remembering which engine-specific method applies to which database. With `--parallelmethod Physical`, FastBCP splits the table on the physical row location of the source and picks the right strategy from the connection type. | Source | Connection types | Resolved strategy | | ---------- | -------------------------------------------- | ----------------- | | PostgreSQL | `pgsql`, `pgcopy`, `adbc_pgsql` | `Ctid` | | Oracle | `oraodp`, `adbc_oracle` | `Rowid` | | SQL Server | `mssql`, `msoledbsql`, `adbc_mssql` | `Physloc` | | Netezza | `nzsql`, `nzcopy`, `nzoledb`, `adbc_netezza` | `NZDataSlice` | * Windows * Linux ``` .\FastBCP.exe ` --connectiontype pgsql ` --server "localhost:5432" ` --database "tpch" ` --user "FastUser" ` --password "FastPassword" ` --sourceschema "tpch_10" ` --sourcetable "orders" ` --directory "D:\export\orders" ` --fileoutput "orders.parquet" ` --parallelmethod Physical ` --paralleldegree 8 ``` ``` ./FastBCP \ --connectiontype pgsql \ --server "localhost:5432" \ --database "tpch" \ --user "FastUser" \ --password "FastPassword" \ --sourceschema "tpch_10" \ --sourcetable "orders" \ --directory "/data/export/orders" \ --fileoutput "orders.parquet" \ --parallelmethod Physical \ --paralleldegree 8 ``` The resolved strategy is logged, and OpenTelemetry spans carry it in `fastbcp.method` (with `Physical` in the new `fastbcp.method.requested` tag): ``` Distribute Method : Physical (Ctid) ``` Good to know * `--sourceschema` and `--sourcetable` are required. `--query` can be added to filter the table (simple query with a `WHERE` clause). `--distributekeycolumn` is not used. * Any other source (`odbc`, `oledb`, `mysql`, `clickhouse`, `hana`, `teradata`, `adbc_teradata`) stops with an explicit error. With `odbc` and `oledb`, the error asks for a native connection type, because FastBCP cannot know which engine is behind the driver. **See also:** [Parallel Parameters](/latest/documentation/cli/parallel_parameters.md#physical-method) ## ADBC Teradata — `--connectiontype adbc_teradata`[​](#adbc-teradata----connectiontype-adbc_teradata "Direct link to adbc-teradata----connectiontype-adbc_teradata") Teradata joins the high-performance ADBC family. The embedded **ArpeTeradata** driver handles both the metadata and the data steps with the Teradata SQL dialect — and by default it needs **no Teradata client software at all**. | | | Supported | | - | ----------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | **Platforms** | Windows x64 and Linux x64, **Parquet output only** (like every `adbc_*` connection type) | | | **Parallel methods** | Every method of `--connectiontype teradata`: `Random`, `Ntile`, `DataDriven`, `RangeId`, `Timepartition`, and `DBPartition` on PPI tables | | | **Connection** | `--server host[:port]` (legacy port, default `1025`), `--user`, `--password`, optional `--database` — or a `--sourceconnectstring` in the Teradata provider spelling (`Server`, `Port`, `Database`, `User Id`, `Password`, `SSL Mode`, `HTTPS Port`, `TMODE`, `TTU Path`, …). Explicit `adbc.arpeteradata.*` keys win | | | **TLS logon (default)** | `sslmode=prefer` uses TLS on the HTTPS port (443): **no Teradata client software needed** | | | **Legacy port** | When the server has no TLS, or with `SSL Mode=disable`, the driver uses the legacy port through your Teradata Tools and Utilities (TTU), on Linux and Windows | | | **Logon mechanisms** | `LDAP`, `JWT`, `KRB5` and `TDNEGO` (ArpeTeradata 0.3.4). `JWT` and Kerberos work over TLS, without TTU | Good to know * Trusted authentication (`--trusted`) is not supported. * **Finding TTU for the legacy port on Linux:** FastBCP looks in the new [`FASTBCP_TTU_PATH`](/latest/documentation/environment-variables/fastbcp-ttu-path.md) environment variable, then in a `ttu` or `TeradataToolsAndUtilitiesBase` directory next to the FastBCP binary; otherwise the driver searches `ARPETERADATA_TTU_PATH`, `/opt/teradata/client` and the system library path. Teradata's TTU download can be [unpacked next to the binary without installing it](/latest/documentation/environment-variables/fastbcp-ttu-path.md#using-teradatas-ttu-download-without-installing-it). FastBCP warns at startup when the TTU folder lacks `tdclientdir` or the ICU links, or when the client directory is not named after its version. * **On Windows**, the driver finds `wincli32.dll` itself (`ARPETERADATA_TTU_PATH`, its own directory, the registered TTU installation). - Windows - Linux ``` .\FastBCP.exe ` --connectiontype adbc_teradata ` --server "td-host" ` --database "TPCH" ` --user "FastUser" ` --password "FastPassword" ` --sourceschema "TPCH" ` --sourcetable "ORDERS" ` --directory "D:\export\orders" ` --fileoutput "orders.parquet" ` --parallelmethod Ntile ` --distributekeycolumn "o_orderkey" ` --paralleldegree 8 ``` ``` export FASTBCP_TTU_PATH=/opt/teradata/client/20.00 ./FastBCP \ --connectiontype adbc_teradata \ --server "td-host" \ --database "TPCH" \ --user "FastUser" \ --password "FastPassword" \ --sourceschema "TPCH" \ --sourcetable "ORDERS" \ --directory "/data/export/orders" \ --fileoutput "orders.parquet" \ --parallelmethod Ntile \ --distributekeycolumn "o_orderkey" \ --paralleldegree 8 ``` **See also:** [Connection Parameters](/latest/documentation/cli/connection_parameters.md#adbc_teradata) ## Performance[​](#performance "Direct link to Performance") | | Before | 1.4 | | -------------------------------------------- | ------ | -------- | | `Physloc`, degree 8, 60M-row SQL Server heap | 126 s | **48 s** | * **`Physloc` is 1.6× to 2.6× faster at even degrees of parallelism**, thanks to the new [`Physloc` distribution](#physloc-distribution). * **`Timepartition` load balancing:** internal improvement. * **`Timepartition` with quoted or case-sensitive date columns:** columns such as `"OrderDate"` or `[OrderDate]` now work. ## Deprecations[​](#deprecations "Direct link to Deprecations") `Ctid`, `Rowid`, `Physloc` and `NZDataSlice` will be removed in FastBCP 2.0 Use `--parallelmethod Physical` instead: it resolves to the same strategy from the connection type. The old values are still accepted — FastBCP runs the export as before and logs a warning: ``` Parallel method Ctid is deprecated and will be removed in 2.0 ==> use --parallelmethod Physical ``` ## Behaviour Changes[​](#behaviour-changes "Direct link to Behaviour Changes") ### `Physloc` and `Rowid` Require `--sourceschema` and `--sourcetable`[​](#physloc-and-rowid-require---sourceschema-and---sourcetable "Direct link to physloc-and-rowid-require---sourceschema-and---sourcetable") Like `Ctid`, the `Physloc` and `Rowid` methods, used directly or through `Physical`, now require `--sourceschema` and `--sourcetable`. Without them, FastBCP stops at the parameter check: ``` ERROR in command line parameters : With Physical (Physloc) Method you must define source schema (--sourceschema) and source table (--sourcetable) ==> With Physical (Physloc) Method --sourceschema and --sourcetable are both mandatory ``` Before 1.4, `Rowid` crashed when they were missing. A `Physloc` export based on `--query` alone must now also give the schema and table. ### `Physloc` Distribution[​](#physloc-distribution "Direct link to physloc-distribution") `Physloc` now splits both rowstore and clustered columnstore tables into even chunks, whatever the degree of parallelism (internal improvement). A clustered columnstore is logged as `Physloc : .

is a clustered columnstore, splitting on the columnstore row id`. ### ArpeOracle 0.4.1 Security Defaults (`--connectiontype adbc_oracle`)[​](#arpeoracle-041-security-defaults---connectiontype-adbc_oracle "Direct link to arpeoracle-041-security-defaults---connectiontype-adbc_oracle") * TCPS now verifies the server certificate by default. * Kerberos no longer forwards the TGT unless `krb5_forward=true` is set, and requires mutual authentication. * Token and OAuth2 logons require TCPS. ### `--help`[​](#--help "Direct link to --help") * `-?, --help` is now listed in the usage. * `--help`, `/?` and `/help` now behave like `-?`: they print the usage only, without the banner, and exit with code `0`. Before, they printed the usage, then the banner and four `ERROR in command line parameters` lines, and exited with code `1`. ## Bug Fixes[​](#bug-fixes "Direct link to Bug Fixes") * **`Physloc` only parallelised with an odd `--paralleldegree`:** with a degree of 2, 4, 8 or 16, one chunk held every row and the other workers exported nothing; with 6 or 12, only three chunks got rows. Fixed by the new [`Physloc` distribution](#physloc-distribution): on rowstore tables, the chunks stay within 3% of even up to degree 192. * **`Random` and `Physloc` row counts:** the per-chunk log lines and the final `Total data rows` were wrong. Fixed (internal improvement). * **`Ntile` dropped rows with sub-millisecond timestamp keys:** this affected SQL Server `datetime2(4..7)`, PostgreSQL `timestamp` and Oracle `TIMESTAMP(4..9)`. Rows could be silently skipped; every row is now exported exactly once whatever its precision (internal improvement). A bucket whose minimum is `NULL` no longer throws, and numeric bounds no longer depend on the regional settings (no more `1,5` with `fr-FR`). * **Source filter with `OR`:** rows outside the source filter could be exported when the filter contained an `OR`, with every parallel method that rewrites the `WHERE` clause. Fixed (internal improvement). * **`Timepartition` skipped rows with a `NULL` date:** they are now exported to a `=NULL` directory. * **`Timepartition` with week granularity duplicated rows:** fixed on every engine (SQL Server, PostgreSQL, Netezza, MySQL, Oracle, SAP HANA, Teradata, ClickHouse) (internal improvement). * **`Performance Output Files Size` and `Disk Write Throughput` showed `unknown`** with `DataDriven`, `Timepartition` and `DBPartition`. The size now covers every file written by the run, and still ignores unrelated files already in the directory. ## Driver Improvements[​](#driver-improvements "Direct link to Driver Improvements") * **ArpeMSSQL 0.7.6** — reads `sql_variant` and the SQL Server 2025 `JSON` type; an unreadable column no longer drops the connection. * **ArpeTeradata 0.3.4** — new driver behind `--connectiontype adbc_teradata`. * **ArpeOracle 0.4.1** — stricter security defaults, see [above](#arpeoracle-041-security-defaults---connectiontype-adbc_oracle). ## Dependencies[​](#dependencies "Direct link to Dependencies") | Component | Version | | ---------------------------- | ----------------------------------------------------------------------------------------- | | .NET packages | 10.0.13 | | Microsoft.Data.SqlClient | 7.1.1 | | SAP HANA .NET driver | 2.30.27 (`Sap.Data.Hana.Net.v10.0`, native client libraries from SAP HANA Client 2.30.27) | | ArpeMSSQL ADBC driver | 0.7.6 | | ArpePGSQL ADBC driver | 0.4.7 | | ArpeOracle ADBC driver | 0.4.1 | | ArpeNetezza ADBC driver | 0.3.7 | | ArpeTeradata ADBC driver | 0.3.4 **(new)** | | AdbcFileExport | 0.5.4 | | AWSSDK.S3 | 4.0.104.4 | | Azure.Storage.Files.DataLake | 12.28.0 | ## Documentation[​](#documentation "Direct link to Documentation") * [Parallel Parameters](/latest/documentation/cli/parallel_parameters.md#physical-method): `Physical` method, deprecation of `Ctid`, `Rowid`, `Physloc` and `NZDataSlice`. * [Connection Parameters](/latest/documentation/cli/connection_parameters.md#adbc_teradata): `adbc_teradata` connection type. * [FASTBCP\_TTU\_PATH](/latest/documentation/environment-variables/fastbcp-ttu-path.md): new environment variable. * [Examples](/latest/documentation/examples/sql-server.md): the parallel examples use `Physical` for PostgreSQL, Oracle, SQL Server and Netezza; new Teradata examples in [Other Databases](/latest/documentation/examples/other-databases.md#teradata). --- # Release Notes 1.5 **Your SQL Server backups are now a data source.** FastBCP 1.5 reads tables straight from `.bak` files and exports them to Parquet — no restore, no SQL Server instance, no extra disk space. 0 SQL Server instance needed Point FastBCP at a backup directory. No server to provision, no credentials, no restore window. 5 M rows/s from an uncompressed backup Faster than reading the live database: 1.5× `adbc_mssql`, 3.6× `mssql`. 128–256 MB per thread The backup is read in place, out of core, and never loaded in memory. ## What's New: At a Glance[​](#whats-new-at-a-glance "Direct link to What's New: At a Glance") | | | | | - | ------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | **New source** | [`--connectiontype backup_mssql`](#sql-server-backup-files----connectiontype-backup_mssql): export tables from SQL Server full backups (`.bak`), striped or not, compressed or not | | | **Doc Wizard** | `backup_mssql` in the ADBC connectors, and **→** to accept a suggested value | | | **Licence** | A licence file is now always required, the 30-day trial included — [see what changes](#licence) | | | **Faster drivers** | ArpeMSSQL 4-way parallel reads up to **2× faster**, faster Oracle `NUMBER` reads | ## SQL Server Backup Files — `--connectiontype backup_mssql`[​](#sql-server-backup-files----connectiontype-backup_mssql "Direct link to sql-server-backup-files----connectiontype-backup_mssql") Need the data of a production database for analytics, an audit or a migration, but don't want to touch the production server — or restore a multi-terabyte backup first? FastBCP now reads **full backups** directly through the embedded **ArpeMSBackup** ADBC driver. * **`--server`** is the **directory** holding the backups. * **`--database`** is the **backup file**, or a pattern matching it. * That's it: no user, no password, no SQL Server. - Windows - Linux ``` .\FastBCP.exe ` --connectiontype backup_mssql ` --server "D:\Backups\MSSQL" ` --database "tpch_full.bak" ` --sourceschema "dbo" ` --sourcetable "orders" ` --directory "D:\export\orders" ` --fileoutput "orders.parquet" ` --parallelmethod Physical ` --paralleldegree 8 ``` ``` ./FastBCP \ --connectiontype backup_mssql \ --server "/var/opt/mssql/backup" \ --database "tpch_*.bak" \ --sourceschema "dbo" \ --sourcetable "orders" \ --directory "/export/orders" \ --fileoutput "orders.parquet" \ --parallelmethod Physical \ --paralleldegree 8 ``` ### Faster Than the Live Database[​](#faster-than-the-live-database "Direct link to Faster Than the Live Database") FastBCP to Parquet, degree 8, TPC-H. | Table | Source | Throughput | | | -------------------------------------------- | ---------------------------------------- | ------------------ | - | | `orders` (15 M rows) | **`backup_mssql`**, uncompressed backup | **≈ 5 M rows/s** | | | | `backup_mssql`, MS\_XPRESS / ZSTD backup | 2.1 – 2.6 M rows/s | | | | `adbc_mssql` on the live database | 3.3 M rows/s | | | | `mssql` on the live database | 1.4 M rows/s | | | `lineitem` clustered columnstore (60 M rows) | **`backup_mssql`** | **2.8 M rows/s** | | | | `adbc_mssql` on the live database | 2.4 M rows/s | | ### What It Reads[​](#what-it-reads "Direct link to What It Reads") | | | Supported | | - | ------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | | **SQL Server versions** | 2017, 2019, 2022 and 2025, on Windows or Linux | | | **Backup types** | Full and copy-only full backups, uncompressed or compressed with **MS\_XPRESS** or **ZSTD**, any `BLOCKSIZE` / `MAXTRANSFERSIZE` | | | **Striped backups** | `TO DISK = a, DISK = b, …`: a pattern (`--database "tpch_*.bak"`) or a `;`-separated list, in any order | | | **Several backups in one file** | `WITH NOINIT`: the last full backup of the file is read | | | **Database layout** | Several data files and filegroups | | | **Rowstore tables** | Heaps, clustered indexes, partitions, ROW / PAGE compression | | | **Columnstore tables** | Clustered columnstore, archive compression and open delta store included | | | **Data types** | Every SQL Server type: LOBs and row-overflow, `xml`, sparse columns, persisted computed columns, `sql_variant` (as text) — see the [datatypes mapping](/latest/datatypes-conversion/mssql/backup-parquet.md) | Good to know * **Parquet output only**, on Windows x64 and Linux x64. * `--parallelmethod` accepts `None` and `Physical` (which resolves to the new **Pages** method). * `--query` accepts `SELECT * | col1, col2, … FROM [schema.]table`. * **Refused with a clear message:** TDE databases and encrypted backups (`WITH ENCRYPTION`), which cannot be read without the server certificate; files without a full backup; incomplete stripe sets or stripes from different backups. **See also:** [SQL Server backup files](/latest/documentation/cli/connection_parameters.md#sql-server-backup-files-backup_mssql) · [Examples](/latest/documentation/examples/sql-server.md#sql-server-backup-files-backup_mssql) ## Doc Wizard[​](#doc-wizard "Direct link to Doc Wizard") * The [Doc Wizard](/latest/wizard.md) offers `backup_mssql` in the **ADBC (High Performance)** connectors. The server field becomes the backup directory (Windows or Linux path, following the chosen platform), the database field the backup file, and only `None` and `Physical` are offered as parallel methods. * **Type less:** in an empty field, the **→** (right arrow) key takes the suggested value. ## Licence[​](#licence "Direct link to Licence") Action required for trial users A licence file is now **always required**, including for the **free 30-day trial**: request your trial licence at [arpe.io](https://www.arpe.io). The build-date trial and the trial token embedded for the ADBC drivers are gone. `--help` and `--version` still run without a licence. * **Lookup order:** the default `FastBCP.lic` is searched in the **current directory**, then **next to the executable**. * **One file for everything:** a licence file can hold several blocks (FastBCP, ADBC drivers, other products) in any order. * **ADBC drivers:** the licence is passed to the drivers automatically (internal improvement). A driver licence of your own (`--sourceconnectstring`, `ARPEIO_ADBC_LICENCE` / `ARPEIO_ADBC_LICENCE_FILE`) wins, and a damaged ADBC block is reported as such. * **Exit code 99:** an `adbc_*` or `backup_mssql` run with no ADBC driver block (and no `ARPEIO_ADBC_LICENCE` / `ARPEIO_ADBC_LICENCE_FILE`) now stops with exit code **99** instead of falling back to a trial token. See [License](/latest/documentation/cli/license.md). ## Driver Improvements[​](#driver-improvements "Direct link to Driver Improvements") * **ArpeMSSQL 0.7.8 — up to 2× faster parallel reads** on 4-way parallel exports (internal improvement). Also fixes a crash when the thread that loaded the driver exits. * **ArpeOracle 0.4.3** — faster `NUMBER` to float64 reads, and choice of the Native Network Encryption integrity algorithm with `adbc.arpeoracle.data_integrity_types`. * **ArpeTeradata 0.3.5** — `uri` and ADO.NET `connection_string` are parsed, like the other drivers. ## Dependencies[​](#dependencies "Direct link to Dependencies") | Component | Version | | ------------------------ | ------------------------------------- | | ArpeMSBackup ADBC driver | 0.1.6 **(new)** | | ArpeMSSQL ADBC driver | 0.7.8 | | ArpeOracle ADBC driver | 0.4.3 | | ArpeNetezza ADBC driver | 0.3.8 (no driver code change) | | ArpeTeradata ADBC driver | 0.3.5 | | AdbcFileExport | 0.5.5 (`arpemsbackup` driver profile) | The other components are unchanged since [1.4](/latest/release-notes/release-notes-1.4.md#dependencies). ## Documentation[​](#documentation "Direct link to Documentation") * [Connection Parameters](/latest/documentation/cli/connection_parameters.md#sql-server-backup-files-backup_mssql): `backup_mssql` connection type. * [Parallel Parameters](/latest/documentation/cli/parallel_parameters.md#physical-method): `Physical` resolves to `Pages` on SQL Server backup files. * [Datatypes conversion](/latest/datatypes-conversion/mssql/backup-parquet.md): SQL Server backup files → Parquet. * [Examples](/latest/documentation/examples/sql-server.md#sql-server-backup-files-backup_mssql): exports from backup files, striped backups. * [License](/latest/documentation/cli/license.md): lookup order, trial licence, exit codes. --- # Release Notes 1.6 **Your backups are data sources — and they are fast.** FastBCP 1.6 reads tables straight from **Oracle RMAN backup sets**, full and **incremental**, **encrypted SQL Server backups** and **SQL Server full and differential backups**, always at their latest version, exports SQL Server backups up to **2.8× faster**, and opens a backup it has already read in a few milliseconds. No restore, no database instance, no extra disk space. 0 Oracle instance needed Point FastBCP at the directory of the RMAN backup pieces. No database to restore, no credentials. 2.8× faster SQL Server backup exports 150 million rows from a compressed, striped backup to Parquet in 12 seconds. \~20 ms to open a backup again The next exports from the same SQL Server or Oracle backup start right away. 3× faster in scheduled tasks On Windows, a run without a window now gets the full speed of the CPU. ## What's New: At a Glance[​](#whats-new "Direct link to What's New: At a Glance") | | | | Since | | - | ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------- | | | **New source** | [`--connectiontype backup_rman`](#oracle-rman-backup-sets----connectiontype-backup_rman): export tables from Oracle RMAN backup sets, multi-piece or not, compressed or not | 1.6.0 | | | **Incremental RMAN backups** | [The latest version of a table](#incremental-rman-backups), from a level 0 and its incremental backups, levels 1 to 4, the whole table. [Read this before upgrading](#1-6-8) | 1.6.8 | | | **Differential backups** | [The latest version of a table](#differential-sql-server-backups), from a full backup and its differential, the whole table. [Read this before upgrading](#1-6-7) | 1.6.7 | | | **Encrypted backups** | [`WITH ENCRYPTION` and TDE databases](#encrypted-sql-server-backups), read with the private key of the certificate, no SQL Server needed | 1.6.6 | | | **SQL Server backups** | [Exports up to 2.8× faster](#sql-server-backups-faster-and-read-right), large striped backups ready in seconds | 1.6.0 – 1.6.3 | | | **Backups opened again** | [In milliseconds](#backups-opened-again-in-milliseconds), for SQL Server backups and Oracle RMAN backup sets; [`FASTBCP_INDEX_DIR`](/latest/documentation/environment-variables/fastbcp-index-dir.md) for accounts without a home (1.6.6) | 1.6.3 – 1.6.6 | | | **Backup or live database** | [The same Parquet](#the-same-parquet-as-adbc_mssql) from `backup_mssql` and `adbc_mssql`, GeoParquet and float vectors included | 1.6.5 | | | **Columnstore backups** | [7× less memory](#far-less-memory-on-columnstore-tables) on a wide clustered columnstore table | 1.6.5 | | | **SQL Server dates** | [The whole `datetime2` range](#the-whole-sql-server-date-range), `9999-12-31` sentinels included, with `backup_mssql` and `adbc_mssql` | 1.6.2 | | | **Reliability** | More SQL Server and Oracle backup tables read, [with the right values](#sql-server-backups-faster-and-read-right); [a damaged `.bak` no longer hangs an export](#1-6-6); [the end of some compressed backups no longer lost](#1-6-7); [an RMAN set without its last piece no longer read short](#1-6-8) | 1.6.0 – 1.6.8 | | | **Unsigned 64-bit integers** | [Exact values](#unsigned-64-bit-integers) from HFSQL (OLE DB) and MySQL `BIGINT UNSIGNED`, in every format | 1.6.4 | | | **Windows** | [Full speed without a window](#windows-full-speed-in-scheduled-tasks): scheduled tasks, services and orchestrators no longer run on the efficiency cores | 1.6.0 | | | **Doc Wizard** | `backup_rman` in the ADBC connectors; incremental chains in `--database` (1.6.8) | 1.6.0 – 1.6.8 | | | **License** | The [ARPE.IO Software License Agreement](/latest/documentation/cli/license.md) ships with FastBCP | 1.6.0 | ## Oracle RMAN Backup Sets — `--connectiontype backup_rman`[​](#oracle-rman-backup-sets----connectiontype-backup_rman "Direct link to oracle-rman-backup-sets----connectiontype-backup_rman") Need the data of an Oracle database that is not reachable — on a backup server, in an archive, a database decommissioned long ago — or don't want to restore a large backup to read one table? FastBCP now reads **RMAN backup sets** directly through the embedded **ArpeOraBackup** ADBC driver. * **`--server`** is the **directory** holding the backup pieces. * **`--database`** names the **pieces**: names or patterns, separated by `;` (`"full_*"`, `"full_*;ctl_*"`). * That's it: no user, no password, no Oracle. - Windows - Linux ``` .\FastBCP.exe ` --connectiontype backup_rman ` --server "D:\Backups\RMAN\ORCL" ` --database "full_*" ` --sourceschema "SALES" ` --sourcetable "ORDERS" ` --directory "D:\export\orders" ` --fileoutput "orders.parquet" ` --parallelmethod Physical ` --paralleldegree 8 ``` ``` ./FastBCP \ --connectiontype backup_rman \ --server "/backup/rman/orcl" \ --database "full_*" \ --sourceschema "SALES" \ --sourcetable "ORDERS" \ --directory "/export/orders" \ --fileoutput "orders.parquet" \ --parallelmethod Physical \ --paralleldegree 8 ``` ### Every RMAN Compression[​](#every-rman-compression "Direct link to Every RMAN Compression") FastBCP to Parquet, a 1 M-row table, open of the backup included, Windows laptop (hybrid CPU), degree 8, first export of the backup. | Backup | Elapsed | | ------------------------------------------- | ---------- | | Uncompressed | **0.73 s** | | `AS COMPRESSED BACKUPSET`, MEDIUM | 0.83 s | | `AS COMPRESSED BACKUPSET`, HIGH | 0.82 s | | `AS COMPRESSED BACKUPSET`, LOW | 1.04 s | | `AS COMPRESSED BACKUPSET`, BASIC | 7.0 s | | `AS COMPRESSED BACKUPSET`, HIGH, Oracle 19c | 6.0 s | The next exports from the same backup skip almost all of the open: see [Backups opened again in milliseconds](#backups-opened-again-in-milliseconds). ### What It Reads[​](#what-it-reads "Direct link to What It Reads") | | | Supported | | - | ------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | | **Oracle versions** | 19c, 21c, 23ai and 26ai, on Linux x86-64 | | | **Backup types** | Full backup sets of a database, tablespaces, datafiles or PDBs, uncompressed or compressed with **BASIC**, **LOW**, **MEDIUM** or **HIGH**; [incremental backups](#incremental-rman-backups), levels 0 to 4 (1.6.8) | | | **Multi-piece and multi-set backups** | `MAXPIECESIZE`, several channels, `FILESPERSET`: every piece, by patterns or a `;`-separated list, in any order | | | **Several backups** | The latest version of each datafile is read | | | **Database layout** | Container databases (root and PDBs) and non-CDB, bigfile and smallfile tablespaces | | | **Tables** | Heap tables, with chained and migrated rows, more than 255 columns | | | **Data types** | Numbers, text in the database and national character sets, binary floats, `RAW`, `LONG`, `LONG RAW`, `DATE` and `TIMESTAMP` with or without time zone — see the [datatypes mapping](/latest/datatypes-conversion/oracle/backup-parquet.md) | Good to know * **Parquet output only**, on Windows x64 and Linux x64. * `--parallelmethod` accepts `None` and `Physical` (which resolves to the **Pages** method). * `--query` accepts `SELECT * | col1, col2, … FROM [[container.]owner.]table`. * Incremental **level 1** to **4** backups are read with their level 0 since [1.6.8](#incremental-rman-backups); from 1.6.1 to 1.6.7 they were refused with a clear message. * **Refused with a clear message:** encrypted backup sets (`SET ENCRYPTION`); partitioned, index-organized and clustered tables; LOB, `INTERVAL`, `ROWID`, `JSON`, `VECTOR` and object columns (the other columns of the table can be exported with `--query`); incomplete multi-piece sets. **See also:** [Oracle RMAN backup sets](/latest/documentation/cli/connection_parameters.md#oracle-rman-backup-sets-backup_rman) · [Examples](/latest/documentation/examples/oracle.md#oracle-rman-backup-sets-backup_rman) ### Incremental Backups: the Latest Version of a Table[​](#incremental-rman-backups "Direct link to Incremental Backups: the Latest Version of a Table") Your RMAN strategy is a level 0 on Sunday and a level 1 every night, and the data you need is last night's, not Sunday's. Since 1.6.8, give FastBCP the level 0 and the incremental backups on it, and it reads the table in its latest version. No Oracle, no restore, no recovery, and always the **whole table**. * **`--database`** names the chain: a list in any order, a pattern, or the whole directory. Older backups can match too. * The pattern `**` reaches the subdirectories of `--server`: `"l0/*;l1/**"` for a directory per level and per day (`"l0\*;l1\**"` on Windows, where `/` works too), `"**"` for everything below it. * FastBCP checks that each incremental backup belongs to the chain, whatever the files are called. A missing link fails the export, naming the backup needed: no silent hole in your data. - Windows - Linux ``` .\FastBCP.exe ` --connectiontype backup_rman ` --server "D:\Backups\RMAN\ORCL" ` --database "l0\*;l1\**" ` --sourceschema "SALES" ` --sourcetable "ORDERS" ` --directory "D:\export\orders" ` --fileoutput "orders.parquet" ` --parallelmethod Physical ` --paralleldegree 8 ``` ``` ./FastBCP \ --connectiontype backup_rman \ --server "/backup/rman/orcl" \ --database "**" \ --sourceschema "SALES" \ --sourcetable "ORDERS" \ --directory "/export/orders" \ --fileoutput "orders.parquet" \ --parallelmethod Physical \ --paralleldegree 8 ``` | | | Supported | | - | -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | | **Incremental backups** | Levels 0 to 4, differential and cumulative, `FROM SCN`, each with its own compression | | | **Layout** | One directory, a directory per level or per day, anywhere below `--server` with `**` | | | **Tables** | Every table and data type a full backup reads, in the root, the PDBs or a non-CDB | | | **Versions** | Backups of Oracle 19c, 23ai and 26ai | | | **A backup that cannot be used** | [The export fails, naming it](/latest/documentation/cli/connection_parameters.md#rman-backups-that-cannot-be-used), and the logs say what can be done about it | | | **Settings** | [`FASTBCP_BACKUP_RESTORE_POINT`](/latest/documentation/environment-variables/fastbcp-backup-restore-point.md) and [`FASTBCP_BACKUP_RESTORE_MODE`](/latest/documentation/environment-variables/fastbcp-backup-restore-mode.md) now apply to `backup_rman` too | Checked against the live tables, row for row, through chains of incremental backups on each of these versions. Reading through a chain costs little more than reading the level 0 alone. A 20 M-row table (2.4 GB), each level 1 rewriting half its blocks, read with 8 threads, warm cache: | Backups read | Uncompressed | MEDIUM | BASIC | | ------------------- | ------------ | ------ | ----- | | Level 0 alone | 0.27 s | 0.32 s | 5.2 s | | Level 0 + 1 level 1 | 0.31 s | — | — | | Level 0 + 3 level 1 | — | 0.40 s | 8.0 s | | Level 0 + 6 level 1 | 0.34 s | — | — | Before upgrading Some exports change: a level 0 and its incremental backups, refused up to 1.6.7, are now read; a backup set **without its last piece**, read short up to 1.6.7, now fails, naming it. [`FASTBCP_BACKUP_RESTORE_POINT=full`](/latest/documentation/environment-variables/fastbcp-backup-restore-point.md) reads the level 0 only. See [Upgrading to 1.6.8](/latest/documentation/cli/connection_parameters.md#upgrading-to-1-6-8), line by line. Good to know * The redo is not applied: an incremental backup taken while the database is open is read as its blocks are. * With BASIC compression, a long chain of level 1 backups costs more to read. A cumulative backup, or a new level 0, keeps it short. * After a new incremental backup, only the new backup is opened in full: the level 0 already opened stays fast. * Image copies (`BACKUP AS COPY`, `RECOVER COPY` strategies) are not read. ## SQL Server Backups: Faster, and Read Right[​](#sql-server-backups-faster-and-read-right "Direct link to SQL Server Backups: Faster, and Read Right") `--connectiontype backup_mssql` arrived in 1.5. Across the 1.6 releases it got much faster on large backups, and reads more tables, with the right values. ### Up to 2.8× Faster[​](#up-to-2-8x-faster "Direct link to Up to 2.8× Faster") TPC-H SF100 database (150 M-row `orders` table, clustered columnstore), backed up with `COMPRESSION` and striped over 6 files (36 GB), exported to Parquet with `--parallelmethod Physical --paralleldegree 24`, Windows laptop. | Export of `orders` (150,000,000 rows) | Elapsed | | ----------------------------------------- | ---------- | | FastBCP 1.5.1 | error | | FastBCP 1.6.0 | 33 s | | FastBCP 1.6.3, first export of the backup | 19.4 s | | FastBCP 1.6.3, next exports of the backup | **11.8 s** | Large backups striped over several files also start much sooner since 1.6.0: | Before the first row | 1.5.1 | 1.6.0 | | ---------------------------- | ----- | --------- | | Compressed backup, 6 files | 200 s | **25 s** | | Uncompressed backup, 6 files | 24 s | **7.4 s** | Faster reading of compressed backups and of clustered columnstore tables: internal improvement. ### The Whole SQL Server Date Range[​](#the-whole-sql-server-date-range "Direct link to The Whole SQL Server Date Range") Real tables hold dates far from today: `9999-12-31` as "no end date", or a mistyped year such as `0201` or `9600`. SQL Server accepts them all, but a single such `datetime2(7)` value failed the whole export with `date … is out of range`. Since 1.6.2, `datetime2(7)` and `datetimeoffset(7)` columns are exported with a **microsecond** unit by default, with both `--connectiontype backup_mssql` and `adbc_mssql`: every date from `0001-01-01` to `9999-12-31` is exported, and a backup and a live export of the same table give the same Parquet schema. ### The Same Parquet as `adbc_mssql`[​](#the-same-parquet-as-adbc_mssql "Direct link to the-same-parquet-as-adbc_mssql") Reading a table from its backup should not change what your pipeline receives. Since 1.6.5, a `--connectiontype backup_mssql` export and an `adbc_mssql` export of the same table give the same Parquet, values and schema. Spatial columns come out ready to use in GeoParquet readers, and vectors as real lists of floats. | | Column type | Before 1.6.5 | 1.6.5 | | - | --------------------------- | ------------------------------- | ------------------------------------------------------ | | | **`geography`, `geometry`** | SQL Server binary serialization | WKB with GeoParquet metadata and the CRS from the SRID | | | **`vector(n)`** | SQL Server binary serialization | List of `n` 32-bit floats | | | **`time(7)`** | Nanosecond unit | Microsecond unit | | | **`sql_variant`** | Text | Text, written as with `adbc_mssql` | warning If your pipeline reads these columns from `backup_mssql` exports, check it before upgrading. To keep the SQL Server serialization of spatial columns, see [`adbc.arpemsbackup.geospatial`](/latest/datatypes-conversion/mssql/backup-parquet.md). Good to know * `json` and `vector(n, float16)` columns (SQL Server 2025) are refused with a clear message. Export the other columns by listing them in `--query`, or use `adbc_mssql`. * [`FASTBCP_UID_STRING_CASING`](/latest/documentation/environment-variables/fastbcp-uid-string-casing.md) now applies to `backup_mssql` too. ### Far Less Memory on Columnstore Tables[​](#far-less-memory-on-columnstore-tables "Direct link to Far Less Memory on Columnstore Tables") Exporting a wide clustered columnstore table from a backup could take more memory than many servers have. Since 1.6.5, memory stays bounded (internal improvement). | Wide clustered columnstore table, `--parallelmethod Physical --paralleldegree 8` | Peak memory | | -------------------------------------------------------------------------------- | ----------- | | Before 1.6.5 | 42 GB | | FastBCP 1.6.5 | **5.9 GB** | ### Differential Backups: the Latest Version of a Table[​](#differential-sql-server-backups "Direct link to Differential Backups: the Latest Version of a Table") Your backup plan is a full backup on Sunday and a differential every night, and the data you need is last night's, not Sunday's. Since 1.6.7, give FastBCP the full backup and its differential, and it reads the table in its latest version. No SQL Server, no restore, and always the **whole table**. * **`--database`** names the files: a list in any order, or a pattern. Older backups can match too. * FastBCP checks that the differential was taken from that full backup, whatever the files are called. - Windows - Linux ``` .\FastBCP.exe ` --connectiontype backup_mssql ` --server "D:\Backups\MSSQL" ` --database "sales_full.bak;sales_diff.bak" ` --sourceschema "dbo" ` --sourcetable "orders" ` --directory "D:\export\orders" ` --fileoutput "orders.parquet" ` --parallelmethod Physical ` --paralleldegree 8 ``` ``` ./FastBCP \ --connectiontype backup_mssql \ --server "/var/opt/mssql/backup" \ --database "sales_*.bak" \ --sourceschema "dbo" \ --sourcetable "orders" \ --directory "/export/orders" \ --fileoutput "orders.parquet" \ --parallelmethod Physical \ --paralleldegree 8 ``` | | | Supported | | - | -------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | | | **Backups** | One file each, `WITH NOINIT` in one file, striped, compressed or not, encrypted | | | **Tables** | Every table and data type a full backup reads, rowstore and clustered columnstore | | | **Versions** | Backups of SQL Server 2017, 2019, 2022 and 2025 | | | **A backup that cannot be used** | [The export fails, naming it](/latest/documentation/cli/connection_parameters.md#backups-that-cannot-be-used), and the logs say what can be done about it | Checked against the live tables, through several forms of differential on each of these versions, and against a `RESTORE` of the same backups. Before upgrading A backup that could be the newest and cannot be used now fails the export, so **some exports that worked with 1.6.6 fail**, and a `WITH NOINIT` file with differentials reads fresher rows. [`FASTBCP_BACKUP_RESTORE_POINT=full`](/latest/documentation/environment-variables/fastbcp-backup-restore-point.md) goes back to the last full backup. See [Upgrading to 1.6.7](/latest/documentation/cli/connection_parameters.md#upgrading-to-1-6-7), line by line. Good to know * Log backups are not applied. A differential taken during writes is read as its pages are, and can give other rows than a `RESTORE`. For an exact image, back up while the table is quiet. * With [`FASTBCP_BACKUP_RESTORE_MODE=best_effort`](/latest/documentation/environment-variables/fastbcp-backup-restore-mode.md), the backups skipped are reported on the standard error output only, not in the FastBCP logs. The logs do not name the files read either. * Against 1.6.6, the peak memory of a rowstore export is 20 to 25 % lower. * Not measured: a differential on a cold disk cache or on a network share. ### Encrypted Backups, Read with Their Certificate[​](#encrypted-sql-server-backups "Direct link to Encrypted Backups, Read with Their Certificate") Your backups are encrypted, as they should be, and until now that meant restoring them on a server that holds the certificate before reading a single table. Since 1.6.6, give FastBCP the private key of the certificate, and it reads backups `WITH ENCRYPTION` and backups of **TDE** databases directly. No SQL Server, no restore. * **`--sourceuser`** is the file of the private key. * **`--sourcepassword`** is its password, if it has one. It is hidden in all logs. - Windows - Linux ``` .\FastBCP.exe ` --connectiontype backup_mssql ` --server "D:\Backups\MSSQL" ` --database "sales_encrypted.bak" ` --sourceuser "D:\Secure\Keys\MyCert.pvk" ` --sourcepassword "KeyPassword" ` --sourceschema "dbo" ` --sourcetable "orders" ` --directory "D:\export\orders" ` --fileoutput "orders.parquet" ` --parallelmethod Physical ` --paralleldegree 8 ``` ``` ./FastBCP \ --connectiontype backup_mssql \ --server "/var/opt/mssql/backup" \ --database "sales_encrypted.bak" \ --sourceuser "/secure/keys/MyCert.pvk" \ --sourcepassword "KeyPassword" \ --sourceschema "dbo" \ --sourcetable "orders" \ --directory "/export/orders" \ --fileoutput "orders.parquet" \ --parallelmethod Physical \ --paralleldegree 8 ``` | | | Supported | | - | ------------------------- | ---------------------------------------------------------------------------------------------- | | | **Encryption** | `WITH ENCRYPTION`, TDE, or both, also under two certificates; AES 128, 192 and 256, Triple DES | | | **Backups** | Compressed or not, striped, from SQL Server 2017, 2019, 2022 and 2025 | | | **Key files** | `.pvk`, `.pfx` / `.p12`, PEM, DER, or a `.cer` with its key next to it | | | **Without the right key** | The export stops, and the message names the certificate by its thumbprint | Checked against the live tables: the Parquet of an encrypted backup equals the `adbc_mssql` export of the same table, on Windows and on Linux. Good to know * SQL Server gives the files written by `BACKUP CERTIFICATE` to its service account alone. See [Encrypted backups](/latest/documentation/cli/connection_parameters.md#encrypted-backups) for how to export the key and read it. * Reading an uncompressed backup of a TDE database takes longer than a plain one, as every page is decrypted. The cost is far lower on a compressed backup. * Keys in an EKM provider are not supported. An uncompressed backup taken while the TDE key was being changed is refused when the export reaches a page still under the previous key. warning Whoever has the private key can read the backups it opens, with no server involved: keep the key file as carefully as the backups themselves. ## Backups Opened Again in Milliseconds thanks to Auto-Cache[​](#backups-opened-again-in-milliseconds "Direct link to Backups Opened Again in Milliseconds thanks to Auto-Cache") Exporting several tables from one backup, one FastBCP run per table, used to read the structure of the whole backup again for every run: seconds, or minutes on a large compressed backup. Now FastBCP remembers each backup it has opened, and the next runs on the same backup start right away. | Opening the backup | First export | Next exports | | ------------------------------------------------- | ------------ | ------------ | | SQL Server, 3.8 GB compressed backup (1.6.3) | 2.1 s | **0.003 s** | | Oracle 19c RMAN backup, BASIC compression (1.6.4) | 6.9 s | **\~0.02 s** | Good to know * Nothing to set: it is on by default for `--connectiontype backup_mssql` and `backup_rman`. * FastBCP keeps a small file per backup (about 1 MB for a 4 GB SQL Server backup, a few MB for an Oracle one) in the local application data of the user running it: `%LOCALAPPDATA%\ArpeMSBackup\index` and `%LOCALAPPDATA%\ArpeOraBackup\index` on Windows, `~/.cache/arpemsbackup/index` and `~/.cache/arpeorabackup/index` on Linux. * A backup that is rewritten or moved is opened in full again. Files unused for 30 days, or beyond 2 GB in all, are removed automatically. * After a new incremental RMAN backup, only the new backup is opened in full (since 1.6.8). * A service account may have no usable home: since 1.6.6, [`FASTBCP_INDEX_DIR`](/latest/documentation/environment-variables/fastbcp-index-dir.md) names another directory, and FastBCP warns when the index cannot be saved, instead of opening the backup in full at every run without saying so. ## Unsigned 64-bit Integers[​](#unsigned-64-bit-integers "Direct link to Unsigned 64-bit Integers") PC SOFT **HFSQL** "8-byte unsigned integers", read through `--connectiontype oledb`, could not be exported exactly: Parquet readers saw them as floating-point numbers (`18446744073709551615` read as `1.8446744073709552e+19`), and CSV exports stopped on values above 9,223,372,036,854,775,807. Since 1.6.4 they keep their exact value in every format. | | Format | 1.6.4 | | - | ------------- | ----------------------------------------------------------------------------------------------- | | | **Parquet** | Unsigned 64-bit integer (`UINT_64`, `UBIGINT` in DuckDB), instead of a decimal read as `DOUBLE` | | | **CSV / TSV** | Plain integer text, up to 18,446,744,073,709,551,615 | | | **JSON** | Integer | | | **BSON** | `Int64`, or a lossless `Decimal128` above the `Int64` range | Good to know * MySQL **`BIGINT UNSIGNED`** columns are now written to Parquet as unsigned 64-bit integers too, instead of text. * CSV and TSV exports no longer stop on any decimal value beyond the 64-bit integer range, whatever the source. ## Windows: Full Speed in Scheduled Tasks[​](#windows-full-speed-in-scheduled-tasks "Direct link to Windows: Full Speed in Scheduled Tasks") On Windows 11, a program started **without a window** — a scheduled task, a service, an orchestrator, a remote shell — runs on the **efficiency cores** of a hybrid CPU, at a reduced clock. FastBCP now asks Windows for full speed when it starts. | Same export, started without a window | Elapsed | | ------------------------------------- | --------- | | FastBCP 1.6.0 | **5.7 s** | | FastBCP 1.5.1 | 18.1 s | Set `FASTBCP_ECOQOS=1` to keep FastBCP under the Windows policy, on a host where it must stay discreet. ## Doc Wizard[​](#doc-wizard "Direct link to Doc Wizard") The [Doc Wizard](/latest/wizard.md) offers `backup_rman` in the **ADBC (High Performance)** connectors: the server field becomes the directory of the backup pieces, the database field the piece names or patterns, and only `None` and `Physical` are offered as parallel methods. Since 1.6.8, its help shows how to name a whole incremental chain (`l0/*;l1/**`, `**`). ## License[​](#license "Direct link to License") FastBCP now ships the **ARPE.IO Software License Agreement** (`LICENSE.txt` in the zip). The license grant is unchanged; the agreement adds that the binaries may not be reverse engineered, manually or with the help of an AI system, and that the software may not be used to train an AI model to reproduce it. Using an AI assistant to operate FastBCP stays permitted. See [License](/latest/documentation/cli/license.md). ## Release History[​](#release-history "Direct link to Release History") ### 1.6.8[​](#1-6-8 "Direct link to 1.6.8") | | | | | - | ----------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | **`backup_rman`** | [Incremental backups](#incremental-rman-backups), levels 0 to 4, differential and cumulative: the latest version of a table, from a level 0 and the incremental backups on it | | | **`backup_rman`** | [`--database`](/latest/documentation/cli/connection_parameters.md#naming-the-backup-pieces) takes paths, absolute or relative to `--server`, and `**` for any number of subdirectories (`"l0/*;l1/**"`). Each entry must match a file, or the export fails naming it | | | **`backup_rman`** | [`FASTBCP_BACKUP_RESTORE_POINT`](/latest/documentation/environment-variables/fastbcp-backup-restore-point.md) and [`FASTBCP_BACKUP_RESTORE_MODE`](/latest/documentation/environment-variables/fastbcp-backup-restore-mode.md) now apply, and the logs say which settings apply and what can be done when a backup is refused | | | **`backup_rman`** | Fixed: a backup set without its last piece was read short, without an error. It now fails, naming it | | | **`backup_rman`** | Fixed: a column added with a `DEFAULT` read `NULL` on the rows written before; a table truncated, then its tablespace backed up alone, read empty (now refused, naming it) | | | **`backup_rman`** | Archived log pieces in the directory, more than 64 pieces and `COPIES 2` are read instead of refused; the tables of a dropped PDB are no longer listed | | | **Doc Wizard** | Incremental chains in `--database` | warning A level 0 and its incremental backups, refused up to 1.6.7, now read **fresher rows**: `FASTBCP_BACKUP_RESTORE_POINT=full` keeps the level 0. A backup set without its last piece now fails the export. See [Upgrading to 1.6.8](/latest/documentation/cli/connection_parameters.md#upgrading-to-1-6-8). | Component | Version | | ------------------------- | ------- | | ArpeOraBackup ADBC driver | 0.3.1 | ### 1.6.7[​](#1-6-7 "Direct link to 1.6.7") | | | | | - | ------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | **`backup_mssql`** | [Differential backups](#differential-sql-server-backups): the latest version of a table, from a full backup and its differential | | | **`backup_mssql`** | [`FASTBCP_BACKUP_RESTORE_POINT`](/latest/documentation/environment-variables/fastbcp-backup-restore-point.md) and [`FASTBCP_BACKUP_RESTORE_MODE`](/latest/documentation/environment-variables/fastbcp-backup-restore-mode.md) choose which version is read, and what happens when a backup cannot be used | | | **`backup_mssql`** | The logs say which settings apply, and what can be done when a backup is refused | | | **`backup_mssql`** | Fixed: the end of some compressed backups was lost without an error, on about 2 % of the backups tried. No page was lost on 168 test backups | | | **`backup_mssql`** | Fixed: a file or partial backup after a full backup was taken for a full backup. It is now refused by name | | | **Doc Wizard** | Full and differential backups in `--database` | warning **Some exports that worked with 1.6.6 now fail**, naming the backup: a `WITH NOINIT` file whose newest differential has its full backup elsewhere, or with a file, filegroup or partial backup after the full; a file that lost its end, even with `best_effort` when it holds no other version. And a `WITH NOINIT` file with differentials now reads fresher rows. See [Upgrading to 1.6.7](/latest/documentation/cli/connection_parameters.md#upgrading-to-1-6-7). The first export from each backup reads its structure once more. | Component | Version | | ------------------------ | ------- | | ArpeMSBackup ADBC driver | 0.2.0 | ### 1.6.6[​](#1-6-6 "Direct link to 1.6.6") | | | | | - | --------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | **`backup_mssql`** | [Encrypted backups](#encrypted-sql-server-backups): `WITH ENCRYPTION` and TDE databases, read with the private key of the certificate | | | **`backup_mssql`** | Fixed: a damaged or crafted `.bak` could make an export hang. It now stops with an error | | | **`backup_mssql`, `backup_rman`** | [`FASTBCP_INDEX_DIR`](/latest/documentation/environment-variables/fastbcp-index-dir.md) names the directory of the backup index, and a warning says when the index cannot be saved | | | **Doc Wizard** | The key file and its password for `backup_mssql` | warning A backup whose data ends past the end of the file now stops at the open with `truncated or damaged backup`: it failed before too, later in the export. On Windows, `FASTBCP_INDEX_DIR` must name its drive and start from its root: `C:index` and `\index` stop the run at startup. | Component | Version | | ------------------------- | ------- | | ArpeMSBackup ADBC driver | 0.1.17 | | ArpeOraBackup ADBC driver | 0.1.3 | ### 1.6.5[​](#1-6-5 "Direct link to 1.6.5") | | | | | - | ------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | | | **`backup_mssql`** | [The same Parquet as `adbc_mssql`](#the-same-parquet-as-adbc_mssql): `geography`, `geometry`, `vector`, `time(7)` and `sql_variant` are written differently | | | **`backup_mssql`** | [Far less memory on columnstore tables](#far-less-memory-on-columnstore-tables) | | | **`backup_mssql`** | `json` and `vector(n, float16)` columns (SQL Server 2025) are refused with a clear message | | | **`backup_mssql`** | [`FASTBCP_UID_STRING_CASING`](/latest/documentation/environment-variables/fastbcp-uid-string-casing.md) now applies | | Component | Version | | ------------------------ | ------- | | ArpeMSBackup ADBC driver | 0.1.15 | ### 1.6.4[​](#1-6-4 "Direct link to 1.6.4") | | | | | - | --------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | | **`backup_rman`** | [Backups opened again in milliseconds](#backups-opened-again-in-milliseconds); faster reads on Windows (internal improvement) | | | **`backup_rman`: `LONG` / `LONG RAW`** | Values longer than a database block came out wrong; they are now exported whole, up to 2 GB | | | **`backup_rman`: `TIMESTAMP WITH LOCAL TIME ZONE`** | Values were shifted by the time zone offset of the database; they are now right. A database time zone given as a region name (`Europe/Paris`) is refused for these columns, with a clear message | | | **OLE DB (HFSQL), MySQL** | [Unsigned 64-bit integers](#unsigned-64-bit-integers) exported exactly | warning If you exported Oracle tables with `LONG` / `LONG RAW` or `TIMESTAMP WITH LOCAL TIME ZONE` columns from RMAN backups with FastBCP 1.6.0 to 1.6.3, export them again with 1.6.4. | Component | Version | | ------------------------- | ------- | | ArpeOraBackup ADBC driver | 0.1.2 | ### 1.6.3[​](#1-6-3 "Direct link to 1.6.3") | | | | | - | ------------------ | --------------------------------------------------------------------------------------------------------------------------------------- | | | **`backup_mssql`** | [Exports up to 2.8× faster](#up-to-2-8x-faster), [backups opened again in milliseconds](#backups-opened-again-in-milliseconds) | | | **`backup_mssql`** | Clustered columnstore fixes: columns starting with `NULL` values, `datetimeoffset(0)` to `(2)`, large `decimal`; errors name the column | | Component | Version | | ------------------------ | ------- | | ArpeMSBackup ADBC driver | 0.1.12 | ### 1.6.2[​](#1-6-2 "Direct link to 1.6.2") | | | | | - | -------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | | | **`backup_mssql`, `adbc_mssql`** | [The whole SQL Server date range](#the-whole-sql-server-date-range): `datetime2(7)` and `datetimeoffset(7)` as microseconds by default | | | **`backup_mssql`** | Fixes: backup directories with accented characters, clustered columnstore `nchar` / `nvarchar` strings and repeated values | | Component | Version | | ------------------------ | ------- | | ArpeMSBackup ADBC driver | 0.1.9 | ### 1.6.1[​](#1-6-1 "Direct link to 1.6.1") | | | | | - | ----------------- | ---------------------------------------------------------------------------------------------- | | | **`backup_rman`** | Incremental **level 1** backup sets are now refused with a clear message naming the backup set | FastBCP 1.6.0 read an incremental level 1 backup set as a full backup: the export held only the rows of the blocks changed since the previous backup, with no error. Full backups and incremental level 0 backups were read correctly. warning If you exported tables with FastBCP 1.6.0 from RMAN **incremental level 1** backups, export them again from the full (or level 0) backup with 1.6.1 or later. | Component | Version | | ------------------------- | ------- | | ArpeOraBackup ADBC driver | 0.1.1 | ### 1.6.0[​](#1-6-0 "Direct link to 1.6.0") | | | | | - | ------------------ | --------------------------------------------------------------------------------------------------------------------- | | | **New source** | [`--connectiontype backup_rman`](#oracle-rman-backup-sets----connectiontype-backup_rman) | | | **`backup_mssql`** | Large striped backups ready in seconds, fixes for older databases, `PAGE`-compressed and clustered columnstore tables | | | **Windows** | [Full speed in scheduled tasks](#windows-full-speed-in-scheduled-tasks) | | | **Doc Wizard** | [`backup_rman`](#doc-wizard) | | | **License** | [ARPE.IO Software License Agreement](#license) | | Component | Version | | ------------------------- | -------------------------------------- | | ArpeOraBackup ADBC driver | 0.1.0 **(new)** | | ArpeMSBackup ADBC driver | 0.1.8 | | AdbcFileExport | 0.5.6 (`arpeorabackup` driver profile) | The other components are unchanged since 1.5.1. --- # Release Notes 1.7 **Your Db2 data, in Parquet, with nothing to install.** FastBCP 1.7 brings IBM Db2 into the ADBC FastDrivers: the embedded **ArpeDb2** driver talks to Db2 directly, so the IBM client, its configuration and its DSNs are gone from your pipeline. Parallel exports out of the box, **one thread per data partition** on partitioned tables, and the same command on Windows and Linux. And because a fast export is only worth it when it is right, 1.7 also makes Db2 and Oracle queries, Db2 `DECIMAL` values and SQL Server backups come out exactly as your database has them. 0 IBM client to install No Data Server Driver, no CLI, no DSN. The driver ships inside FastBCP. 7 parallel methods on Db2 Including DBPartition: each thread reads its own data partition. 1 command, Windows and Linux The same command line on both, straight from Db2 to Parquet. 102 / 102 AdventureWorks tables from backups Identical to SQL Server, ROW and PAGE compressed, typed XML included. ## What's New: At a Glance[​](#whats-new "Direct link to What's New: At a Glance") | | | | Since | | - | -------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------- | ----- | | | **New source** | [`--connectiontype adbc_db2`](#ibm-db2----connectiontype-adbc_db2): IBM Db2 to Parquet through the embedded ArpeDb2 driver, no IBM client | 1.7.0 | | | **Db2 partitions** | [`--parallelmethod DBPartition`](#one-export-per-data-partition) on Db2 for LUW range-partitioned tables: each thread reads one data partition | 1.7.0 | | | **Db2 and Oracle queries** | [Their own SQL rules in `--query`](#db2-and-oracle-syntax-in---query): `CURRENT DATE - 30 DAYS` on Db2, `SERIAL#` and `'C:\temp\'` on Oracle | 1.7.0 | | | **Db2 through ODBC** | [Exact `DECIMAL` values](#exact-decimal-values-from-ibms-db2-odbc-driver) with IBM's ODBC driver on a Windows with a decimal comma | 1.7.0 | | | **SQL Server backups** | [Large PAGE dictionaries and typed `xml`](#sql-server-backups-more-tables-read) read, and `xml` written as SQL Server writes it | 1.7.0 | | | **Parameters** | [Case-insensitive values](#case-insensitive-parameter-values) on the command line and in YAML; [read this before upgrading](#upgrading-to-1-7) | 1.7.0 | | | **ADBC FastDrivers** | [Every driver updated](#1-7-0) | 1.7.0 | ## IBM Db2 to Parquet, No IBM Client — `--connectiontype adbc_db2`[​](#ibm-db2----connectiontype-adbc_db2 "Direct link to ibm-db2----connectiontype-adbc_db2") Getting data out of Db2 used to start with a chore: install IBM's ODBC / CLI driver on every machine that runs an export, configure it, declare DSNs, keep them in sync across servers, containers and CI runners. **Not anymore.** With `--connectiontype adbc_db2`, FastBCP reads Db2 through the embedded **ArpeDb2** ADBC driver, which speaks Db2's native protocol and ships inside FastBCP. Unzip, run, get Parquet. Three parameters and you are connected: * **`--server`** is `host[:port]`, port `50000` by default. * **`--database`** is the Db2 database name: it is **required**. * **`--user`** and **`--password`**, or a `--sourceconnectstring` (TLS on the server's SSL port, `SSL Mode=verify-full;SSL Root Cert=...`). - Windows - Linux ``` .\FastBCP.exe ` --connectiontype "adbc_db2" ` --server "db2server.company.corp:50000" ` --database "SAMPLE" ` --user "db2user" ` --password "password" ` --sourceschema "DB2ADMIN" ` --sourcetable "ORDERS" ` --directory "C:\temp" ` --fileoutput "orders.parquet" ` --parallelmethod "Ntile" ` --distributekeycolumn "ORDER_ID" ` --paralleldegree 8 ``` ``` ./FastBCP \ --connectiontype "adbc_db2" \ --server "db2server.company.corp:50000" \ --database "SAMPLE" \ --user "db2user" \ --password "password" \ --sourceschema "DB2ADMIN" \ --sourcetable "ORDERS" \ --directory "/data/export" \ --fileoutput "orders.parquet" \ --parallelmethod "Ntile" \ --distributekeycolumn "ORDER_ID" \ --paralleldegree 8 ``` | | | | | - | -------------------- | --------------------------------------------------------------------------------------------------------------------------------- | | | **Targets** | Db2 for LUW (Linux, Unix, Windows); Db2 for i for queries. Db2 for z/OS is not supported yet | | | **Parallel methods** | `None`, `Random`, `DataDriven`, `RangeId`, `Ntile`, `Timepartition`, `DBPartition` | | | **Data types** | Precision and scale of `DECIMAL` kept; see the [ArpeDb2 data types](https://adbc-drivers-docs.arpe.io/drivers/arpedb2/data-types) | | | **Doc Wizard** | `adbc_db2` in the ADBC (High Performance) connectors | Good to know * Output is **Parquet** only, as with every ADBC connector, on **Windows x64** and **Linux x64** (not Linux ARM64). * Trusted authentication (`--trusted`) is not supported: give `--user` and `--password`. * `--parallelmethod Physical` is not available on Db2: use `Ntile`, `RangeId`, `Random` or `DBPartition`. **See also:** [Connection Parameters](/latest/documentation/cli/connection_parameters.md#adbc_db2), [DB2 Examples](/latest/documentation/examples/db2.md) ### Partitioned Tables: One Thread per Partition[​](#one-export-per-data-partition "Direct link to Partitioned Tables: One Thread per Partition") Your largest Db2 tables are usually range partitioned — by month, by year, by region. FastBCP 1.7 puts that design to work: with `--parallelmethod DBPartition`, each thread takes **one data partition**, and Db2 reads only that partition. No full scan per thread, no distribute key column to pick and tune: the partitioning you already have becomes your parallelism. ``` ./FastBCP \ --connectiontype "adbc_db2" \ --server "db2server.company.corp:50000" \ --database "SAMPLE" \ --user "db2user" \ --password "password" \ --sourceschema "DB2ADMIN" \ --sourcetable "SALES_HISTORY" \ --directory "/data/export/sales_history" \ --fileoutput "sales_history.parquet" \ --parallelmethod "DBPartition" \ --paralleldegree 4 ``` Good to know * Partitions not yet visible to queries (attached and not yet validated, being detached) are skipped. * A table that is not range partitioned, and Db2 for i, fall back to `None` with a warning. * The output layout follows [`FASTBCP_DBPARTITION_TARGET_MODE`](/latest/documentation/environment-variables/fastbcp-dbpartition-target-mode.md) (`CHUNK` or `HIVE`), as for the other sources. ## Your Db2 and Oracle Queries, Sent as You Wrote Them[​](#db2-and-oracle-syntax-in---query "Direct link to Your Db2 and Oracle Queries, Sent as You Wrote Them") A query that runs in your SQL client should run in FastBCP, unchanged. FastBCP reads your `--query` before sending it to the database, and 1.7 teaches it the SQL rules of **Db2** and **Oracle**: the queries your database accepts are no longer refused, nor altered on the way. | | Source | Now works | | - | -------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | **Db2** (`adbc_db2`, and `odbc` on a Db2 server) | Special registers in several words: `CURRENT DATE`, `CURRENT TIMESTAMP(6)`, `CURRENT SCHEMA`, …; labeled durations: `CURRENT DATE - 30 DAYS`, `ORDER_DATE + 1 MONTH`. These queries failed to parse up to 1.6 | | | **Oracle** (`oraodp`, `adbc_oracle`, and `odbc` on an Oracle server) | `SELECT SID, SERIAL# FROM V$SESSION` keeps `SERIAL#`; `'C:\temp\'` parses; `LIKE 'C:\temp\f1%'` matches what Oracle matches. The `(+)` outer join, `IGNORE NULLS` and `T@DBLINK` keep working | Oracle queries with `#` or `\` Up to 1.6, the end of a line after `#` was dropped, and `\t` in a string became a tab: such a query could return **other rows, or none, without an error**. Check the exports whose `--query` contains `#` or `\` after upgrading. ## Exact DECIMAL Values, Whatever the Windows Locale[​](#exact-decimal-values-from-ibms-db2-odbc-driver "Direct link to Exact DECIMAL Values, Whatever the Windows Locale") Amounts are the last place you want a surprise. With `--connectiontype odbc` and IBM's Db2 ODBC / CLI driver, on a Windows machine whose regional settings use a decimal comma (French, German, …), `DECIMAL` values were exported **multiplied by 10^scale**, with no error: `173665.47` became `17366547`. FastBCP 1.7 recognises IBM's driver on a Db2 server and sets it up so that **every amount comes out exact, whatever the locale of the machine**. Nothing to change in your commands: your own `Patch2` settings are kept, and the log shows what was applied. Other ODBC drivers and `adbc_db2` were not affected — and with `adbc_db2`, there is no ODBC driver to worry about at all. ## SQL Server Backups: More Tables, Read Right[​](#sql-server-backups-more-tables-read "Direct link to SQL Server Backups: More Tables, Read Right") Reading tables straight from `.bak` files, with no SQL Server and no restore, is only worth it if every table comes out right. 1.7 widens what `--connectiontype backup_mssql` reads (ArpeMSBackup 0.3.1) — tables that failed, or read wrong values, up to 1.6.8: | | | | | - | -------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | **PAGE compression** | Tables with many distinct values per page failed with `page symbol … out of the dictionary` or `prefix longer than the anchor value`, or read the next column wrong. Fixed | | | **PAGE compression** | Pages whose values share no common prefix (hashes, codes) failed with `corrupt page dictionary`, or lost rows. Fixed | | | **Typed `xml`** | `xml` columns bound to an XML schema collection failed with `BINXML token 0xEA is not supported`. They are read, their values written as SQL Server returns them (`12.5`, `2003-12-11Z`, `1.0E21`) | | | **`xml` text** | A carriage return is written ` `, and TAB / LF / CR in attribute values ` ` / ` ` / ` `, as SQL Server writes them | **Proven, not promised:** every table and every column of **AdventureWorks2025** and **AdventureWorksDW2025** — as is, ROW compressed and PAGE compressed, from uncompressed, MS\_XPRESS and ZSTD backups — comes out identical to SQL Server. ## Type Parameter Values Your Way[​](#case-insensitive-parameter-values "Direct link to Type Parameter Values Your Way") `MSSQL` or `mssql`, `Physical` or `physical`: it no longer matters. The values of `--connectiontype`, `--parallelmethod`, `--parquetcompression`, `--boolformat`, `--loglevel` and `--applicationintent` are now case-insensitive, on the command line and in a YAML configuration file — `--connectiontype MSSQL`, `parallelmethod: physical` and `--parquetcompression ZSTD` all work, and FastBCP uses the canonical spelling. And a typo in a YAML file is now caught right away instead of silently doing nothing (see below). ### Upgrading to 1.7[​](#upgrading-to-1-7 "Direct link to Upgrading to 1.7") YAML values are now checked Up to 1.6, a value of a YAML configuration file that is not in the list (`parallelmethod: physycal`) was silently ignored, and the export did nothing. It now fails with the message of the command line: `Value physycal is not allowed for argument m(parallelmethod)`. Fix the value in the file. The `hanaexport` connection type, refused by `--connectiontype` for a long time, is removed. Use `--connectiontype hana`. ## Get Started with 1.7[​](#get-started "Direct link to Get Started with 1.7") * **New to Db2 exports?** Build your first `adbc_db2` command in a minute with the [Doc Wizard](/latest/wizard.md), or copy one from the [DB2 Examples](/latest/documentation/examples/db2.md). * **Already on ODBC?** For your Parquet exports, switch `--connectiontype odbc` to `--connectiontype adbc_db2`, give `--server`, `--database`, `--user` and `--password`, and the IBM client is no longer needed for them. * **Using an AI assistant?** The FastBCP [agent skill](/latest/ai/agent-skills.md) and [MCP server](/latest/ai/mcp-server.md) help it write and check your commands. ## Release History[​](#release-history "Direct link to Release History") ### 1.7.0[​](#1-7-0 "Direct link to 1.7.0") | | | | | - | ------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | **New source** | [`--connectiontype adbc_db2`](#ibm-db2----connectiontype-adbc_db2): IBM Db2 through the embedded ArpeDb2 driver, no IBM client | | | **`adbc_db2`** | [`DBPartition`](#one-export-per-data-partition) on Db2 for LUW range-partitioned tables | | | **`--query`** | [Db2 and Oracle SQL rules](#db2-and-oracle-syntax-in---query) | | | **`odbc`** | Fixed: [`DECIMAL` values multiplied by 10^scale](#exact-decimal-values-from-ibms-db2-odbc-driver) with IBM's Db2 ODBC driver on a Windows with a decimal comma | | | **`backup_mssql`** | Fixed: [PAGE-compressed tables with large page dictionaries, typed `xml`](#sql-server-backups-more-tables-read); `xml` escaping as SQL Server | | | **Parameters** | [Case-insensitive values](#case-insensitive-parameter-values); YAML values checked; `hanaexport` removed | | | **Doc Wizard** | `adbc_db2` | | Component | Version | | ------------------------- | ----------- | | ArpeMSSQL ADBC driver | 0.8.0 | | ArpePGSQL ADBC driver | 0.5.2 | | ArpeOracle ADBC driver | 0.4.5 | | ArpeNetezza ADBC driver | 0.3.9 | | ArpeTeradata ADBC driver | 0.3.6 | | ArpeDb2 ADBC driver | 0.4.0 (new) | | ArpeMSBackup ADBC driver | 0.3.1 | | ArpeOraBackup ADBC driver | 0.3.1 | | Parquet.Net | 6.2.0 | --- # 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 Reference * [Authentication](/latest/documentation/cli/authentication.md) * [Connection Parameters](/latest/documentation/cli/connection_parameters.md) * [Source Info](/latest/documentation/cli/source_info.md) * [Output Info](/latest/documentation/cli/output_info.md) * [CSV Formatting](/latest/documentation/cli/csv_formatting.md) * [Parquet Formatting](/latest/documentation/cli/parquet_formatting.md) * [Cloud Options](/latest/documentation/cli/cloud_options.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) * [FASTBCP\_CLOUD\_ISBUFFERED](/latest/documentation/environment-variables/fastbcp-cloud-isbuffered.md) * [FASTBCP\_TMPPATH](/latest/documentation/environment-variables/fastbcp-tmppath.md) * [FASTBCP\_CLOUD\_MAXUPLOADTHREAD\_PER\_STREAM](/latest/documentation/environment-variables/fastbcp-cloud-maxuploadthread-per-stream.md) * [FASTBCP\_RGSIZE](/latest/documentation/environment-variables/fastbcp-rgsize.md) * [FASTBCP\_UID\_STRING\_CASING](/latest/documentation/environment-variables/fastbcp-uid-string-casing.md) * [FASTBCP\_DATEFORMAT](/latest/documentation/environment-variables/fastbcp-dateformat.md) * [FASTBCP\_ADBC\_BATCHCELLS](/latest/documentation/environment-variables/fastbcp-adbc-batchcells.md) * [FASTBCP\_SYSTEMINFO\_COLLECT](/latest/documentation/environment-variables/fastbcp-systeminfo-collect.md) * [FASTBCP\_PERFORMANCE\_COLLECT](/latest/documentation/environment-variables/fastbcp-performance-collect.md) * [FASTBCP\_DBPARTITION\_TARGET\_MODE](/latest/documentation/environment-variables/fastbcp-dbpartition-target-mode.md) * [FASTBCP\_TTU\_PATH](/latest/documentation/environment-variables/fastbcp-ttu-path.md) * [FASTBCP\_INDEX\_DIR](/latest/documentation/environment-variables/fastbcp-index-dir.md) * [FASTBCP\_BACKUP\_RESTORE\_POINT](/latest/documentation/environment-variables/fastbcp-backup-restore-point.md) * [FASTBCP\_BACKUP\_RESTORE\_MODE](/latest/documentation/environment-variables/fastbcp-backup-restore-mode.md) * Cloud Connectivity * [Overview](/latest/documentation/cloud-connectivity/overview.md) * [AWS S3](/latest/documentation/cloud-connectivity/aws-s3.md) * [Azure](/latest/documentation/cloud-connectivity/azure.md) * [Google Cloud Storage](/latest/documentation/cloud-connectivity/google-cloud.md) * [OneLake](/latest/documentation/cloud-connectivity/onelake.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) * [OpenTelemetry](/latest/documentation/logging/OpenTelemetry.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) * [DB2 Examples](/latest/documentation/examples/db2.md) * [Other Databases](/latest/documentation/examples/other-databases.md) * [Output Formats](/latest/documentation/examples/output-formats.md) * [Cloud Storage](/latest/documentation/examples/cloud-storage.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) ## Datatypes Conversion[​](#datatypes-conversion "Direct link to Datatypes Conversion") * [Overview](/latest/datatypes-conversion/overview.md) * SQL Server * [mssql](/latest/datatypes-conversion/mssql/parquet.md) * [adbc\_mssql](/latest/datatypes-conversion/mssql/adbc-parquet.md) * [backup\_mssql](/latest/datatypes-conversion/mssql/backup-parquet.md) * MySQL * [mysql](/latest/datatypes-conversion/mysql/parquet.md) * Oracle * [oraodp](/latest/datatypes-conversion/oracle/parquet.md) * [adbc\_oraodp](/latest/datatypes-conversion/oracle/adbc-parquet.md) * [backup\_rman](/latest/datatypes-conversion/oracle/backup-parquet.md) * PostgreSQL * [pgsql](/latest/datatypes-conversion/postgresql/parquet.md) * [pgcopy](/latest/datatypes-conversion/postgresql-copy/parquet.md) * [adbc\_pgsql](/latest/datatypes-conversion/postgresql/adbc-parquet.md) * SAP HANA * [hana](/latest/datatypes-conversion/saphana/parquet.md) * Teradata * [teradata](/latest/datatypes-conversion/teradata/parquet.md) ## Integration[​](#integration "Direct link to Integration") * [Docker](/latest/integration/docker-integration.md) * [Kestra](/latest/integration/kestra-integration.md) * [Airflow](/latest/integration/airflow-integration.md) * [PostgreSQL](/latest/integration/postgresql-integration.md) ## Release Notes[​](#release-notes "Direct link to Release Notes") * [Release Notes 1.7](/latest/release-notes/release-notes-1.7.md) * [Release Notes 1.6](/latest/release-notes/release-notes-1.6.md) * [Release Notes 1.5](/latest/release-notes/release-notes-1.5.md) * [Release Notes 1.4](/latest/release-notes/release-notes-1.4.md) * [Release Notes 1.3](/latest/release-notes/release-notes-1.3.md) * [Release Notes 1.2](/latest/release-notes/release-notes-1.2.md) * [Release Notes 1.1](/latest/release-notes/release-notes-1.1.md) * [Release Notes 1.0](/latest/release-notes/release-notes-1.0.md) * [Release Notes 0.32](/latest/release-notes/release-notes-0.32.md) ## AI Integrations[​](#ai-integrations "Direct link to AI Integrations") * [FastBCP Agent Skill](/latest/ai/agent-skills.md) * [FastBCP MCP Server](/latest/ai/mcp-server.md) ## [Sitemap](/latest/sitemap.md)[​](#sitemap-1 "Direct link to sitemap-1") --- # FastBCP Command Wizard Tip: in an empty field, press `→` to take the suggested value. Expand All\[ ] ### PlatformWindows Windows ![Linux](/img/tux.svg)Linux ### Connection ParametersMS SQL Server Connection Type? : ADBC (High Performance) ![](/img/logos/sqlserver.svg)MS SQL Server (Arpe.io ADBC FastDriver) ![](/img/logos/postgresql.svg)PostgreSQL (Arpe.io ADBC FastDriver) ![](/img/logos/oracle.svg)Oracle (Arpe.io ADBC FastDriver) ![](/img/logos/netezza.svg)Netezza (Arpe.io ADBC FastDriver) ![](/img/logos/teradata.svg)Teradata (Arpe.io ADBC FastDriver) ![](/img/logos/db2.svg)Db2 (Arpe.io ADBC FastDriver) Backup Files (no database needed) ![](/img/logos/sqlserver.svg)SQL Server backups .bak (Arpe.io ADBC FastDriver) ![](/img/logos/oracle.svg)Oracle RMAN backups (Arpe.io ADBC FastDriver) Standard Drivers ![](/img/logos/clickhouse.svg)ClickHouse ![](/img/logos/sqlserver.svg)MS SQL Server ![](/img/logos/mysql.svg)MySQL ![](/img/logos/netezza.svg)Netezza ODBC OLEDB ![](/img/logos/oracle.svg)Oracle (ODP) ![](/img/logos/postgresql.svg)PostgreSQL (pgcopy) ![](/img/logos/postgresql.svg)PostgreSQL (pgsql) ![](/img/logos/sap.svg)SAP HANA ![](/img/logos/teradata.svg)Teradata | Provider? : | SQLOLEDB | | ------------------------ | ----------------------------- | | Server? : | mss-server,1433 | | Source Connect String? : | Server=myserver;Database=mydb | | DSN? : | MyDSN | | Trusted? : | \[ ] | | User? : | username | | Password? : | password | | Database? : | mydb | | Application Intent? : | ReadOnlyReadWrite | ### Source Query / Table ### Output Options ### Format Options ### Parquet Options ### Cloud Options ### Parallel Parameters ### Advanced Parameters ### License ### Generated Command Multi-line\[x] generate config sharecopy ``` ``` ---