Following the blog of jamie, I was trying to aply it to my project... but my requirments are a little different than him...
I have inside the ControlFlow several sequence containers and inside each container I have several dataflows. I want to get the time of each dataflow execution and the rows inserted in each.
So I added a row count transform for each dataflow and added a global variable to save the rows count value. In each dataflow I need to initialize this global variable to 0. And my problem is that using event handlers in OnPostExecute it repeats several times for each dataflow... how can I save info only once for each dataflow using eventhandlers
How can make eventhandler execute only once to save the related information for each dataflow
Understood
regards
"INSERT INTO SSISLog(TaskStartTime, EventType, PackageName, TaskName, PackageDuration, ContainerDuration, InsertCount, UpdateCount, DeleteCount, Host)
VALUES( '" + (DT_STR, 4, 1252) DATEPART("yyyy", @[System::EventHandlerStartTime]) + "-"
+(DT_STR, 4, 1252) DATEPART("mm", @[System::EventHandlerStartTime]) + "-"
+(DT_STR, 4, 1252) DATEPART("dd", @[System::EventHandlerStartTime]) + " "
+(DT_STR, 4, 1252) DATEPART("hh", @[System::EventHandlerStartTime]) + ":"
+(DT_STR, 4, 1252) DATEPART("mi", @[System::EventHandlerStartTime]) + ":"
+(DT_STR, 4, 1252) DATEPART("ss", @[System::EventHandlerStartTime]) +"',
'OnPostExecute',
"+ (DT_STR, 6, 1252)DATEDIFF( "ss", @[System::StartTime] , GETDATE() ) + ",
"+ (DT_STR, 6, 1252)DATEDIFF( "ss", @[System::ContainerStartTime] , GETDATE() ) + ",
" + (DT_STR, 4, 1252) @[User::SSIS_Rows] + ",
2,
3,
'"+ @[System::SourceDescription] +"')"