Contact Us 1-800-596-4880

DataWeave System Properties

Property Description

com.mulesoft.dw.buffered_char_sequence.enabled

Controls whether an internal BufferedCharSequence improvement is enabled or disabled. When this property is set to true, DataWeave does not load large fields (greater than 1.5M) into memory. DataWeave reads these fields by chunk. This feature reduces performance to prevent an out-of-memory error.

  • Type: Boolean

  • Default: true

com.mulesoft.dw.buffersize

Sets the size (in bytes) of in-memory input and output buffers that DataWeave uses to retain processed inputs and outputs. DataWeave stores payloads that exceed this size in temporary files dw-buffer-index-${count}.tmp and dw-buffer-output-${count}.tmp. See DataWeave Memory Management.

  • Type: Number (in bytes)

  • Default: 8192 bytes (8 KB)

com.mulesoft.dw.coercionexception.verbose

By default, adds to coercion exceptions more information about data that fails to coerce. When this property is set to false, DataWeave does not display the additional metadata.

  • Type: Boolean

  • Default: true

com.mulesoft.dw.date_minus_back_compatibility

Restores the Add and Subtract Time behaviors that changed in 2.3.0 when this property is set to true.

  • Type: Boolean

  • Default: false

Available for language levels: 2.3, 2.4

Example:

%dw 2.0
output application/dw
---
|2019-10-01| - |2018-09-23|
  • In DataWeave 2.3.0, the expression returns PT8952H.

  • In DataWeave 2.2.0, the expression returns P1Y8D.

com.mulesoft.dw.directbuffer.disable

Controls whether DataWeave uses off-heap memory (the default) or heap memory. DataWeave uses off-heap memory for internal buffering, which can cause issues on systems that have only a small amount of memory. See DataWeave Memory Management.

  • Type: Boolean

  • Default: false

com.mulesoft.dw.dump_files

Experimental: Dumps the input context and the failing script into a folder when this property is set to true. This behavior enables you to track the failing script and the data that makes the script fail, which is particularly useful for verifying that the received input data is valid. Incorrect scripts often fail when an upstream component generates invalid data.

  • Type: Boolean

  • Default: false

com.mulesoft.dw.dump_files is an experimental feature that is subject to change or removal from future versions of DataWeave. See Troubleshooting a Failing DataWeave Script.

com.mulesoft.dw.dump_folder

Experimental: Specifies the path in which to dump files when com.mulesoft.dw.dump_files is set to true.

  • Type: String

  • Default: java.io.tmpdir (system property value)

com.mulesoft.dw.dump_folder is an experimental feature that is subject to change or removal from future versions of DataWeave. See Troubleshooting a Failing DataWeave Script.

com.mulesoft.dw.dumper_fill_stacktrace

Experimental: Adds the StackTrace for dumper exceptions when com.mulesoft.dw.dump_files is set to true.

  • Type: Boolean

  • Default: false

com.mulesoft.dw.dumper_fill_stacktrace is an experimental feature that is subject to change or removal from future versions of DataWeave. See Troubleshooting a Failing DataWeave Script.

com.mulesoft.dw.error_value_length

Sets the maximum length of exception messages to display to the user. The message is truncated to the maximum length. This setting is useful for avoiding long exception messages.

  • Type: Number

  • Default: 80

com.mulesoft.dw.indexsize

Sets the maximum size (in bytes) of the page in memory that indexed readers use.

  • Type: Number

  • Default: 1572864

com.mulesoft.dw.javaSqlDateToDate

When set, java.sql.Date maps to the DataWeave Date type. If false, it maps to DateTime.

  • Type: Boolean

  • Default: false

Available for language levels: 2.4, 2.5

com.mulesoft.dw.max_memory_allocation

Sets the size (in bytes) of each slot in the off-heap memory pool. DataWeave stores payloads that exceed this size in temporary files dw-buffer-input-${count}.tmp and dw-buffer-output-${count}.tmp. See DataWeave Memory Management.

  • Type: Number

  • Default: 1572864 (1.5 MB)

com.mulesoft.dw.memory_pool_size

Sets the number of slots in the memory pool. DataWeave buffers use off-heap memory from a pool, up to a defined size (com.mulesoft.dw.memory_pool_size * com.mulesoft.dw.max_memory_allocation). DataWeave allocates the remainder using heap memory. See DataWeave Memory Management.

  • Type: Number

  • Default: 60

com.mulesoft.dw.multipart.defaultContentType

Sets the default Content-Type to use on parts of the multipart/* format when a Content-Type is not specified. See also, the multipart reader property defaultContentType. Introduced in DataWeave 2.3 (2.3.0-20210720) for the August 2021 release of Mule 4.3.0-20210719.

  • Type: String

  • Default: application/octet-stream

com.mulesoft.dw.stacksize

Sets the maximum size of the stack. When a function recurses too deeply, DataWeave throws an error, such as Stack Overflow. The maximum size limit is 256.

  • Type: Number

  • Default: 256

com.mulesoft.dw.track.cursor.close

When set to true, tracks the stack trace from which the CursorProvider#close() method is called. Use this property for troubleshooting, for example, if CursorProvider#openCursor() is called on a cursor that is already closed.

  • Type: Boolean

  • Default: false

com.mulesoft.dw.valueSelector.selectsAlwaysFirst

When set to set to true, returns the first occurrence of an element (even if the element appears more than once). Enabling this behavior degrades performance.

  • Type: Boolean

  • Default: false

The following example illustrates the behavior that is controlled by this property. (Assume that the DataWeave script acts on the XML input.)

XML input:
<root>
  <users>
     <user>
       <lname>chibana</lname>
       <name>Shoki</name>
     </user>
     <user>
       <name>Shoki</name>
       <name>Tomo</name>
     </user>
  </users>
</root>
DataWeave script:
%dw 2.0
output application/json
---
{
    shokis: payload.root.users.*user map $.name
}
  • If com.mulesoft.dw.valueSelector.selectsAlwaysFirst is set to true, the script returns the following output:

    {
      "shokis": [
        "Shoki",
        "Shoki"
      ]
    }
  • If com.mulesoft.dw.valueSelector.selectsAlwaysFirst is set to false, the script returns the following output:

    {
      "shokis": [
        "Shoki",
        "Tomo"
      ]
    }

Available for language levels: 2.3, 2.4

com.mulesoft.dw.xml_reader.honourMixedContentStructure

When this property is set to true, DataWeave retains a mixed-content structure instead of grouping text with mixed content into a single text field.

  • Type: Boolean

  • Default: false

Available for language levels: 2.4

com.mulesoft.dw.xml_reader.parseDtd

DataWeave parses a Doctype declaration when this property is set to true.

  • Type: Boolean

  • Default: false

Available for language levels: 2.5

com.mulesoft.dw.xml.supportDTD

Controls whether DTD handling is enabled or disabled. When this property is set to false, DataWeaves skips processing of both internal and external subsets. Note that the default for this property changed from true to false in Mule version 4.3.0-20210427, which includes the May, 2021 patch of DataWeave version 2.3.0.

  • Type: Boolean

  • Default: false