Generate expressions in the Mapper Snap
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.
- Open the Mapper Snap and SnapGPT.
Generate mapping table appears above the prompt (lower right side).
- 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.
- Click Generate SnapLogic expressions to generate an example prompt.
Note that the example prompt is highlighted.
- 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.
SnapGPT generates the expressions and displays them in the Snap UI.
- In the SnapGPT Preview, select the mappings you want to keep and click Keep Selected.