开发者

SSIS - I need to import only the first row from a flat file. What's the best approach?

I have a file that contains a header record in the 1st row, and I need to evaluate only that one row. The rest of the rows 开发者_StackOverfloware detail records. I have it set up now as a flat file source component into a conditional split. The job of the conditional split is to look for the string "header" and then read the next column to get the count. I send the header record on and discard the rest.

This works fine, but for my bigger files (300k-800k rows, 100MB-900MB) I have to wait for the conditional split to evaluate all 300k rows, and this takes time.

Is there a better approach? I guess I could use a script component and break after the 1st row, but I'd like to see if there's a built in solution before I script it up.

Wondering if anyone knows of an alternative.


Go for the script component. This is the simplest solution for this task.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜