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

Publicado em: 10 Abril 2023
no canal de: SQLtoSSIStoPowerBI
519
5

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

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");


Nesta página do site você pode assistir ao vídeo on-line SSIS||Create validation on checking number of columns in source document using Script Task? duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário SQLtoSSIStoPowerBI 10 Abril 2023, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 519 vezes e gostou 5 espectadores. Boa visualização!