SSIS 中是否有用于平面文件源的 WHERE 子句功能?
我对 SSIS 不太了解,我已经尽可能多地用谷歌搜索了这方面的信息。我真的很感激我能得到的任何帮助。
我正在构建一个 SSIS 包,并且只想从平面文件源插入一组特定的数据。有没有办法使用 WHERE 子句只提取特定数据?
例如,如何将此查询变成数据流任务?
INSERT INTO #TempTable (Column1, Column2)
SELECT Column1, Column2
FROM TEXTFILESOURCE
WHERE Column1 <> 'ABC'
可以通过Data Flow Task来实现吗?
I don't know too much about SSIS and I've googled as much as I could on this. I'd really appreciate any help I could get.
I'm building an SSIS package and I only want to insert a specific set of data from a Flat File Source. Is there a way to use a WHERE clause to only pull specific data in?
For example, how can I make this query into a Data Flow Task?
INSERT INTO #TempTable (Column1, Column2)
SELECT Column1, Column2
FROM TEXTFILESOURCE
WHERE Column1 <> 'ABC'
Can this be achieved through Data Flow Task?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
AFAIK 平面文件源任务中没有任何内容可以执行此操作,但是一旦设置完毕并且数据流入,您可以使用条件拆分来过滤行,使用与查询中的Where 条件相同的逻辑。
AFAIK there is nothing in the Flat File Source task that can do this, but once you have that set up and the data flowing in, you can use a Conditional Split to filter the rows using the same logic as your Where condition in your query.
可以使用条件拆分(将过滤条件作为表达式),也可以使用 C# 的脚本任务,但如果平面文件数据足够一致,您可以只使用条件拆分,那么这将是一种矫枉过正的做法。
Either a conditional split, with your filter conditions as an expression, or, a script task using C# but that would be an overkill if the flat file data is consistent enough you could just use conditional split.