Search

Home

Release Notes

User Docs

🧠

Code

💡 Code Feature – Centralized Override Logic

The Code feature allows you to define custom override logic at the Output Schema level. This provides centralized control across multiple pipelines, enabling:

  • One-time setup of complex logic
  • Consistent application across workflows
  • Reduced duplication and error potential
For example, if you want to apply a custom if-then-else rule to all files of a specific type, you would configure that logic here.

✅ Benefits

  • Consistency – The same logic is applied wherever it's needed
  • Maintainability – Update the logic once to apply it across all relevant workflows
  • Efficiency – Eliminate redundant code and reduce risk of mistakes

🔧 Types of Code Overrides and Optimization

Use code overrides to apply and optimize logic either across multiple pipelines or within a specific file. This helps simplify and standardize behavior.

image
  • Primary
  • Code override applied at the Output Schema level, shared across multiple pipelines

  • Final
  • File-specific override used in the Builder for individual files

  • Reduce
    1. Used to clean up or simplify code

      Examples:

    2. Remove duplicate logic
    3. Break down long functions into smaller pieces
    4. Use built-in Scala features to streamline logic

⚙️ Code Functions

These functions help you manage how code is written, applied, and compiled within your schema:

  1. Enabled – Activates code for the output schema
  2. Reset – Reverts to the last saved version
  3. Code Snippet – Write reusable code for use in the Builder
  4. Compile – Validates and applies changes (Note: Save before compiling)
  5. image

📝 Creating and Using Code Snippets

To create a snippet:

  1. Click the Code Snippet button
  2. The Edit Snippet screen appears
  3. image
  4. Enter a Name and valid Scala code
  5. Click Save
The snippet's Create Date, Name, and Content will appear on the Code Snippets page. Use the menu icon to Edit or Delete the snippet.

📁 Applying a Snippet in Builder

  1. Navigate to Files > Manage Files
  2. Select a file and click Open in Builder
  3. In the Builder menu bar, select Code
  4. The Code Override screen appears
  5. image
  6. Remove any code you wish to replace
  7. Click the Code Snippet button to copy the snippet to your clipboard
  8. Click Code again to close the override screen
⚠️ If you're not using the override, be sure to click Delete to avoid unintended performance impacts.