dataweave

Mule DataWeave transform-message failing with missing metadata:id attribute

狂风中的少年 提交于 2019-12-12 13:34:52
问题 I have a very simple hashmap payload being converted to application/json. I have done this in other flows by just dragging the dataweave component in, and writing the mapping expression. now for some reason, I am getting the following error: The prefix "metadata" for attribute "metadata:id" associated with an element type "dw:transform-message" is not bound. when I look at the xml, I see that my new dataweave component does not have a metadata:id attribute, but the other dataweave component i

Mule batch commit and records failures

霸气de小男生 提交于 2019-12-12 10:55:27
问题 My current scenario: I have 10000 records as input to batch . As per my understanding, batch is only for record-by-record processing.Hence, i am transforming each record using dataweave component inside batch step(Note: I havenot used any batch-commit) and writing each record to file. The reason for doing record-by-record processing is suppose in any particular record, there is an invalid data, only that particular record gets failed, rest of them will be processed fine. But in many of the

Defining various DB & Salesforce access information in Mule Anypoint Studio

假如想象 提交于 2019-12-12 04:08:43
问题 I am running Mule Anypoint studio v6.2.4 under Windows. I have an application which gets data records from a SQL Server DB and populates them into Salesforce Org. The application was developed using examples and works fine in the current scenario of one DB and one SF parameters defined in mule.{mule.env}.properties file. Now I need to access a different DB for input records and populate them to a different Salesforce org. Changing the access parameters in properties file every time is tedious

How to print record values without repeating certain fields in dataweave in CSV format based on specific conditions

巧了我就是萌 提交于 2019-12-12 03:46:51
问题 Please consider the following input sample in CSV Company,FirstName,LastName,Email Rate,Manule,Reaya,Reaya@egetmetus.org Rate,sholy,Bonvgy,Bonvage@mollis.org The output should be as follows : Company,FirstName,LastName,Email Rate,Manule,Reaya,Reaya@egetmetus.org ,sholy,Bonvgy,Bonvage@mollis.org The condition would be : if the company name repeats for different records in the input, it should be null in output CSV. Please let me know if this can be handled in Dataweave component in Mule Below

mule - web service consumer (soap) always returns null

谁都会走 提交于 2019-12-12 03:38:28
问题 I am using the Zuora soap API. I am attempting to perform a query. I don't get any errors but the results are always null when I output the payload to log. What am I doing wrong? (the query I provide below should return 320 records, which is what I get if I execute the same query in a local non-mule test script) This is the section of the flow. I set the zoql query to flowVars (flowVars.query). For example : select id from Account WHERE updatedDate > '2016-06-24T23:00:00-06:00' I use

Aggregate two json payloads into one based on filter

允我心安 提交于 2019-12-11 21:55:09
问题 i am trying to aggregate two json payloads into one. below json is stored in payload, { "clients":[ { "status":"IN", "clientSoftDeleteIndicator":"N", "roles":[ { "clientRoleCodeDesc":"PRIMARY OWNER", "clientRoleCode":"PO", "roleEffDate":null, "clientRoleStatusCode":"IN", "clientRoleStatusCodeDesc":"INACTIVE", "roleSoftDeleteIndicator":"N", "contractID":"49006649" }, { "clientRoleCodeDesc":"PRIMARY INSURED", "clientRoleCode":"PI", "roleEffDate":"2014-11-05", "clientRoleStatusCode":"IN",

Mule callable that returns PipedInputStream to DataWeave

喜你入骨 提交于 2019-12-11 09:46:07
问题 I'm trying to find a workaround to a problem I described in an earlier question in which DataWeave isn't reading a CSV file that doesn't comply with RFC 4180. I decided I'd write a Java class that implements org.mule.api.lifecycle.Callable that would read the InputStream I had (which might be from a file or from an HTTP response), remove the lines that can't be processed (I know the implementation here pulls out too much), and pipe readable lines into a new stream. Unfortunately, I keep

Ignore lines with quotes or get DataWeave will to read invalid CSV

别说谁变了你拦得住时间么 提交于 2019-12-11 09:45:52
问题 I'm trying to use Mule's DataWeave component to read a CSV file that isn't valid, or at least doesn't conform to RFC 4180. The issue is that there are some values that contain quotes, but the field isn't escaped. For example, col1,col2,col3 one,two "two" two,three one",two,three Is there a way to straightforward way to slightly relax the rules in the CSV parser that DataWeave uses so that it will treat a value that does not start with a double-quote as a non-escaped value? Alternatively, can

How to get more information about dataweave exception in muleosft

不想你离开。 提交于 2019-12-11 05:29:23
问题 I am getting below dataweave exception while executing a mule flow : " INFO 2016-11-06 09:02:42,097 [[abc].HTTP_Listener_Configuration.worker.01] com.mulesoft.weave.mule.utils.MuleWeaveFactory$: MimeType was not resolved '*/*' delegating to Java. ERROR 2016-11-06 09:02:42,290 [[abc].HTTP_Listener_Configuration.worker.01] org.mule.exception.CatchMessagingExceptionStrategy: Message : Exception while executing: "Response": { ^ Unexpected character '\u000a' at index 25 (line 2, position 24),

Transform list of objects into csv using dataweave

老子叫甜甜 提交于 2019-12-11 03:36:57
问题 I am trying to transform a list of objects to csv using the following code in dataweave: %dw 1.0 %type company = :object {class: "java.util.ArrayList"} %input payload application/java %output application/csv --- { name: payload.name, address: payload.address } as :company The below is the output that I get when I execute the above data weave code. name,name testName,testName2 testAddress,testAddress2 whilst I am expecting the following: (Sample data) name,address testName,testAddress