Newer Version Available

This content describes an older version of this product. View Latest

Examples of DataWeave in Apex

Here are code samples that demonstrate DataWeave in Apex.

To use DataWeave in Apex, follow these instructions with associated examples.

  • 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.

Extensive code samples that demonstrate the DataWeave in Apex feature are available on Developerforce.

Note