SSIS 中的复杂平面文件
SSIS 非常擅长处理所有记录都相同的平面文件,但当存在一点复杂性时就不太好了。
我想导入一个与此类似的文件 -
Customer: 2344
Name: John Smith
Item Description Price Qty
543455 Widget 1 4.00 2
543556 Widget 2 8.00 1
我想将其转换为以下输出 -
2344, John Smith, 543455, Widget 1, 4.00, 2
2344, John Smith, 543556, Widget 2, 8.00, 1
在我的一生中,我找不到一种简单的方法来做到这一点。有人有什么建议吗?或者我需要更好的 ETL 工具吗?
SSIS is great at handling flat files where all the records are the same, but not so good when there is a little complexity.
I want to import a file similar to this -
Customer: 2344
Name: John Smith
Item Description Price Qty
543455 Widget 1 4.00 2
543556 Widget 2 8.00 1
I want to turn this into the following output -
2344, John Smith, 543455, Widget 1, 4.00, 2
2344, John Smith, 543556, Widget 2, 8.00, 1
For the life of me, I can't find a simple way to do this. Has anyone got any suggestions? Or do I need a better ETL tool?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我发现在 SSIS 中处理这种半结构化输入文件的唯一成功方法是使用脚本任务逐行读取它,将输出存储在文本文件中(然后将其用作数据源)进一步处理)。
我从来没有需要尝试在数据流任务中执行此操作,我认为这会很困难。
The only successful way I've found to handle this kind of semi-structured input file in SSIS is to use a script task to read it line-by-line, storing the output in a text file (which is then used as a datasource further processing).
I've never had the need to try and do it in a dataflow task, which I imagine would be difficult.
脚本任务
是救援。Script task
is to rescue.