Test Data Manager

Expand all | Collapse all

Javelin Flow - Export Excel contents to database

  • 1.  Javelin Flow - Export Excel contents to database

    Posted Feb 09, 2017 04:24 PM

    I have a javelin flow wherein I need to export the contents of an excel file to data mart table.

    I have created "ReadCSVToDataTableActivity" activity which is creating a data table  as output.

    Then I have created "SQL Bulk Copy - Data Reader" to copy the contents of data table to data mart table (Sql Server).

     

    But, I get error "Object reference not set to an instance of object".

     

    is there anything specific field to be mentioned in properties of data reader/bulk copy to achieve the desired results. Please help.



  • 2.  Re: Javelin Flow - Export Excel contents to database

    Broadcom Employee
    Posted Feb 10, 2017 12:59 PM

    How much data are we talking? Bulk copy may be overkill. 

    If the data in question isn't huge, we can do a 'for each row' with a query inside it to insert that record into the db.

    In the meantime, can you offer me some more details and I will try to build an example using the bulk copy activities.



  • 3.  Re: Javelin Flow - Export Excel contents to database
    Best Answer

    Broadcom Employee
    Posted Feb 13, 2017 10:26 AM

    Okay, turns out this is fairly easy, I have uploaded an example with a word doc here: 

    http://grid-tools-downloads.com/matty/CSVIntoDatatable.zip 

     

    You do it by creating a data reader directly from the CSV like so:


     

    Kind regards,

     

    Benjamin.



  • 4.  Re: Javelin Flow - Export Excel contents to database

    Posted Feb 13, 2017 10:32 AM

    Thanks Benjamin for response. I am trying to open the Javelin workflow you have attached but on opening the file , I am not able to view all activities as it gives error "Activity could not be loaded because of errors in XAML".

     

     Could you please resend the javelin flow document. thanks !

     

    Regards

    Shivani



  • 5.  Re: Javelin Flow - Export Excel contents to database

    Broadcom Employee
    Posted Feb 13, 2017 10:35 AM

    Can you send me a screenshot? of the entire window (so I can see your version number too). You're probably on an older version of Javelin than me.



  • 6.  Re: Javelin Flow - Export Excel contents to database

    Posted Feb 13, 2017 10:47 AM

    Javelin error



  • 7.  Re: Javelin Flow - Export Excel contents to database

    Broadcom Employee
    Posted Feb 13, 2017 11:00 AM

    I'm not quite sure why you can't see it on your version, but actually, it doesn't matter- the smart stuff you want to look at so you can do the same in your flow is all inside 'Append to Table' anyway.

     

    Have a look in there and you should see this:

     



  • 8.  Re: Javelin Flow - Export Excel contents to database

    Posted Feb 13, 2017 11:08 AM

    I am not able to see Idata reader push to sql activity , could you send the screenshot of its properties. thanks for your patience 



  • 9.  Re: Javelin Flow - Export Excel contents to database

    Broadcom Employee
    Posted Feb 13, 2017 11:32 AM

     

    So that activity is just a renamed SQL bulk copy activity, which is referring to the  IDataReader produced by our assign block, (usually produced by the data reader activity).



  • 10.  Re: Javelin Flow - Export Excel contents to database

    Posted Feb 13, 2017 11:41 AM

    Thanks. I had figured it out. Thank you !!



  • 11.  Re: Javelin Flow - Export Excel contents to database

    Posted Mar 05, 2018 02:37 PM

    Shivani,

     

    Any Idea what was wrong with this ? and How to got it. I see the same error in one of my Javelin flows.



  • 12.  Re: Javelin Flow - Export Excel contents to database

    Posted Apr 11, 2018 04:22 PM

    Hi

     

    Sorry for being late. But the error I was facing because of variable and type of variable being passed. Below is the flow which i used to get it working. CreateDataReader function was used.