Skip to main content

Update Transform

Updating transforms in Nexla allows you to modify existing transformation functions to improve functionality, fix issues, or adapt to changing business requirements, ensuring your data processing workflows remain current and effective.

Transform Update Overview

Transform updates enable you to evolve your transformation functions over time, incorporating new features, performance improvements, and business logic changes while maintaining backward compatibility and ensuring smooth operation of your data processing pipelines.

Core Update Capabilities

The transform update system provides several key capabilities for effective modification and evolution of transformation functions.

Function Modification

Update transformation logic and behavior:

  • Code Updates: Modify transform function code and logic
  • Parameter Changes: Update transform parameters and configuration
  • Schema Evolution: Evolve input and output schemas
  • Function Enhancement: Add new functionality and capabilities

Configuration Updates

Modify transform settings and behavior:

  • Parameter Updates: Change configurable parameters and options
  • Behavior Modification: Adjust transform behavior and processing
  • Performance Tuning: Optimize performance settings and limits
  • Integration Updates: Update integration and workflow settings

Metadata Updates

Update transform information and documentation:

  • Description Updates: Modify transform descriptions and documentation
  • Version Management: Update transform versions and change tracking
  • Tag Management: Update transform tags and categorization
  • Access Control: Modify access permissions and visibility

Update Transform Endpoint

To update an existing transform:

PUT /transforms/{transform_id}
Update Transform: Request
PUT /transforms/6001

Update Request Examples

Different types of transform updates for various modification needs.

Function Code Update

Update the transform function code:

Function Code Update: Request
{
"version": "1.1.0",
"description": "Enhanced email normalization with validation and error handling",
"transform_function": {
"language": "javascript",
"code": "function transform(input) { try { const normalized = input.email.toLowerCase().trim(); const isValid = /^[^@]+@[^@]+\\.[^@]+$/.test(normalized); return { ...input, email_normalized: normalized, is_valid: isValid, validation_error: null }; } catch (error) { return { ...input, email_normalized: null, is_valid: false, validation_error: error.message }; } }"
},
"configuration": {
"enrichment_enabled": true,
"default_region": "Unknown",
"score_threshold": 0.7,
"error_handling": "graceful"
}
}

Configuration Update

Update transform configuration parameters:

Configuration Update: Request
{
"version": "1.0.1",
"configuration": {
"enrichment_enabled": true,
"default_region": "Unknown",
"score_threshold": 0.8,
"batch_processing": true,
"batch_size": 1000,
"timeout": 30000,
"retry_count": 3
}
}

Schema Update

Update input or output schemas:

Schema Update: Request
{
"version": "1.2.0",
"description": "Updated schema to support additional customer fields",
"input_schema": {
"type": "object",
"properties": {
"customer_id": {"type": "string"},
"first_name": {"type": "string"},
"last_name": {"type": "string"},
"email": {"type": "string"},
"zip_code": {"type": "string"},
"phone_number": {"type": "string"},
"company": {"type": "string"}
},
"required": ["customer_id", "first_name", "last_name", "email"]
},
"output_schema": {
"type": "object",
"properties": {
"customer_id": {"type": "string"},
"first_name": {"type": "string"},
"last_name": {"type": "string"},
"email": {"type": "string"},
"zip_code": {"type": "string"},
"phone_number": {"type": "string"},
"company": {"type": "string"},
"full_name": {"type": "string"},
"email_domain": {"type": "string"},
"region": {"type": "string"},
"enrichment_score": {"type": "number"},
"contact_preference": {"type": "string"}
}
}
}

Update Transform Response

A successful update returns the updated transform:

Update Transform: Response
{
"id": 6001,
"name": "Customer Data Enricher",
"description": "Enhanced email normalization with validation and error handling",
"type": "enrichment",
"category": "business_logic",
"status": "ACTIVE",
"version": "1.1.0",
"created_at": "2023-01-15T10:00:00.000Z",
"updated_at": "2023-01-16T14:30:00.000Z",
"owner": {
"id": 42,
"name": "John Doe"
},
"input_schema": {
"type": "object",
"properties": {
"customer_id": {"type": "string"},
"first_name": {"type": "string"},
"last_name": {"type": "string"},
"email": {"type": "string"},
"zip_code": {"type": "string"}
},
"required": ["customer_id", "first_name", "last_name", "email"]
},
"output_schema": {
"type": "object",
"properties": {
"customer_id": {"type": "string"},
"first_name": {"type": "string"},
"last_name": {"type": "string"},
"email": {"type": "string"},
"zip_code": {"type": "string"},
"full_name": {"type": "string"},
"email_normalized": {"type": "string"},
"is_valid": {"type": "boolean"},
"validation_error": {"type": "string"},
"region": {"type": "string"},
"enrichment_score": {"type": "number"}
}
},
"transform_function": {
"language": "javascript",
"code": "function transform(input) { try { const normalized = input.email.toLowerCase().trim(); const isValid = /^[^@]+@[^@]+\\.[^@]+$/.test(normalized); return { ...input, email_normalized: normalized, is_valid: isValid, validation_error: null }; } catch (error) { return { ...input, email_normalized: null, is_valid: false, validation_error: error.message }; } }"
},
"configuration": {
"enrichment_enabled": true,
"default_region": "Unknown",
"score_threshold": 0.7,
"error_handling": "graceful"
},
"usage_count": 15,
"performance_metrics": {
"average_execution_time": "0.045s",
"success_rate": 0.998,
"error_rate": 0.002
},
"change_history": [
{
"version": "1.1.0",
"changed_at": "2023-01-16T14:30:00.000Z",
"changed_by": 42,
"changes": ["Enhanced error handling", "Added validation logic", "Updated configuration"]
}
]
}

Partial Updates

Update specific aspects of transforms without affecting other properties.

Selective Field Updates

Update only specific transform fields:

Selective Field Update: Request
{
"description": "Updated description for better clarity",
"configuration": {
"score_threshold": 0.75
}
}

Metadata Updates

Update transform metadata and tags:

Metadata Update: Request
{
"tags": ["customer", "enrichment", "demographics", "validation"],
"metadata": {
"owner": "data_team",
"priority": "high",
"review_date": "2023-02-15"
}
}

Update Considerations

Important considerations when updating transforms to ensure smooth operation and compatibility.

Backward Compatibility

Ensure updates maintain compatibility:

  • Schema Compatibility: Verify input/output schema compatibility
  • Function Behavior: Ensure core functionality remains consistent
  • Configuration Defaults: Maintain sensible default values
  • Error Handling: Preserve existing error handling patterns

Impact Assessment

Assess the impact of updates:

  • Dependent Systems: Identify systems that depend on the transform
  • Data Flow Impact: Understand impact on data processing pipelines
  • Performance Impact: Assess performance implications
  • Testing Requirements: Plan comprehensive testing strategy

Version Management

Manage transform versions effectively:

  • Version Numbering: Use semantic versioning for changes
  • Change Documentation: Document all changes and improvements
  • Rollback Planning: Plan for potential rollback scenarios
  • Migration Support: Support migration from previous versions

Update Workflows

Implement structured workflows for effective transform updates.

Update Planning Workflow

Standard workflow for planning transform updates:

  1. Change Analysis: Analyze required changes and improvements
  2. Impact Assessment: Assess impact on dependent systems
  3. Compatibility Review: Review backward compatibility requirements
  4. Testing Strategy: Plan comprehensive testing approach
  5. Rollback Planning: Plan rollback procedures if needed

Update Execution Workflow

Workflow for executing transform updates:

  1. Pre-Update Testing: Test updates in development environment
  2. Update Execution: Execute update operation
  3. Post-Update Validation: Validate update success and functionality
  4. Performance Monitoring: Monitor performance and behavior
  5. Documentation Update: Update documentation and change history

Update Best Practices

To effectively update transforms in your Nexla platform:

  1. Plan Updates Carefully: Thoroughly plan updates and assess impact
  2. Maintain Compatibility: Ensure backward compatibility when possible
  3. Test Extensively: Test updates thoroughly before deployment
  4. Document Changes: Document all changes and improvements
  5. Monitor Performance: Monitor performance after updates

Error Handling

Common transform update issues and solutions:

  • Validation Errors: Review update request format and content
  • Permission Denied: Ensure you have appropriate update rights
  • Schema Conflicts: Resolve schema compatibility issues
  • Version Conflicts: Handle version numbering conflicts

After updating transforms, you may need to:

Test Updates

POST /transforms/{transform_id}/test
POST /transforms/{transform_id}/validate

Deploy Updates

PUT /transforms/{transform_id}/deploy
POST /transforms/{transform_id}/activate

Monitor Performance

GET /transforms/{transform_id}/performance
GET /transforms/{transform_id}/metrics

Rollback if Needed

PUT /transforms/{transform_id}/rollback
POST /transforms/{transform_id}/revert