我有多个包含126列的平面文件,但每个文件都没有列名。我应该如何使用SSIS向这些文件添加列名。需要使用SSIS导入这些文件,以便我可以对这些文件执行转换。
答案 0 :(得分:0)
Do you want to create a new file which has column names or just assign field names to the columns for use in the rest of the package?
Whichever way, if the input file does not contain column names then set them up as follows…
If you need to create a new file that has the column names in it, just create a flat file destination and this time have the Column Names In First Row turned on, wire it up to the input you created and save it to a new file
答案 1 :(得分:0)
One way to do this (maybe not the quickest way) is by using the Advanced Editor.
Right click on the Excel Source component and select Show advanced editor
.
In the new window, you need to go to the Input and Output Properties
. You should have this by now:
Click on a column under Output Columns
(F1,F2,...)
In Common properties, edit the Name to what you want.
I added a derived column component as my next step and this is what I see under the aviable columns:
As you can see, F1 (which I edited in step 2) has a new column name now.
Edit: I somehow assumed you needed this for Excel. Anyways, I hope it helps.