This project demonstrates how to use the Azure Data Factory Python SDK to create and manage data factories programmatically.
.env # Environment variables for Azure credentials .gitignore # Files and directories to ignore in version control README.md # Project documentation .vscode/ # VS Code workspace settings data/ input.txt # Sample input data src/ datafactory.py # Main script for Azure Data Factory operations
- Python 3.6 or later
- Azure subscription
- Azure Data Factory service enabled in your subscription
- Clone this repository:
git clone <repository-url> cd <repository-folder>
Install the required Python packages:
pip install azure-identity azure-mgmt-resource azure-mgmt-datafactory
Configure your Azure credentials in the .env file:
AZURE_CLIENT_ID=<your-client-id>
AZURE_CLIENT_SECRET=<your-client-secret>
AZURE_TENANT_ID=<your-tenant-id>
Update the subscription_id, rg_name, and df_name variables in src/datafactory.py with your Azure subscription details.
Usage Run the main script to create and manage an Azure Data Factory:
python datafactory.py
Features Authenticate with Azure using ClientSecretCredential. Create and manage Azure resource groups. Create and manage Azure Data Factories.
Sample Input The data/input.txt file contains sample input data in the following format:
John|Doe
Jane|Doe
Notes Ensure that the AZURE_CLIENT_ID, AZURE_CLIENT_SECRET, and AZURE_TENANT_ID environment variables are set correctly before running the script. The datafactory.py script is a starting point and can be extended to include additional Azure Data Factory operations. License This project is licensed under the MIT License. See the LICENSE file for details.
You can replace `<repository-url>` and `<repository-folder>` with your actual repository details.