---
schema_version: "1"
id: df0b9ba3128d1dfdc0ecaa74d4f7b912238abcb57d196c05cb1386e5f6895904
title: DataWeave の新機能
collection: mulesoft
version: current
locale: ja-jp
portal_url: https://docs.salesforce.com/mulesoft/current/ja-jp/dataweave/2.4/whats-new-in-dw.md
canonical_url: https://docs.mulesoft.com/jp/dataweave/2.4/whats-new-in-dw
source_site: docs.mulesoft.com
content_type: documentation
content_hash: ebcf3135abefee92431e846062f5f4bbf661c6745fd0e21d04040be9513faf05
description: MuleSoft Documentation Site
release: "2.4"
latest: false
---
# DataWeave の新機能

DataWeave 2.4 は Mule 4.4 にバンドルされています。DataWeave の 2.4 バージョンでは次の機能が導入されます。

- メモリ量を超える文字列を自動的に読み取る機能。インデックス付けされたリーダーの戦略を使用し、サイズが 1.5 MB を超える文字列を処理する場合、DataWeave は自動的に値を複数のチャンクに分割してメモリ不足の問題を回避します。関連するリーダープロパティは ​`com.mulesoft.dw.max_memory_allocation`​ と ​`com.mulesoft.dw.buffered_char_sequence.enabled`​ です。​[「DataWeave のインデックス付きリーダー」](https://docs.mulesoft.com/jp/dataweave/2.4/dataweave-indexed-readers#large-strings-management)​を参照してください。
- データ形式を操作する新しいリーダープロパティとライタープロパティ。たとえば、XML ライターでは、ルートレベルで名前空間を定義できるようになりました。
- 多くの新しいモジュール、関数、型、アノテーション、変数。一部は実験的に導入されたものであり、今後のリリースで変更される可能性があります。
- 多くの関数が、​`null`​ 値を処理する新しいヘルパー関数を導入するためにオーバーロードされます。

ドキュメントの変更により、関数シグネチャーがより詳細に説明され、関数が ​`dw::Core`​、​`dw::core::Strings`​、​`dw::util::Math`​ などのモジュール名別に整理されるようになりました。

DataWeave 2.4 は Mule 4.4 にバンドルされています。Mule 4.4 リリースについての詳細は、​[「Mule 4.4 の新機能」](https://docs.mulesoft.com/jp/mule-runtime/4.4/whats-new-in-mule)​を参照してください。

## [](#データ形式の新しいプロパティ)データ形式の新しいプロパティ

DataWeave では、次のリーダープロパティとライタープロパティが導入されています。

- DataWeave (dw) リーダープロパティ: `privileges`​ を使用すれば、​`'Resources,Properties'`​ など、形式で使用する権限のカンマ区切りリストを提供できます。
- Excel (XLSX) リーダープロパティ: `tableLimit`​ を使用すれば、各行の最後の列の位置を設定できます。
- YAML ライタープロパティ: `writeDeclaration`​ を使用すれば、ヘッダー宣言を記述できます。
- XML ライタープロパティ: `defaultNamespace`​ では出力 XML のデフォルトの名前空間が指定され、​`writeDeclaredNamespaces`​ では XML のルート要素で宣言する名前空間がマークされます。

## [](#新しい-dataweave-の関数モジュールと機能)新しい DataWeave の関数モジュールと機能

新しい DataWeave のモジュールと機能:

- [dw::Core](https://docs.mulesoft.com/jp/dataweave/2.4/dw-core)​ では、新しい関数とアノテーションが導入されています。
    
    - [indexOf](https://docs.mulesoft.com/jp/dataweave/2.4/dw-core-functions-indexof)​
    - [lastIndexOf](https://docs.mulesoft.com/jp/dataweave/2.4/dw-core-functions-lastindexof)​
    - [onNull](https://docs.mulesoft.com/jp/dataweave/2.4/dw-core-functions-onnull)​
    - [then](https://docs.mulesoft.com/jp/dataweave/2.4/dw-core-functions-then)​
    - [Core Annotations](https://docs.mulesoft.com/jp/dataweave/2.4/dw-core-annotations)​ では、多数の新しいアノテーションが導入されています。
- [dw::core::Dates](https://docs.mulesoft.com/jp/dataweave/2.4/dw-dates)​ は Date (日付) 型を作成して操作するための関数と型が含まれる新しいモジュールです (たとえば、​`today`​ 関数)。
- [dw::core::Strings](https://docs.mulesoft.com/jp/dataweave/2.4/dw-strings)​ では新しい関数が導入されています。
    
    - [collapse](https://docs.mulesoft.com/jp/dataweave/2.4/dw-strings-functions-collapse)​
    - [countCharactersBy](https://docs.mulesoft.com/jp/dataweave/2.4/dw-strings-functions-countcharactersby)​
    - [countMatches](https://docs.mulesoft.com/jp/dataweave/2.4/dw-strings-functions-countmatches)​
    - [everyCharacter](https://docs.mulesoft.com/jp/dataweave/2.4/dw-strings-functions-everycharacter)​
    - [first](https://docs.mulesoft.com/jp/dataweave/2.4/dw-strings-functions-first)​
    - [hammingDistance](https://docs.mulesoft.com/jp/dataweave/2.4/dw-strings-functions-hammingdistance)​
    - [last](https://docs.mulesoft.com/jp/dataweave/2.4/dw-strings-functions-last)​
    - [levenshteinDistance](https://docs.mulesoft.com/jp/dataweave/2.4/dw-strings-functions-levenshteindistance)​
    - [lines](https://docs.mulesoft.com/jp/dataweave/2.4/dw-strings-functions-lines)​
    - [mapString](https://docs.mulesoft.com/jp/dataweave/2.4/dw-strings-functions-mapstring)​
    - [remove](https://docs.mulesoft.com/jp/dataweave/2.4/dw-strings-functions-remove)​
    - [replaceAll](https://docs.mulesoft.com/jp/dataweave/2.4/dw-strings-functions-replaceall)​
    - [reverse](https://docs.mulesoft.com/jp/dataweave/2.4/dw-strings-functions-reverse)​
    - [someCharacter](https://docs.mulesoft.com/jp/dataweave/2.4/dw-strings-functions-somecharacter)​
    - [substring](https://docs.mulesoft.com/jp/dataweave/2.4/dw-strings-functions-substring)​
    - [substringBy](https://docs.mulesoft.com/jp/dataweave/2.4/dw-strings-functions-substringby)​
    - [substringEvery](https://docs.mulesoft.com/jp/dataweave/2.4/dw-strings-functions-substringevery)​
    - [words](https://docs.mulesoft.com/jp/dataweave/2.4/dw-strings-functions-words)​
- [dw::util::Coercions](https://docs.mulesoft.com/jp/dataweave/2.4/dw-coercions)​ は日付型の変換を簡略化するための関数と型が含まれる新しい DataWeave モジュールです (たとえば、​`toString`​ 関数)。
- [dw::util::Math](https://docs.mulesoft.com/jp/dataweave/2.4/dw-math)​ は数学関数を提供する関数と変数が含まれる新しい DataWeave モジュールです (たとえば、​`sin`​ 関数)。
- [dw::util::Periods](https://docs.mulesoft.com/jp/dataweave/2.4/dw-periods)​ は Periods (期間) の作成を簡略化するための関数と型が含まれる新しい DataWeave モジュールです (たとえば、​`days`​ 関数)。
- [dw::util::Tree](https://docs.mulesoft.com/jp/dataweave/2.4/dw-tree)​ では新しい関数が導入されています。
    
    - [filterArrayLeafs](https://docs.mulesoft.com/jp/dataweave/2.4/dw-tree-functions-filterarrayleafs)​
    - [filterObjectLeafs](https://docs.mulesoft.com/jp/dataweave/2.4/dw-tree-functions-filterobjectleafs)​
    - [filterTree](https://docs.mulesoft.com/jp/dataweave/2.4/dw-tree-functions-filtertree)​
    - [isArrayType](https://docs.mulesoft.com/jp/dataweave/2.4/dw-tree-functions-isarraytype)​
    - [isAttributeType](https://docs.mulesoft.com/jp/dataweave/2.4/dw-tree-functions-isattributetype)​
    - [isObjectType](https://docs.mulesoft.com/jp/dataweave/2.4/dw-tree-functions-isobjecttype)​
- [dw::util::Values](https://docs.mulesoft.com/jp/dataweave/2.4/dw-values-types)​ では新しい型である ​`UpdaterValueProvider`​ が用意されています。