Importing External Data being Duplicated

Nick Friedrich asked on March 11, 2015 16:53

Hello,

im importing external data from a .xslx file to a custom table to display in a graph on my site. the import needs to run every hour (so as to display the most current data) but after the first import is done the 2nd import does not over write the first, instaed it creates a 2nd set of data in the data field of the custom table and it also displays a 2nd graph on the page - any way to have the additional imports over write the 1st import and only display 1 graph?

thanks

Recent Answers


Brenden Kehren answered on March 11, 2015 18:00

How are you doing your import? Are you checking to see if a record already exists? If so, do you update it or just insert it? Out of the box there is only one tool that allows direct import to the database, Kentico Import Tool. And this tool is only available with the Ultimate or EMS license. If you are using a module you downloaded or SQL Server Management Studio, you'd have to tell or code your update or truncate statements.

0 votesVote for this answer Mark as a Correct answer

Virgil Carroll answered on March 11, 2015 18:03

Nick, are you doing his with the Kentico Import tool? Do you have an easily identifiable key to know the duplicate rows?

One suggestion, since the custom table is nothing more than a table in your SQL database you could use the SQL DS packager to schedule the imports and can update existing records as well.

We use a different tool that I like a lot better. I will post a link when I get back to my desktop.

0 votesVote for this answer Mark as a Correct answer

Virgil Carroll answered on March 11, 2015 18:05

Haha Brendan and I are thinking alike and typing at the same time

0 votesVote for this answer Mark as a Correct answer

Nick Friedrich answered on March 11, 2015 19:08

i am using the kentico import toolkit. how do i set the identifiable key in kentico? or does this need to be done in SQL ?

for ex. i want to truncate the table and do a fresh insert of all rows.

thanks

0 votesVote for this answer Mark as a Correct answer

Virgil Carroll answered on March 11, 2015 20:09

That I know of, there is not a way to clean out all records and import new with the Import Toolkit.

We use this tool: http://www.sqlaccessories.com/sql_data_examiner/

I really like it and get a lot of my clients to buy it. It is easy to set-up and run as an automated process.

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on March 11, 2015 20:09

I believe you can specify a query when you're running your import as well as a truncate statement. You might check the documentation for it.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.