Newer Version Available
Examples of DataWeave in Apex (Beta)
Here are code samples that demonstrate DataWeave in Apex.
These are instructions to use DataWeave in Apex, with an associated example.
- Create a DataWeave script source file. For example: csvToContacts.dwl.
- Create the associated metadata file.
For example: csvToContacts.dwl-meta.xml.
- Push the source to the scratch org using Salesforce CLI version v7.151.9 or higher. See Salesforce CLI Release Notes.
- Invoke the DataWeave script from Apex and check the results from anonymous
Apex.This example invokes the csvToContacts.dwl script.