You can create a DataWeave module to centralize all your mocked data in a single file by declaring it using DataWeave variables. readUrl | MuleSoft Documentation I have defined following YAML properties file in Mule. I mean if I pass customerID, I should get the key "customers". classpath://myfolder/myFile.txt where myFolder is located under ${mule.home}${file.separator}${app,name}${file.separator}yourFile.txt. If you are reading a JSON or XML or plain text content from file and want to produce a JSON or XML or plain text content as output, you can specify mime type. By clicking Post Your Answer, you agree to our terms of service, privacy policy and cookie policy. Is it safe to publish research papers in cooperation with Russian academics? This example reads a file using a file configuration and a relative path: This example reads a file using the full path: In Studio, click the browse button () to locate the file, for example: Combined, these two parameters perform two size checks: One when the flow reaches a point where the stream is about to be consumed. 565), Improving the copy in the close modal and post notices - 2023 edition, New blog post from our CEO Prashanth: Community is the future of AI. This method has the advantage that the content of the resource file is loaded only once into a bean of type String. In Anypoint Studio, you can set the path in the File path field. I've also tried The only required parameter for the Read operation is the path to the file to be read. If both size checks return the same file size, then the stream is consumed successfully. with the TimeBetweenSizeCheckUnit parameter. read function is used to read the string or binary and returned parsed content. file is shown in the Input section below.) How are engines numbered on Starship and Super Heavy? Clarify your question because I do not understand. Actuallythis seems to set the payload to be an InputStream. Create a sample project in anypoint studio and configure the listener to trigger the request. Copyright 2023 Salesforce, Inc. All rights reserved. Content Discovery initiative April 13 update: Related questions using a Review our technical responses for the 2023 Developer Survey, Dynamic SELECT query which decides whether to use the WHERE clause in Mule 4, How do you add multiple input parameters to database connector in Mule, Reading mule variables from property file in Mule 4, Best practices for custom query and result set in Mule 4 with APIKit, How to Define array values in YAML and fetch the keys - Mule 4, reading a file in mule and parsing with dataweave, Ubuntu won't accept my choice of password, Canadian of Polish descent travel to Poland with Canadian passport.