[Module] A CSV Import Automator Module

Share business templates, ideas, experiences, etc with fellow Servoy developers here

[Module] A CSV Import Automator Module

Postby LOGIsoft » Wed Aug 01, 2007 4:13 pm

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
Benoit R. Savignac, president
LOGIsoft Consulting inc.
--------------------------------------------------------
Servoy Alliance Network Partner
User avatar
LOGIsoft
 
Posts: 260
Joined: Wed May 24, 2006 3:06 pm
Location: St-Basile-le-Grand (Montreal), Qc, Canada

Re: [Module] A CSV Import Automator Module

Postby LOGIsoft » Tue Dec 22, 2009 6:26 pm

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
Attachments
mod_LOGIsoft_importer_v4a.servoy
v4 module file
(97.2 KiB) Downloaded 426 times
Benoit R. Savignac, president
LOGIsoft Consulting inc.
--------------------------------------------------------
Servoy Alliance Network Partner
User avatar
LOGIsoft
 
Posts: 260
Joined: Wed May 24, 2006 3:06 pm
Location: St-Basile-le-Grand (Montreal), Qc, Canada

Re: [Module] A CSV Import Automator Module

Postby Kahuna » Wed Jan 20, 2010 9:51 pm

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!
(Servoy Version: 6.0.7 Win XP / 7 - SQL Server 2008 R2)
Ian Cordingley (Kahuna)
Kahuna
 
Posts: 1235
Joined: Thu Oct 26, 2006 1:39 am
Location: 1/2 NE UK 1/2 Olvera Spain

Re: [Module] A CSV Import Automator Module

Postby LOGIsoft » Wed Jan 20, 2010 11:19 pm

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
Benoit R. Savignac, president
LOGIsoft Consulting inc.
--------------------------------------------------------
Servoy Alliance Network Partner
User avatar
LOGIsoft
 
Posts: 260
Joined: Wed May 24, 2006 3:06 pm
Location: St-Basile-le-Grand (Montreal), Qc, Canada

Re: [Module] A CSV Import Automator Module

Postby Thomas Parry » Thu Jan 21, 2010 5:01 pm

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
Tom Parry
Prospect IT
Java/C++/Servoy/Jasper Reports/Simulation/Service Applications
http://www.prospect-saas.biz
Thomas Parry
 
Posts: 498
Joined: Thu Jan 10, 2008 8:48 pm
Location: Ottawa, Canada

Re: [Module] A CSV Import Automator Module

Postby LOGIsoft » Thu Jan 21, 2010 5:33 pm

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
Benoit R. Savignac, president
LOGIsoft Consulting inc.
--------------------------------------------------------
Servoy Alliance Network Partner
User avatar
LOGIsoft
 
Posts: 260
Joined: Wed May 24, 2006 3:06 pm
Location: St-Basile-le-Grand (Montreal), Qc, Canada

Re: [Module] A CSV Import Automator Module

Postby LOGIsoft » Thu Jan 21, 2010 5:51 pm

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
Benoit R. Savignac, president
LOGIsoft Consulting inc.
--------------------------------------------------------
Servoy Alliance Network Partner
User avatar
LOGIsoft
 
Posts: 260
Joined: Wed May 24, 2006 3:06 pm
Location: St-Basile-le-Grand (Montreal), Qc, Canada

Re: [Module] A CSV Import Automator Module

Postby LOGIsoft » Sun Jan 24, 2010 5:47 am

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
Attachments
mod_LOGIsoft_importer_v4b.servoy
v4 module file
(93.12 KiB) Downloaded 403 times
Benoit R. Savignac, president
LOGIsoft Consulting inc.
--------------------------------------------------------
Servoy Alliance Network Partner
User avatar
LOGIsoft
 
Posts: 260
Joined: Wed May 24, 2006 3:06 pm
Location: St-Basile-le-Grand (Montreal), Qc, Canada

Re: [Module] A CSV Import Automator Module

Postby Hans Nieuwenhuis » Sun Jan 24, 2010 11:07 am

Hi,

You can test if the first argument is a JsEvent :

Code: Select all
function myFunction(arg1, arg2, arg3) {
if (arg1 instanceof JSEvent)
   { code }
Hans Nieuwenhuis
Betagraphics
http://www.deltics.nl
http://www.betagraphics.nl

Servoy Version 7.3.1
Java version 1.7.0.x
Database Oracle 11g
User avatar
Hans Nieuwenhuis
 
Posts: 1026
Joined: Thu Apr 12, 2007 12:36 pm
Location: Hengelo, The Netherlands

Re: [Module] A CSV Import Automator Module

Postby LOGIsoft » Sun Jan 24, 2010 2:13 pm

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
Benoit R. Savignac, president
LOGIsoft Consulting inc.
--------------------------------------------------------
Servoy Alliance Network Partner
User avatar
LOGIsoft
 
Posts: 260
Joined: Wed May 24, 2006 3:06 pm
Location: St-Basile-le-Grand (Montreal), Qc, Canada

Re: [Module] A CSV Import Automator Module

Postby thonda » Fri Jul 02, 2010 4:44 am

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
thonda
 
Posts: 8
Joined: Fri Apr 09, 2010 3:32 am

Re: [Module] A CSV Import Automator Module

Postby maria » Tue Jul 06, 2010 5:42 am

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
maria
 
Posts: 424
Joined: Thu Apr 16, 2009 1:18 am
Location: Sydney

Re: [Module] A CSV Import Automator Module

Postby pbakker » Tue Jul 06, 2010 9:38 am

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
pbakker
 
Posts: 2822
Joined: Wed Oct 01, 2003 8:12 pm
Location: Amsterdam, the Netherlands

Re: [Module] A CSV Import Automator Module

Postby LOGIsoft » Tue Jul 06, 2010 2:11 pm

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
Benoit R. Savignac, president
LOGIsoft Consulting inc.
--------------------------------------------------------
Servoy Alliance Network Partner
User avatar
LOGIsoft
 
Posts: 260
Joined: Wed May 24, 2006 3:06 pm
Location: St-Basile-le-Grand (Montreal), Qc, Canada

Re: [Module] A CSV Import Automator Module

Postby maria » Wed Jul 07, 2010 1:15 am

Thanks guys.
maria
 
Posts: 424
Joined: Thu Apr 16, 2009 1:18 am
Location: Sydney

Next

Return to Sharing Central

Who is online

Users browsing this forum: No registered users and 2 guests