Data Feed Variable Overrides
Using variable overrides in data feeds for dynamic configuration and secure API integration
Variable overrides provide a powerful mechanism for dynamically configuring oracle jobs without hardcoding sensitive information like API keys or frequently changing parameters. This feature enables secure, flexible data feed configuration for both testing and production environments.
What are Variable Overrides?
Variable overrides allow you to inject values into oracle job definitions at runtime using the ${VARIABLE_NAME} syntax.
β οΈ Security Warning: Variables Are Not Verifiable
IMPORTANT: Variable overrides are not part of the cryptographic verification process. The oracle signatures only verify the job structure, not the variable values injected at runtime. This means:
Variables can be manipulated by whoever controls the execution environment
Feed consumers cannot verify what variable values were used
Use variables ONLY for authentication - API keys and authentication tokens
Never use variables for anything else - URLs, paths, parameters, calculations, or data selection logic
Safe Uses β
API keys:
${API_KEY}Authentication tokens:
${AUTH_TOKEN}
Dangerous Uses β
Base URLs:
${BASE_URL}(changes data source)API versions:
${API_VERSION}(could return different data formats)Price multipliers:
${MULTIPLIER}(affects calculations)JSON paths:
${JSON_PATH}(changes what data is extracted)Any parameter that affects data traversal, extraction, or calculation
Primary Use Case: Secure Credential Management
The main purpose of variable overrides is to keep sensitive credentials out of job definitions while maintaining feed verifiability:
Secure API Key Management: Keep sensitive credentials out of job definitions
Environment-Specific Authentication: Use different tokens for testing vs production
Basic Syntax
Variables in oracle jobs use the template syntax ${VARIABLE_NAME} and are replaced at execution time:
Common Use Cases
1. API Authentication
Secure API integration using environment variables:
2. Recommended: API Key Only Usage
The safest and recommended approach - only use variables for API keys:
3. Multiple API Authentication Headers
When you need multiple authentication parameters:
4. Simple Value Substitution
For testing or static value injection:
Variable Override Patterns
β οΈ CRITICAL: Only use variables for API keys and authentication tokens. Everything else should be hardcoded to ensure feed verifiability.
HTTP Headers with Authentication (Recommended Pattern)
POST Request Bodies (Auth Only)
JSON Paths (No Variables Recommended)
Testing and Development Workflow
1. Local Development Script
Create a testing script similar to the example:
2. Running Tests
3. Environment File Approach
Security Best Practices
1. Never Hardcode Secrets
β Don't do this:
β Do this instead:
2. Validate Required Variables
3. Use Different Keys for Different Environments
Error Handling and Debugging
Common Issues
1. Missing Variables
Solution: Ensure all referenced variables are defined:
2. Incorrect Variable Names
Variables are case-sensitive and must match exactly:
3. JSON Path Issues
When using variables in JSON paths, ensure the resulting path is valid:
Debugging Tips
Log Variable Overrides
Test API Endpoints Manually
Validate JSON Paths
Real-World Examples
Example 1: Polygon.io Stock Prices
Get stock prices from Polygon.io API with secure API key management:
Example 2: ESPN Sports Scores
Get NFL final scores from ESPN API:
Example 3: Twitter Follower Count
Get follower count for a specific Twitter account:
Key Principles in These Examples
Hardcoded Data Sources: URLs specify exact endpoints and parameters
Hardcoded Data Paths: JSON paths are fixed, ensuring consistent data extraction
Authentication Only Variables: Only API keys and tokens use variable substitution
Verifiable Logic: Feed consumers can verify exactly what data is being fetched and how
Environment Setup for Examples
Integration with Production Systems
Oracle Quotes Integration
When using variable overrides with Oracle Quotes:
Production Considerations
Secret Management: Use secure secret management systems
Variable Validation: Implement runtime validation
Fallback Values: Provide sensible defaults where appropriate
Monitoring: Log variable usage for debugging (without exposing secrets)
Documentation: Clearly document required variables for each job
Related Resources
Variables with CacheTask - For internal variable management
REST APIs with HttpTask - HTTP request configuration
Oracle Job Documentation - Full job specification
Last updated