在 mule 4 中从 sql 数据创建文件到 csv

creating file from sql data to csv in mule 4

我需要从 SQL 数据库创建文件并将数据加载到 CSV 文件中。 CSV文件生成成功后,需要将其传输到另一个sftp位置。

我假设您已经熟悉 Mule 4 applications and flows. In a flow you can query the database using the Database connector, use the Transform component to write a DataWeave transformation to a CSV (output application/csv), then use the SFTP connector 将文件写入 SFTP 服务器。

您应该熟悉文档中的每个组件如何能够编写数据库查询、转换和 SFTP 传输。