Environment Settings
Environment Variables
Example overview page before API endpoints
Overview
Environment variables in Hotglue allow you to dynamically configure various settings that your ETL transformation scripts can utilize. This enables easier maintenance and scaling of your integration tasks. Commonly, environment variables are used for API URLs, export formats, and other dynamic settings.
Accessing the Environment Variables Setting Page
- Log in to your Hotglue account.
- Navigate to the Settings tab on the sidebar.
- Click on the Environment Variables option.
Adding Environment Variables
To add an environment variable:
- Navigate to the Environment Variables setting page.
- Add a Key and Value for your variable.
- Click Save to create the new variable.
- You can always click the ✎ pencil icon to edit an existing variable
Default Environment Variables
DEFAULT_EXPORT_FORMAT
- Description: Defines the default export format for all ETL transformation scripts.
- Accepted Values:
json
,csv
,parquet
Usage in ETL Transformation Scripts
To use environment variables in your ETL transformation scripts, you can utilize the os.environ
Python library as shown below:
Python
Best Practices
- Naming Convention: Use all upper-case letters and underscores to define variable names (e.g.,
API_URL
). - Default Values: Always include default values in your ETL scripts for environment variables when applicable.
- Validation: Implement validation checks in your ETL scripts to ensure that environment variables contain expected types and values.
- Consistency: Use consistent naming and value types across multiple environment variables to make the system more intuitive and easier to manage.