如何删除文件和所有目录中的数据列 [英] How to remove a column of data in a file and all directories

查看:68
本文介绍了如何删除文件和所有目录中的数据列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的所有源表都有一个RAW目录。 在该RAW目录中,我有许多增量文件。 我需要从给定源表的RAW目录中的所有文件中删除列。 我认为
执行此操作的最简单方法是在单独的位置输出新文件并删除原始文件,然后将新文件移回。 但我不确定在多个目录中删除单个源表的所有文件的简单方法。 我曾经尝试过使用ADF或U-SQL的
方式,但是除了编写自定义.net代码之外,我没有想出任何简单的东西。 

I have a RAW directory for all my source tables.  Within that RAW directory I have many incremental files.  I have a requirement to remove a column from all files in the RAW directory for the given source table.  I think the easiest way to do this is to output new files in a separate location and delete the original files, then move the new files back.  But I'm not sure of an easy way to delete all files for a single source table within multiple directories.  I have tried to think of a way using ADF or U-SQL, but I'm not coming up with anything easy outside of writing custom .net code. 

推荐答案

Hey Frank,

Hey Frank,

您知道的一种(复杂)方式是使用自定义活动。在表上执行USQL脚本有一种更简单的方法。要了解有关更改表格的更多信息,请参阅
doc

One(complex) way as you know is ofcourse by using a custom activity. There's an easier way by executing a USQL script on the table. To read more on altering a table, please refer this doc.

另外,要删除目录中的文件,可以将Web活动与Azure Data Lake REST API结合使用。要了解有关网络活动的更多信息,请参阅网站
活动文档
。 

Also to delete files in a directory, you can use a web activity in conjunction with Azure Data Lake REST APIs. To read more about web activity, please refer web activity doc

如果有帮助,请告诉我们。否则,我们很乐意继续进一步探讨。

Let us know if this helps. Else, we can gladly continue to probe in further.


这篇关于如何删除文件和所有目录中的数据列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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