将文件写入sftp的问题-删除回车符 [英] Issue writing file to sftp - carriage return removed

查看:96
本文介绍了将文件写入sftp的问题-删除回车符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个简单的要求,我必须将CSV写入linux sftp.在当前的实现中,当我使用mulesoft sftp连接器将CSV写入sftp时,将删除我已完成CR-回车"的操作.我已经在sftp连接器上,在dataweave中甚至在属性文件中将encoding = US-ASCII设置为mule.encoding = US-ASCII. 似乎没有什么可以在云中心工作,但是令人惊讶的是,在我的本地环境中,同样的工作还不错. 在阅读了几篇博客/白皮书后,我了解到在写入Linux SFTP时,传输类型应为'ASCII'. 我相信这显然是cloudHub的问题.任何帮助都将不胜感激.

I have a simple requirement where i have to write a csv to linux sftp . In the current implementation Which I have done CR-'carriage return' is being removed when writting the csv to sftp using mulesoft sftp connector . I have set encoding=US-ASCII on the sftp connector , in the dataweave , even in the property file as mule.encoding=US-ASCII. Nothing seems like working in cloud hub , but surprisingly the same works fine in my local . I understand after reading few blogs/ white papers that trasfer type should be 'ASCII' when writing to Linux SFTP . This is clearly an issue with cloudHub I believe . Any help is much appreciated .

推荐答案

显式设置%output application/csv lineSeparator ="\ r \ n"对我有用.谢谢

Explicitly setting %output application/csv lineSeparator="\r\n" worked for me. Thanks

这篇关于将文件写入sftp的问题-删除回车符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆