SSIS||Create validation on checking number of columns in source document using Script Task?

Описание к видео SSIS||Create validation on checking number of columns in source document using Script Task?

The below link is how to load data from Multiple CSV files using For Each Loop Container:
   • SSIS||Loading Multiple CSV Files with...  

For Script Task 1 - To read Number of lines
using (var reader = new StreamReader(Dts.Variables["User::File_Path"].Value.ToString()))
{
var line = reader.ReadLine();
var Columns = line.Split(',');
int i = Columns.Length;
Dts.Variables["User::Number_Columns"].Value = i;
}
For Script Task 2 - To show the message
MessageBox.Show(Dts.Variables["User::File_Path"].Value.ToString()
+ " Is not a valid file. Columns are missing in this file");

Комментарии

Информация по комментариям в разработке