Writing the datatables into the SQL Tables: using "INSERT" activity

Hi Team,

As my project requires to have 10 datatables with 6-8 columns each and 1,00,000+ rows, I am willing to write these datatables in batches of 1000 rows into the SQL server.

Below are the pointer which I know and followed so far:-

  1. Earlier, I used to write these batches in the excel using (“write range” and “append range”)

  2. Now, I have established the SQL connection successfully and about to use Insert activity.

  3. I have also created corresponding Table names and Column names in the database, so all I need to do is to use the Insert activity using batches.

My question is, as I used Write Range and Append Range in the excel application scope, I want to have a same effect in the SQL database. So can I expect that the data is appended correctly using the “Insert Activity” following the proper headers and table names?

Just curious to understand before I modify my code. Hope my question is well understood.

Thanks and Regards,
@hacky

@Palaniyappan ; @jan_brian_despi;@lakshman

Please help.

2 Likes

Hi @hacky,

First you can perform all excel operations once excel is ready take that datatable & update in sql.
It will reflect

@varunk

But the requirement does not have to do anything with excel. Directly dumping batches into the database

Yah of course
In INSERT ACTIVITY we got option of output variable that will give us number of affected records
So when we use INSERT statement with that output we can get to know whether the number of records were inserted or not

Cheers @hacky

2 Likes

First you writing in excel then use insert activity for sql to insert a data.
If you are appending data in excel then write a query to update the table in sql