Page 1 of 2

[Module] A CSV Import Automator Module

PostPosted: Wed Aug 01, 2007 4:13 pm
by LOGIsoft
Hello everyone,

Have a look at a free module I'm making available to my fellow Servoy developers:

http://www.servoymagazine.com/home/2007/07/module-a-csv-im.html#more

Enjoy! :wink:

Sincerely,

Ben

Re: [Module] A CSV Import Automator Module

PostPosted: Tue Dec 22, 2009 6:26 pm
by LOGIsoft
Hello everyone,

I have made some improvements to the module and adapted it for version 4 - I will eventually make it v5-compatible, unless someone else beats me to it. Please see attachment below.

Hope it's useful to the community,

Ben

Re: [Module] A CSV Import Automator Module

PostPosted: Wed Jan 20, 2010 9:51 pm
by Kahuna
Hi Ben - I just saw your CSV importer preso on the VUG and that is fantastic my friend. Brilliant and just what most tools need - a way to easily build an import spec and get the data across.

I saw Matt Frizzel's (sorry if I miss spelled that Matt!) CSV parser and to be honest - the two together (if you can incorporate Matt's parsing to eradicate ''' etc) will be ridiculously powerful as a data manager tool.

Well done my friend - hope to this see soon and you'll definitely get a credit on our developers page!

Re: [Module] A CSV Import Automator Module

PostPosted: Wed Jan 20, 2010 11:19 pm
by LOGIsoft
Thanks for the praise, Ian - not sure if I deserve it, seeing as I borrowed a lot from other people, and there are still bugs to fix (oh the joy of live demos! :roll: ).

I am currently analyzing Matt's method to see how I could incorporate it in my module. I will keep you posted on my progress.

Cheers,

Ben

Re: [Module] A CSV Import Automator Module

PostPosted: Thu Jan 21, 2010 5:01 pm
by Thomas Parry
Yeah Ben,
good presentation.

I have been using Matt's csv code now and it helped to have it cover some areas I had not thought of yet.
So I do recommend it to be incorporated.

As a secondary issue I see that your imported from csv only dumps into a single table.

In my case I need to build a parent-child relation so two tables are involved. I would like to take your mapping of the csv columns and extend them to two tables - or are you already going down that path?

Cheers, Salut
Tom

Re: [Module] A CSV Import Automator Module

PostPosted: Thu Jan 21, 2010 5:33 pm
by LOGIsoft
Very interesting suggestion Tom, I hadn't thought of that - I'll have a look at this, but don't hold your breath, as I won't be able to spend some time on this before next week or the week after that. But I'm happy to see interest in my little brain child. 8)

Sincerely,

Ben

Re: [Module] A CSV Import Automator Module

PostPosted: Thu Jan 21, 2010 5:51 pm
by LOGIsoft
In the meantime, I have posted a modification to Matt's method on the discussion thread:

http://forum.servoy.com/viewtopic.php?f=14&t=13489&p=70287#p70287

It will be included in the module.

Happy trails,

Ben

Re: [Module] A CSV Import Automator Module

PostPosted: Sun Jan 24, 2010 5:47 am
by LOGIsoft
Please find attached the new version for Servoy 4, with the discussed enhancements.

I want to make a v5-compatible version of the module also, but I am stuck at a problem: some of my methods are used on data change (so have 3 arguments sent - oldValue, newValue and JSEvent) in certain circumstances AND on focus gained (which then receives only one argument, the JSEvent) in others. How do I convert my methods to account for these different scenarios?

Thanks in advance,

Ben

Re: [Module] A CSV Import Automator Module

PostPosted: Sun Jan 24, 2010 11:07 am
by Hans Nieuwenhuis
Hi,

You can test if the first argument is a JsEvent :

Code: Select all
function myFunction(arg1, arg2, arg3) {
if (arg1 instanceof JSEvent)
   { code }

Re: [Module] A CSV Import Automator Module

PostPosted: Sun Jan 24, 2010 2:13 pm
by LOGIsoft
Thanks for the tip, Hans. :)

When converting from 4 to 5 and using QuickFix to apply the new method templates, what determines which template is applied to a single method that is used in different contexts, such as explained before? Is there a way to force the application of a particular template on a method?

Thanks again,

Ben

Re: [Module] A CSV Import Automator Module

PostPosted: Fri Jul 02, 2010 4:44 am
by thonda
Hi Guys,

I'd like to try out this CSV Automator module... however I am not able to make it run.
I have checked-out the solution..but I hadn't got those two database servers included in my solution.
And then I wasn't able to create these servers.
How to create them?? What data should they contain?? Is there somewhere their structure specified?

Will really appreciate any help.
Thanks

Re: [Module] A CSV Import Automator Module

PostPosted: Tue Jul 06, 2010 5:42 am
by maria
Hi All,

Yep, I'm not sure how to use this module either...
I would think that it comes as a jar file like other plugins, but this one is a separate solution on its own.

The following requirements from the Wiki page of the project don't explain much about how to use the module:

Requirements

Two database servers named 'ls_messages' (for i18n) and 'logisoft_importer' need to be present in your Servoy installation prior to synchronizing to the SVN repository. Please follow David Workman's excellent step-by-step guide in ServoyMagazine if you need to set this up for your Mac - the repository used is svn://svn.servoyforge.net/csvimporter (an active account on ServoyForge is required for this to work). Thereafter, you may checkout the mod_LOGIsoft_importer solution.


Could anyone briefly explain why I need two database servers and what they are? Ain't I supposed to use my own database server? It's all a bit confusing...
Thanks!

Cheers,
Maria

Re: [Module] A CSV Import Automator Module

PostPosted: Tue Jul 06, 2010 9:38 am
by pbakker
Hi Maria,

I think it would be better to discuss this on the ServoyForge site, under the CSV Import Automator Module project.

Unfortunately, that project doesn't have a forum enabled (yet).

I think it's best to contact the project owner to do so.

Paul

Re: [Module] A CSV Import Automator Module

PostPosted: Tue Jul 06, 2010 2:11 pm
by LOGIsoft
Hi Maria,

As Paul suggested, the project page might be a better place to discuss this, so I have just activated a local forum for it on ServoyForge.

You are correct - this module is just that - a module (a Servoy solution which can be used to extend an existing solution), not a plugin or a bean.

In short, the two database servers are actually two database connections that the module expects to be present in your Eclipse environment before it can be correctly imported and run in your local workspace/repository. This is explained in detail in Adrian McGilly's excellent handbook, which can be previewed here: http://www.mcgilly.com/Servoy%20Beginner's%20Handbook%20PREVIEW.pdf. This is needed so as not to break the module's core functionality. The rest is just standard Servoy stuff.

To make things easier for people who don't have an SVN connection set up, I am also making available a downloadable version of the module in the Files section (Thanks for pointing this out Patrick!).

Enjoy!

Ben

Re: [Module] A CSV Import Automator Module

PostPosted: Wed Jul 07, 2010 1:15 am
by maria
Thanks guys.