如何配置SSIS软件包以使用未定义的日期运行存储过程,但取决于最后提取
我的任务具有挑战性,对创建SSIS Packahe的最佳方法有些困惑。 基本上,我需要创建一个软件包,该软件包每周发送3次CSV文件,该文件的数据从SQL Server到SFTP文件夹。我的想法是创建一个计划,该作业计划在SSIS软件包中运行3次Pro Week。 该文件中的数据应从上次运行到昨天。 我已经完成的步骤。 1-我创建了一个配置表来注册已发送的文件。
2-我做了一个程序将SQL数据转换为CSV,在此将日期放在这样的参数中:
结果:
3-我正在尝试创建一个软件包,但是我很难说出在包装中运行的商店过程是什么。基本上,当我运行软件包时,必须获得最后加载的日期,并从该日期到昨天运行该过程。我不知道这些日期是否应为包装中的参数或变量以及如何配置该日期。我需要将数据添加到文件名中,例如file_20221010.csv
,但是有问题,因为它似乎不起作用:
I have a challenging task and am a bit confused as to the best approach to create an SSIS packahe.
Basically, I need to create a package that sends three times a week a csv file whose data comes from the sql server to the SFTP folder. My idea is to create a job that will be scheduled to run 3 times pro week the SSIS package.
The data in that file should be from the last run to yesterday.
Steps I have already done.
1- I created a configuration table to register the sent files.
2- I did a procedure to convert sql data into csv, where I put dates as parameters like this:
Result:
3- I'm trying to create a package but I'm having trouble putting the say what are the that the store procedure inside of package need to run. Basically when I run package it has to get the date of the last loaded and run the procedure from that date to yesterday. I don't know if these dates should be as parameters or variables in package and how to configure that. I need to add he data into to the file name like this file_20221010.csv
4- I have defined this variables:
But something wrong because it does not seems to work:
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
分辨率步骤:
另外,您可以使用数据流任务运行查询,并使用Flat File Connection Manager导出到CSV,并编写脚本任务以将文件上传到SFTP。
Resolution Steps:
Alternatively, you can run a query using Data Flow Task and export to CSV using Flat file connection manager and write a script task to upload the file to the SFTP.