首页 \ 问答 \ 在SFTP上传时,CSV数据以单行形式出现(CSV data comes in single line on uploading on SFTP)

在SFTP上传时,CSV数据以单行形式出现(CSV data comes in single line on uploading on SFTP)

我们有一个带有|的csv文件 符号作为分隔符。 文件中的数据跨越多行,例如

123 | 2323 | 2323 | 23232 | 2323 | 232323 | 2323 | 2323 | 2323 | 3434 1213 | 323 | 2323 | 2323 | 3 | 323 | 323 | 2323 | 3434 | 3434 | 3434 3434 | 34343 | 434

但是,一旦我们在sftp上传这个文件并在那里下载,它就会在一行中显示数据。 如果我们在最后下载它,它会显示正确的数据,即上传时的数据。

有人知道可能是什么原因以及如何解决它?


We have a csv file with | symbol as a separator. The data in the file spans across multiple lines e.g.

123|2323|2323|23232|2323|232323|2323|2323|2323|3434 1213|323|2323|2323|3|323|323|2323|3434|3434|3434 3434|34343|434

But once we upload this file on an sftp and download there, it shows the data in a single line. And if we download it at our end, it shows the correct data i.e. as it was uploaded.

Does someone know what could be the reason & how to fix it?


原文:https://stackoverflow.com/questions/15676227
更新时间:2023-08-31 07:08

最满意答案

现在,Realm文件是完全同步的,这意味着如果某些数据不在设备上,它需要位于它自己的Realm文件中。

因此,在您的示例中,每个购物清单都在其自己的文件(= SyncConfiguration)中。

然而,我们正在研究一个名为“部分同步”的概念,您只有一个文件并且只是同步您指定的内容。


Right now, a Realm file is fully synchronized, which means that if some data shouldn't be on the device, it needs to be in its own Realm file.

So in your example, each grocery list is in its own file (= SyncConfiguration).

We are working on a concept called "Partial Sync" however, where you only have one file and just synchronize what you specify.

相关问答

更多
  • 现在,Realm文件是完全同步的,这意味着如果某些数据不在设备上,它需要位于它自己的Realm文件中。 因此,在您的示例中,每个购物清单都在其自己的文件(= SyncConfiguration)中。 然而,我们正在研究一个名为“部分同步”的概念,您只有一个文件并且只是同步您指定的内容。 Right now, a Realm file is fully synchronized, which means that if some data shouldn't be on the device, it need ...
  • 你是对的 - 整个领域得到同步。 您可以将不同的对话分割为不同的领域,然后您可以根据需要进行清理 - 例如删除不活动对话中的文件 (而不是数据 - 它仍然可在服务器上使用)。 或者,您可以使用“ 部分同步”仅下载与当前用户相关的对象。 You are right - the entire Realm gets synchronized. You can split different conversations into different Realms which you can then clean u ...
  • 是的! 这应该是可能的。 您可以在应用中拥有任意数量的同步和非同步领域; 你只需要确保协调你用来实例化它们的Configuration对象。 可以轻松地将Realm对象从一个Realm复制到另一个Realm: let objectFromLocalRealm = //... let synchronizedRealm = //... try! synchronizedRealm.write { sychronizedRealm.create(*objectType*.self, value: obj ...
  • 如果我搞砸了,请原谅我的Swift,我对语法不太熟悉。 虽然我知道这是示例代码,但我实际上并不喜欢它。 let realm = try! Realm() let theDog = realm.objects(Dog.self).filter("age == 1").first try! realm.write { theDog!.age = 3 } } 查询应位于事务块内,以确保您正在修改对象的最新版本。 let realm = try! Realm() try! realm.wr ...
  • Unison在每次成功同步该路径后保留每条路径内容的记录(即,它记住两个副本中它们相同时的最后一刻的内容)。 我们说如果路径的当前内容与上次成功同步的内容不同,则更新路径(在某些副本中)。 请注意,路径是否更新与其上次修改时间无关 - 在确定是否发生更新时,Unison仅考虑内容。 这意味着在不更改其内容的情况下触摸文件将不会被识别为更新。 甚至可以多次更改文件,然后将其更改回原始内容; 只要Unison仅在此过程结束时运行,则不会识别任何更新。 换句话说:Unison知道你已经删除了文件X,因为它不再在A ...
  • 目前,是的。 Public Realms完全与每个客户端设备同步。 当客户端的设备第一次连接时,最初将下载整个列表,从那时起,任何其他更改将在服务器上进行同步时进行同步。 话虽这么说,所有Realm文件都被压缩(即,所有空的已分配空间都被删除,所有字符串都被压缩),然后在下载到客户端之前用gzip压缩,因此只要公共Realm不包含大二进制文件blob,即使非常大的文件应该很快就会降下来。 这是将部分复制添加到Realm Mobile Platform的路线图。 这将只允许单个Realm文件的一部分与特定客户 ...
  • Realm Sync的工作方式是确保设备上Realm的副本和服务器(以及任何其他设备上)同一Realm的副本始终保持彼此同步。 这意味着即使根本没有网络连接,您也可以使用与任何其他Realm完全相同的方式使用同步的Realm。 同步的王国是当地的王国; 您不需要手动维护包含相同数据的两个单独的域。 如果您在应用程序启动时处于脱机状态,则可以使用SyncUser.current API获取以前登录的用户,以便打开已同步的Realms。 (如果您之前已登录过多个用户,则必须使用SyncUser.all API来 ...
  • 很难比较这两者,因为它有所不同: Firebase实时数据库是来自Google的托管服务(=后端),它带有SDK,可以轻松实现同步和离线使用。 它是第三方库,不是Android SDK的一部分。 SyncAdapter是Android SDK的一部分,它可以帮助您创建与任何后端的定期同步。 那么选择哪一个? 这取决于你的后端 - 如果你有现有的后端,请使用SyncAdapter。 如果您要创建新应用并且还没有后端,Firebase可能会更容易。 您不需要执行任何同步逻辑,它也可以脱机处理。 但是,您应该考虑 ...
  • 事实证明,在进行默认领域配置之前,我正在初始化Realm的一个实例......这意味着我正在调查另一个(离线)领域而不是我写作的那个领域。 在authentication功能中重新声明领域实例可以解决问题。 Turns out, I was initializing an instance of Realm before doing the default realm configuration... this meant I was looking into another (offline) realm ...
  • 您可以在Azure中以很多方式(当然)执行此操作。 一个。 您可以使用Azure移动应用服务 ,它为您提供了许多功能,包括离线同步数据 ,这是您在这里寻找的一部分。 还有很多入门样本, 包括一个用于iOS的样本。 湾 如果你想在Azure上运行Realm是绝对可能的。 只需在Ubuntu上创建一个VM,然后在该机器上安装Realm。 C。 如果您不担心数据中的脱机同步数据或冲突处理,并且只是希望轻量级解决方案以文档格式存储数据,则Azure存储表或Azure DocumentDB可以提供简单的解决方案。 A ...

相关文章

更多

最新问答

更多
  • 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
  • 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
  • OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
  • 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
  • codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
  • 在计算机拍照在哪里进入
  • 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
  • No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
  • 单页应用程序:页面重新加载(Single Page Application: page reload)
  • 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
  • System.StackOverflow错误(System.StackOverflow error)
  • KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • C#类名中允许哪些字符?(What characters are allowed in C# class name?)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 在Angular 5中不是一个函数(is not a function in Angular 5)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • 常见的python rpc和cli接口(Common python rpc and cli interface)
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)