#dataweave
SonarQube Cloud now brings deterministic code verification to integration workflows, insurance systems, build pipelines, and infrastructure scripts. #cybersecurity
Four New Languages Arrive in SonarQube Cloud: MuleSoft DataWeave, Gosu, Groovy, and PowerShell
hackernoon.com
September 10, 2026 at 2:53 AM
RFC 7807 Error Envelope with DataWeave Try Function
## Problem My script failed when `try` lacked an explicit import from `dw::Runtime`. The runtime reported `Unable to resolve reference of: try` during execution. The documentation describes `try` as a function that returns a Result object for handling errors docs. ## Input { "order": { "id": "ORD-2001", "total": "12.5O" } } ## Working configuration %dw 2.0 // try() lives in dw::Runtime — not imported by default import try from dw::Runtime // RFC 7807 media type is accepted as-is by the JSON writer output application/problem+json var attempt = try(() -> payload.order.total as Number) --- if (attempt.success) { total: attempt.result } else { "type": "https://example.com/problems/invalid-total", "title": "Invalid order total", "status": 400, "detail": attempt.error.message, "instance": "/orders/" ++ payload.order.id, "errorKind": attempt.error.kind } ## Output { "type": "https://example.com/problems/invalid-total", "title": "Invalid order total", "status": 400, "detail": "Cannot coerce String (12.5O) to Number", "instance": "/orders/ORD-2001", "errorKind": "InvalidNumberException" } The `detail` field contains the string `Cannot coerce String (12.5O) to Number`. The `errorKind` field holds the value `InvalidNumberException`. ## The trap The missing import causes a resolution failure when the script executes. Running `fail_noimport.dwl` produces an exit code of 255 and reports `Unable to resolve reference of: try`. ## What I do now I always add `import try from dw::Runtime` at the top of every script that uses the function. I verify the import exists before running the transformation to prevent resolution errors. Runs shown: DataWeave CLI 2.12.2 104 DataWeave patterns + 8 Exchange modules with 208 MUnit tests: github.com/shakarbisetty/mulesoft-cookbook | 60-second walkthroughs: youtube.com/@SanThaParv
dev.to
September 9, 2026 at 3:29 PM
Partition bulk records into accepted and rejected lists
## Problem My DataWeave script threw an unresolved reference error when calling `partition` without an explicit import. The Arrays module must be imported to your DataWeave code by adding the line `import * from dw::core::Arrays` to the header of your DataWeave script docs. ## Input { "records": [ { "id": "ORD-1001", "email": "ana@example.com" }, { "id": "ORD-1002", "email": "bad-address" }, { "id": "ORD-1003", "email": "raj@example.org" }, { "id": "ORD-1004" }, { "id": "ORD-1005", "email": "mei@example.net" } ] } ## Working configuration %dw 2.0 // partition() lives in dw::core::Arrays — not imported by default import * from dw::core::Arrays output application/json // keys are ALWAYS success/failure — re-map them to domain names var split = payload.records partition (r) -> (r.email default "") matches /.+@.+\..+/ --- { accepted: split.success map (r) -> r.id, rejected: split.failure map (r) -> { id: r.id, reason: "missing or invalid email" }, retryCount: sizeOf(split.failure) } ## Output { "accepted": [ "ORD-1001", "ORD-1003", "ORD-1005" ], "rejected": [ { "id": "ORD-1002", "reason": "missing or invalid email" }, { "id": "ORD-1004", "reason": "missing or invalid email" } ], "retryCount": 2 } The `accepted` array contains IDs from records with valid emails, while the `rejected` array holds objects for records missing or invalidating email addresses. The `retryCount` field reports the size of the failure partition as two. ## The trap The trap is an unresolved reference error when calling `partition` without importing the Arrays module. ## What I do now I add `import * from dw::core::Arrays` to the DataWeave header before using `partition`. I map the `success` and `failure` keys to domain names like `accepted` and `rejected`. I calculate retry counts using `sizeOf` on the failure partition. Runs shown: DataWeave CLI 2.12.2 104 DataWeave patterns + 8 Exchange modules with 208 MUnit tests: github.com/shakarbisetty/mulesoft-cookbook | 60-second walkthroughs: youtube.com/@SanThaParv
dev.to
September 9, 2026 at 3:29 PM
Four new languages arrive in SonarQube Cloud: MuleSoft DataWeave, Gosu, Groovy, and PowerShell

huntaegis.com
September 6, 2026 at 11:42 AM
DataWeave turns billions of public e-commerce data points into pricing and shelf decisions for 400+ brands and retailers.

https://yespress.io/dataweave?utm_source=bluesky&utm_medium=social via Yespress - apply for company newsroom: yespress.io/newsroom
yespress.io
September 2, 2026 at 2:46 PM
Karthik Bettadapura turned billions of messy web data points into a competitive intelligence engine. Meet DataWeave's co-founder.

https://yespress.io/karthik-bettadapura?utm_source=bluesky&utm_medium=social via Yespress - apply for company newsroom: yespress.io/newsroom
Karthik Bettadapura - Co-founder & CEO of DataWeave
How Karthik Bettadapura co-founded DataWeave and built an AI-powered competitive intelligence platform that reads the retail web for global brands.
yespress.io
August 23, 2026 at 6:12 AM
From prompt to production — MuleSoft Vibes generates Mule flows, DataWeave, RAML/OAS specs, and MUnit tests from natural language, hitting ~90% syntactic validity vs ~20% for generic LLMs.

https://github.com/shakarbisetty/mulesoft-cookbook/tree/main/ai-agents/vibes-dev-agent #mulesoft #aiagents
July 31, 2026 at 10:33 PM
A resilient on-error pattern that inspects the HTTP status, retries the transient 5xx, and maps 4xx into a clean typed error envelope — no swallowed failures.

https://github.com/shakarbisetty/mulesoft-cookbook #mulesoft #errorhandling
July 26, 2026 at 2:08 AM
A clean, allocation-free groupBy → reduce pattern for per-region order rollups in DataWeave 2.0.

https://dev.to/thasha/aggregating-orders-by-region-in-dataweave-20-groupby-reduce-410i-temp-slug-2142219 #dataweave #mulesoft
July 11, 2026 at 12:42 AM
🚀 New recipe: aggregating orders by region in DataWeave 2.0 — a clean groupBy → reduce (single-pass, allocation-free). Full write-up + more integration recipes: https://github.com/shakarbisetty/mulesoft-cookbook #dataweave #mulesoft
July 10, 2026 at 1:53 AM
friendos also kinda peam i like .dataweave a little bit much
May 18, 2026 at 2:31 AM
I standardized 14 API error formats into RFC 7807 with one DataWeave transform last year. The mobile team deleted 14 error parsers and wrote 1.

Trap: forget the default clause and unmapped errors return null.

github.com/shakarbisetty/mulesoft-cookbook
#DataWeave #MuleSoft
April 12, 2026 at 6:35 AM
I rebuilt a bulk API response with DataWeave partition() last year. One pass splits 10,000 records into success/failure. The caller sees exactly what failed.

Trap: empty batch divides by zero on success rate.

github.com/shakarbisetty/mulesoft-cookbook
#DataWeave #MuleSoft
April 12, 2026 at 4:34 AM
Stack overflow on 8,000 records. One annotation fixed it.

@TailRec annotation with an accumulator pattern — DW optimizes it into a loop.

github.com/shakarbisetty/mulesoft-cookbook
#DataWeave #MuleSoft
April 9, 2026 at 3:14 PM
I built a 3-layer LLM response parser in DataWeave last quarter. Regex extracts JSON from markdown fences, try() catches parse failures, key validation checks for hallucinations.

50,000 responses/day, zero crashes.

github.com/shakarbisetty/mulesoft-cookbook
#DataWeave #MuleSoft
April 5, 2026 at 8:50 PM
I spent 2 hours debugging "Unable to resolve reference" in DataWeave. The function was right there in the module file.

The fix: module .dwl files can't have output or --- lines. Delete those 2 lines. Done.

github.com/shakarbisetty/mulesoft-cookbook
#DataWeave #MuleSoft
April 5, 2026 at 8:06 PM
I built a DataWeave prompt builder for LLM integration last quarter. Transforms ticket data into structured system + user messages in 12 lines.

Trap: joinBy "\n" is literal, not a newline. Spent 2 hours on this.

github.com/shakarbisetty/mulesoft-cookbook
#DataWeave #MuleSoft
April 5, 2026 at 7:35 PM
I built a runtime schema discovery function in DataWeave last year. Detects String, Number, Array, Object, Null for any field automatically.

Trap: check Array before Object in the is chain. Order matters.

github.com/shakarbisetty/mulesoft-cookbook
#DataWeave #MuleSoft
April 5, 2026 at 6:18 PM
I built a recursive PII masker in DataWeave last year. One function masks SSN and email at any nesting depth — 3 levels, 10 levels, doesn't matter.

Trap: null values crash it. Add case is Null -> null.

github.com/shakarbisetty/mulesoft-cookbook
#DataWeave #MuleSoft
April 5, 2026 at 4:59 PM
I replaced a 40-line if/else with 4 match/case lines in DataWeave. Then I shipped it without the else clause and 3,000 events backed up in production.

Always add else. Unmatched values crash.

github.com/shakarbisetty/mulesoft-cookbook
#DataWeave #MuleSoft
April 5, 2026 at 3:43 PM
I built a 3-level sales report in DataWeave last quarter. Region → country → product. 50,000 records in under 2 seconds.

Trap: every level needs mapObject not map. And sum() on empty groups returns null.

github.com/shakarbisetty/mulesoft-cookbook
#DataWeave #MuleSoft
April 5, 2026 at 2:26 PM