Page 1 of 1

DataBase Import/Export Utility

Posted: Wed May 21, 2008 12:29 pm
by heinscott
Hello all...

I was just wondering if there would be any interest in a Database Import/Export utility for Able.
I've just spent the past few days writing a (Very) beta version of an export and import utility, for working with the Able Commerce tables directly (ie, in order to import categories, you would need to import into ac_Categories, ac_CatalogNodes, ac_CategoryParents and make sure you had correct syntax).
I have worked on this because I have 1,000's of products, options, and categories, that must keep the SAME id's as they originally had, in order to automatically put them in the proper places, which the DataPort utility does not seem to allow :(. Also, we do a lot of import/export for shipment tracking purposes, and also custom emails to customers who have bought certain products... (the list goes on and on...)
So, anyway, after days of coding, I've just successfully imported my 400 categories, and gotten them to show up in the AC Catalog. So, I guess the question I have is: Is there enough interest in this (by the community) that is would be worth it to test, debug, and make available? Right now, here is how it works:

Export:
You can type an SQL query (any type) into the box, and either run it, or save it for repeated use. You can also delete a query that you have saved. I'm assuming that there are some String parsing type errors with this mod right now, but, I have not done extensive testing yet.

Import:
You can select a table from DB to work with, and upload a CSV to import into it. You can either overwrite existing records, update existing records, or skip existing records. Also, there is a "Test" mode that will write all the data to a temp table. Also (not shown in pictures) I have include an Identity Override check box that will allow you to import Identity keys, like I needed to do for product and category ids. Right now, everything seems to work correctly, although I'm guessing that there are certain types of CSV data that could cause errors. Even so, a table is generated that shows all sucessful queries and failed ones, which allows you to fix csv manually if necessary.

I have included some screen shots of the utilities as they look right now.
export_util.jpg
import_util.jpg
import_results.jpg
If anyone has any interest in this, let me know. I would not be opposed to even getting some help with testing. I definitely can't make any guarantees to how this will perform (the first test I ran accidently deleted my CatalogNodes table from the DB), but, it's here if anyone is interested!

Scott

Re: DataBase Import/Export Utility

Posted: Wed May 21, 2008 2:00 pm
by Will
Definitely interested. Especially in export. Would help in testing.

Re: DataBase Import/Export Utility

Posted: Wed May 21, 2008 6:45 pm
by compunerdy
This would be a very helpfull tool.

Re: DataBase Import/Export Utility

Posted: Fri May 23, 2008 7:31 am
by heinscott
I will get together the instructions for it, and post it all here soon. The export requires an extra table be added to the database (which you can create directly from the export tool's query window), and both require a QuickSQL helper file.
My demo license just expired, so I am waiting right now for my new key. I should hopefully be able to get it, and get the project up by Monday.

Scott

Re: DataBase Import/Export Utility

Posted: Fri May 23, 2008 10:18 am
by nickc
Looks nice.
The generic "run query" function is a little scary - I'd recommend not making that part of your final release.
Platform architectects go to great lengths to defeat to the ability of the outside world to execute code in your app.
The database server should never be available to the big bad internet.
Hide it in a private LAN and use the back channel to allow your web server access.
Put your repetitive data export tasks in sp's or dts packages.