No Data inserted in Destination Table using DataFlow Task

  • Hi,

    I am trying to insert data from source to destination table. Both the Tables are of same name and same table structure, just they are in Different databases.

    The whole process executes successfully but the destination table remains empty.

    Could you please let me know what could be the reason for this issue ?

    Attached is the package screenshot and below is a part of the debug mode output using breakpoints :

    SSIS breakpoint 'Break when the container receives the OnProgress event' at executable 'Data Flow Task' has been hit

    SSIS breakpoint 'Break when the container receives the OnProgress event' at executable 'Data Flow Task' has been hit

    SSIS breakpoint 'Break when the container receives the OnProgress event' at executable 'Data Flow Task' has been hit

    SSIS breakpoint 'Break when the container receives the OnInformation event' at executable 'Data Flow Task' has been hit

    Information: 0x40043009 at Data Flow Task, DTS.Pipeline: Cleanup phase is beginning.

    SSIS breakpoint 'Break when the container receives the OnProgress event' at executable 'Data Flow Task' has been hit

    SSIS breakpoint 'Break when the container receives the OnProgress event' at executable 'Data Flow Task' has been hit

    SSIS breakpoint 'Break when the container receives the OnProgress event' at executable 'Data Flow Task' has been hit

    SSIS breakpoint 'Break when the container receives the OnInformation event' at executable 'Data Flow Task' has been hit

    Information: 0x4004300B at Data Flow Task, DTS.Pipeline: "component "OLE DB Destination" (70)" wrote 0 rows.

    SSIS breakpoint 'Break when the container receives the OnPostExecute event' at executable 'Data Flow Task' has been hit

  • Devesh_Srivastava (7/10/2012)


    Hi,

    I am trying to insert data from source to destination table. Both the Tables are of same name and same table structure, just they are in Different databases.

    The whole process executes successfully but the destination table remains empty.

    Could you please let me know what could be the reason for this issue ?

    Attached is the package screenshot and below is a part of the debug mode output using breakpoints :

    SSIS breakpoint 'Break when the container receives the OnProgress event' at executable 'Data Flow Task' has been hit

    SSIS breakpoint 'Break when the container receives the OnProgress event' at executable 'Data Flow Task' has been hit

    SSIS breakpoint 'Break when the container receives the OnProgress event' at executable 'Data Flow Task' has been hit

    SSIS breakpoint 'Break when the container receives the OnInformation event' at executable 'Data Flow Task' has been hit

    Information: 0x40043009 at Data Flow Task, DTS.Pipeline: Cleanup phase is beginning.

    SSIS breakpoint 'Break when the container receives the OnProgress event' at executable 'Data Flow Task' has been hit

    SSIS breakpoint 'Break when the container receives the OnProgress event' at executable 'Data Flow Task' has been hit

    SSIS breakpoint 'Break when the container receives the OnProgress event' at executable 'Data Flow Task' has been hit

    SSIS breakpoint 'Break when the container receives the OnInformation event' at executable 'Data Flow Task' has been hit

    Information: 0x4004300B at Data Flow Task, DTS.Pipeline: "component "OLE DB Destination" (70)" wrote 0 rows.

    SSIS breakpoint 'Break when the container receives the OnPostExecute event' at executable 'Data Flow Task' has been hit

    Where are you managing connections for both the tables and how ?

    --rhythmk
    ------------------------------------------------------------------
    To post your question use below link

    https://www.sqlservercentral.com/articles/forum-etiquette-how-to-post-datacode-on-a-forum-to-get-the-best-help
    🙂

  • The connection has been created through Connection Manager.

    I tried DataFlow task outside ForEach loop container and it is working perfectly fin but failing inside ForEach loop container.

  • What is the purpose of the foreach container?

    The absence of evidence is not evidence of absence.
    Martin Rees

    You can lead a horse to water, but a pencil must be lead.
    Stan Laurel

  • I am trying to fetch the rows from the source table which have a timestamp(Column) within the last 20 minutes and then formatting the rows to send the data through a Mail.

    And i want this to happen for every row i.e. :

    a. Row1 inserted in destination Table where data is of within 20 minutes

    b. Formatting the data into DBmail

    c. Send the DbMail for every row as the row contains the failed packagename and its error description.

    Let me know if you any more questions.

    Thanks

    Devesh

  • Devesh_Srivastava (7/10/2012)


    I am trying to fetch the rows from the source table which have a timestamp(Column) within the last 20 minutes and then formatting the rows to send the data through a Mail.

    And i want this to happen for every row i.e. :

    a. Row1 inserted in destination Table where data is of within 20 minutes

    b. Formatting the data into DBmail

    c. Send the DbMail for every row as the row contains the failed packagename and its error description.

    Let me know if you any more questions.

    Thanks

    Devesh

    But, to quote your first post:

    I am trying to insert data from source to destination table

    This is quite different from

    I am trying to send an e-mail for every row of data which I select.

    Try to put yourself in our position: we cannot see your screen and we do not know your environment. You need to give more detail - at the moment I am just mystified about why 'missing rows at destination' has anything to do with 'sending e-mails row by row'.

    The absence of evidence is not evidence of absence.
    Martin Rees

    You can lead a horse to water, but a pencil must be lead.
    Stan Laurel

  • I am really sorry for the confusion!

    Currently my issue is with the second step of the package i.e DataFlow Task inside ForEach Loop container. Rest of the story for email will be taken care of later.

    Here is what i am doing with the package as of now:

    Step1: wrote script using SQL script task to select the rows(with only one cloumn 'Timestamp') within last 20 minute Timestamp.

    Step2:Then under ForEach loop Container, data(first row) is selected from source and copied to destination in the first iteration done as per the entry received from SQL script task

    Step3: The inserted data(single row) will be used to be formatted in the mail to be send for notification.

    so in this step we will be using dbmail task and other stuff.

    Step4 : second row comes from second Iteration and then other task are applied and executed further.

    Right now, we are not concerned with 3rd and 4th step. I was trying 1st and 2nd step but the data is not going into the destination table.

  • Devesh_Srivastava (7/10/2012)


    I am really sorry for the confusion!

    Currently my issue is with the second step of the package i.e DataFlow Task inside ForEach Loop container. Rest of the story for email will be taken care of later.

    Here is what i am doing with the package as of now:

    Step1: wrote script using SQL script task to select the rows(with only one cloumn 'Timestamp') within last 20 minute Timestamp.

    Step2:Then under ForEach loop Container, data(first row) is selected from source and copied to destination in the first iteration done as per the entry received from SQL script task

    Step3: The inserted data(single row) will be used to be formatted in the mail to be send for notification.

    so in this step we will be using dbmail task and other stuff.

    Step4 : second row comes from second Iteration and then other task are applied and executed further.

    Right now, we are not concerned with 3rd and 4th step. I was trying 1st and 2nd step but the data is not going into the destination table.

    So how did you configure the ForEach loop Container ? What is the Enumerator ?Is everything on place there ? Are you able to see the rows in data viewer on data path ?

    --rhythmk
    ------------------------------------------------------------------
    To post your question use below link

    https://www.sqlservercentral.com/articles/forum-etiquette-how-to-post-datacode-on-a-forum-to-get-the-best-help
    🙂

  • I am using a SQL command in Source Editor: Where clause is using a parameter which accepts the value from ForEach loop after being transfered from SQL script Task

    Select from SQL Task---> Value stored in Object type variable-->Foreach Loop accepts value-->passes the value to the parameter used in Source editor of Dataflow task.

    As of now, we dont see any values in dataviewer because the parameter accepts the values during execution.

  • I even tried using a flat file instead of a Table in data flow destination but the dataflow task is somehow not working inside ForEach loop Container?

    The values are coming from the SQL task to For each lopp container as the loop iterates number of times the rows are but the destination is giving zero data in flat files as well as in table.

    Can anyone please help me? This may be an easy one for most of the guys here but its not working for me !!!

Viewing 10 posts - 1 through 9 (of 9 total)

You must be logged in to reply to this topic. Login to reply