FASTBCP_TMPPATH
Overview
The FASTBCP_TMPPATH environment variable specifies the base directory where FastBCP creates temporary files during buffered cloud uploads.
Syntax
Windows
$env:FASTBCP_TMPPATH = "D:\temp\fastbcp"
Linux/macOS
export FASTBCP_TMPPATH=/tmp/fastbcp
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 |
| Since | FastBCP 1.0 |
Behavior
Default Behavior (Not Set)
FastBCP uses the system's default temporary directory:
- Windows:
%TEMP%(typicallyC:\Users\<username>\AppData\Local\Temp) - Linux/macOS:
$TMPDIR(typically/tmp)
Custom Path
When set, FastBCP creates a unique subdirectory per process:
<FASTBCP_TMPPATH>/fastbcp_<guid>/
Example:
D:\temp\fastbcp\fastbcp_a1b2c3d4-e5f6-7890-abcd-ef1234567890\
Automatic Cleanup
- Subdirectories are created automatically
- Temporary files are deleted after successful upload
- In case of errors, files may remain and need manual cleanup