A macOS application for securely exporting and importing Apache Airflow connection configurations between environments.
This tool is available in three different implementations:
| Implementation | Interface | Repository |
|---|---|---|
| Python | CLI | airflow_connections_import_export |
| Swift | Native macOS app | AirflowConnectionMigrator |
| Go | Web server or TUI | airflow-migrator |
All implementations share the same Fernet encryption format, so exported files are interchangeable between them.
As part of the Swift implementation, a standalone Fernet encryption library was developed and released: SwiftFernet
Airflow Connection Migrator provides a native macOS GUI for managing Airflow database connections, enabling you to:
- Export connections from one Airflow instance to an encrypted CSV file
- Import connections to another Airflow instance with collision handling
- Manage connection profiles with secure Keychain storage
- Maintain consistent connection configurations across development environments
Perfect for DevOps teams managing multiple Airflow environments who need to synchronize connection configurations securely.
Click images to enlarge:
Export View |
Import View |
Settings View |
- Fernet encryption compatible with Python's
cryptography.fernet - Secure credential storage using macOS Keychain
- Encrypted CSV files for safe connection sharing
- Support for URL-safe Base64 encoding
- Select source Airflow database from saved profiles
- Choose specific connections to export with checkboxes
- Optional connection ID prefix to prevent collisions
- Generate encryption key or provide your own
- Native macOS save dialog
- Load encrypted CSV files
- Preview connections before importing
- Three collision strategies:
- Stop completely: Safest, aborts if any ID exists
- Skip existing: Import only new connections
- Overwrite: Replace existing connections (use with caution!)
- Real-time progress logging
- Save database connection profiles
- Test connections before use
- Secure Fernet key storage per profile
- Default export paths and filenames
- macOS 13.0 or later
- Xcode 15.0+ (for building)
- Access to Airflow PostgreSQL metadata database
- Airflow Fernet encryption key
- Clone the repository:
- Open in Xcode:
- Build and run (Cmd+R)
- Launch the app
- Go to Settings tab
- Click New to create a connection profile
- Enter your Airflow database credentials:
- Name (e.g., "Local Dev", "Staging")
- Host, Port, Database, Username, Password
- Airflow Fernet Key (from your
airflow.cfg)
- Click Test Connection to verify
- Click Save
- Go to Export tab
- Select source connection profile from dropdown
- Click Load Connections
- Select which connections to export (checkboxes)
- (Optional) Add connection ID prefix
- Click Generate for file encryption key (save this key!)
- Click Export Connections
- Choose save location in the dialog
Important: Share the file encryption key separately from the CSV file!
- Go to Import tab
- Click Browse and select the encrypted CSV file
- Enter the file encryption key
- Click Load File to decrypt and preview connections
- Select which connections to import
- Select target connection profile
- Choose collision handling strategy
- Click Import Connections
- Confirm the operation
Exported CSV structure:
conn_id,encrypted_connection
team_db,gAAAAAB...
team_postgres_warehouse,gAAAAAB...Each connection is encrypted as JSON with Fernet, containing:
- Connection ID, type, description
- Host, schema, login, password (encrypted)
- Port, extra configuration (encrypted if flagged)
Filename format: airflow_connections_[timestamp]_[profile_name].csv
Built with modern Swift and SwiftUI:
- MVVM Architecture: Clean separation of concerns
- Async/Await: Non-blocking database and file operations
- SwiftUI: Native macOS interface
- Keychain Services: Secure credential storage
- PostgresNIO: Async PostgreSQL client
- SwiftFernet: Python-compatible Fernet encryption
- SwiftFernet - Fernet encryption
- PostgresNIO - PostgreSQL driver
- CryptoSwift - Cryptographic operations
- ✅ Store Fernet keys in password managers
- ✅ Use separate file encryption keys per export
- ✅ Share CSV files and keys through different channels
- ✅ Test connections before production imports
- ✅ Use "Stop completely" strategy by default
- ✅ Keep export files out of version control
- Keychain (encrypted by macOS):
- Database passwords
- Airflow Fernet keys
Contributions welcome! Please:
- Fork the repository
- Create a feature branch
- Submit a pull request
Future enhancements being considered:
- Connections search and filtering
- Connection comparison tool
- Auto-backup before import
Apache 2.0
- Built with ❤️ for the Airflow community
- Inspired by the need for better DevOps tooling
Found a bug? Have a feature request? Open an issue!
Made by a developer who got tired of manually copying connection configs 🚀