This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
id,name,age,married,email | |
number,string,number,boolean,string | |
1,Max Mule,,false, | |
2,<empty_string>,23,true,test@email.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<mock:when messageProcessor=".*:.*" doc:name="Mock - Select Users"> | |
<mock:with-attributes> | |
<mock:with-attribute name="doc:name" whereValue="#['Select Users']"/> | |
</mock:with-attributes> | |
<mock:then-return payload="#[dw("readUrl('classpath://database_mock.dwl','application/dw').csvToJava('mocks/users.csv')")]" mimeType="application/java"/> | |
</mock:when> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
id | name | age | married | ||
---|---|---|---|---|---|
number | string | number | boolean | string | |
1 | Max Mule | false | |||
2 | <empty_string> | 23 | true | test@email.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%dw 1.0 | |
%output application/java | |
%function getCsvFile(csvFile) | |
readUrl("classPath://" ++ csvFile, "application/csv") | |
%function toType(value, type) | |
null when value == '' otherwise ( | |
value as :number when type == 'number' otherwise |