Generate expressions in the Mapper Snap

Overview

You can use SnapGPT to generate expressions to use for mappings in the Mapper Snap.

SnapGPT uses the natural language sentences you provide to generate the expressions for mappings using LLMs.

This feature uses a catalog of expressions provided by the SnapLogic professional services team. This catalog is combined with the input schema from the preview input data that you provide to the Mapper Snap and from the natural language sentences you enter in the prompt.

The preview input data is optional. However, without it, SnapGPT is not able to generate accurate expressions for mappings that require the input data. Some use cases will still work, such as Add current timestamp.

  1. Open the Mapper Snap and SnapGPT.
    Generate mapping table appears above the prompt (lower right side).
  2. Validate the pipeline to get the preview of the input data.
    Skip this step if there is no data to be provided for the Mapper Snap.
  3. Click Generate SnapLogic expressions to generate an example prompt.
    Note that the example prompt is highlighted.
  4. Replace the highlighted text in the prompt with what you want SnapGPT to generate.
    In this example we replaced the highlighted text with generate SnapLogic expressions to extract exchange rates and currency from european central bank.
    Example prompt to exchange rate information

    SnapGPT generates the expressions and displays them in the Snap UI.

  5. In the SnapGPT Preview, select the mappings you want to keep and click Keep Selected.

    Preview of auto-generated mappings

The mappings are added to the Mapping table in the Mapper Snap.
Updated Mapping table in the Mapper Snap