SSIS导出数据到平面文件,并从输出中省略标题

发布于 2025-02-13 14:51:25 字数 579 浏览 2 评论 0原文

我正在创建一个SSIS软件包来查询数据库并将结果提取到CSV文件。我正在使用Visual Studio 2019。我将“标头行跳过:”到0-4。我在“预览”选项卡中使用数据行进行了相同的操作,但没有任何更改。我看不到任何可以删除标头的属性。我还尝试了此链接,这无济于事。 SSIS平面文件目标列标题。在此屏幕上取消选中的盒子立即给我这个错误。

严重性代码描述项目文件行抑制状态错误 验证错误。数据流任务平面文件目标[2]: 平面文件目的地的输入列数。输入[平面文件 目的地输入]不能为零。

还有什么?

I am creating an SSIS package to query a database and extract the results to a csv file. I'm using Visual Studio 2019. I have set "Header rows to skip:" to 0 - 4. I did the same with data rows in the Preview tab, and nothing changes. I do not see anything the Properties to remove the header. I also tried this link, and it did not help. SSIS Flat File Destination Column Headers. Unchecking the box on this screen immediately gives me this error.

Severity Code Description Project File Line Suppression State Error
Validation error. Data Flow Task Flat File Destination [2]: The
number of input columns for Flat File Destination. Inputs[Flat File
Destination Input] cannot be zero.

What else is there?

enter image description here

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

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

发布评论

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

评论(1

倚栏听风 2025-02-20 14:51:25

答案是将标头行跳到0,然后取消选中第一个数据行中的列名。为了使其使用列标题创建文件管理器,我使用以下步骤:

  1. 删除平面文件目标和文件管理器,如果存在
  2. 添加新的平面文件目标,并
  3. 在对话开始时单击新的平面文件管理器,它要求提供一个现有文件。而是浏览到路径并输入 new 文件名。 第一个数据行中的列名将不会检查,因此请单击“确定”和“确定”。这将填充一个没有标头的平面文件。

The answer is to set header rows to skip to 0 and uncheck the column names in the first data row. To get this to create a file manager with the column headings, I used the following steps:

  1. Delete the flat file destination and file manager, if exists
  2. Add new flat file destination and click new flat file manager
  3. When the dialogue opens, it asks for an existing file. Instead, browse to a path and enter a new file name. Column names in the first data row will not be checked, so click OK and OK. This will populate a flat file without headers.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文