使用 ssis 将 xml 文件从 ftp 服务器的 3 个不同目录下载到本地系统

发布于 2024-09-26 19:34:25 字数 384 浏览 0 评论 0原文

我是 ssis 新手,我的问题

有 3 个不同的 ftp 服务器位置(c:\temp1\,c:\temp2\,c:\temp3),我必须检查所有三个位置以及是否存在任何 xml 文件然后我必须在特定时间下载到本地工作目录(c:\workingxml),比如说在凌晨 4 点到上午 8 点之间以及上午 8 点之后。这 3 个不同位置的文件将移动到 ftp 服务器中的单个位置(c :\allxmlfiles) 通过 ftp 服务器。

如果我的 ssis 包在这段时间内(凌晨 4 点到上午 8 点)失败,那么我必须从 ftp 服务器的单个位置(c:\allxmlfiles)获取文件。

那么我如何编写 ssis 脚本任务来在不同时间从 ftp 服务器的不同位置获取 xml 文件。

等待帮助!

I am new to ssis and my question

There are 3 different locations of a ftp server(c:\temp1\,c:\temp2\,c:\temp3) and I have to check all the three locations and if any xml files exist then I have to download to my local working directory(c:\workingxml) in a specific time let's say within 4 A.M. to 8 A.M. and after 8A.M.the 3 different locations files move to a single location in the ftp server(c:\allxmlfiles) by ftp server.

if my ssis package failed within this time (4 A.M. to 8 A.M. ) then I have to take files from the single location of ftp server(c:\allxmlfiles).

so how could I write in a ssis script task to get the xml files from different locations of a ftp server in different time.

waiting for help!!!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

于我来说 2024-10-03 19:34:25

您的问题有点不清楚,例如,在此期间FTP服务器上是否不断出现新文件,或者您只从每个位置下载一次?就我个人而言,我发现 SSIS FTP 任务有点受限,特别是当您有多个文件需要多次下载时。我想说 SSIS 适合运行一次的东西,而不适合在较长时间内重复运行的东西。

在这种情况下,我可能会用我最喜欢的语言编写一个小脚本或程序来处理 FTP 工作,并从 Windows 或 MSSQL 安排它。只要您确定所有文件都已下载,您就可以启动 SSIS 包来完成更多工作。

Your question is a bit unclear, e.g. are new files appearing continuously on the FTP server during that time, or do you only download once from each location? Personally, I've found the SSIS FTP task a bit limited, especially if you have multiple files to download at multiple times. I would say that SSIS is good for things that run once, not for things that run repeatedly over a longer period of time.

In this case, I would probably write a small script or program in my favourite language to handle the FTP work, and schedule it from Windows or MSSQL. Whenever you're sure that all the files are downloaded then you can start the SSIS package to do more work.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文