Transformations > Transformations > Generate an expression
  

Generate an expression

Generate an expression using CLAIRE Copilot to define mapping logic in your own words or using pseudocode. You can submit a natural language prompt and CLAIRE Copilot converts it into Informatica's transformation language.
CLAIRE Copilot can generate expressions in the Aggregator and Expression transformations in mappings and mappings in advanced mode using functions that are common to both mapping types. For example, CLAIRE Copilot can't generate expressions that use window functions because they're available only in advanced mode. You can't use CLAIRE Copilot to generate expressions in mappings in SQL ELT mode.
The following image shows CLAIRE Copilot in the expression editor:
  1. 1Open the Generate Expression dialog box to generate an expression using CLAIRE Copilot.
  2. 2Use the left and right arrows to view different versions of the expression.
  3. 3View the prompt that CLAIRE Copilot used to generate the current version of the expression.
  4. 4View and edit the generated expression. The expression includes comments that explain how CLAIRE Copilot generated it.
Note: When you select OK to exit the expression editor, the current version of the expression is saved. For example, if you navigate to version 3 out of 4 and exit the editor, then version 3 is saved. The other versions are discarded.

Prompts to generate expressions

To generate an expression using CLAIRE Copilot, you can describe the expression in your own words or using pseudocode.
Note: When you specify a field in a prompt, make sure that it exists in the mapping or create it manually. CLAIRE Copilot doesn't create fields based on the generated expression.
The following sample prompts show how you can describe an expression in your own words:
Write a regex to standardize phone numbers by applying formatting logic to match the pattern (XXX) XXX-XXXX.
Create a condition to route separate records by month and assign them to different targets.
Check if address1 contains USA. If yes, concatenate address1 and address2. If not, convert the mod of the ASCII code of the first letter in both the city and state to string.
Extract the month from the start date and compare it to the end date.