Data from Access database to Wandora

Forum is for miscellaneous user help requests.

Data from Access database to Wandora

Postby ruostre » Thu Apr 14, 2016 1:11 am

Hi,
You have earlier recommended as one alternative, that ”you can build a custom script that transforms your database data into a topic map which is imported to Wandora”.

I have imported 540 topics to Wendora from Ms Access with Adjacency list import with no problem. My application in Access is build in the basis of topic map. I would like to use it also in future sue to its flexibility and user frendly interface.

I looked Wendora and want to use it especially due to it’s graphs. They are marvellous.

Now my main question is, how difficult is it to create the script, with which I can transform my database data from Access to Wandora for read only? How can I do it? Can I automatize it?

Wendora is good application, but I think my application work better in data creation in everyday’s rapid situations. But Wendora is a fantastic application too and I wanted to utilize it in future.
ruostre
 
Posts: 1
Joined: Wed Apr 13, 2016 10:32 pm

Re: Data from Access database to Wandora

Postby akivela » Thu Apr 14, 2016 9:51 pm

Hi Ruostre

I think the automation of importing Access database is easy if you can do little Java programming and know SQL.

First, try Wandora's SQL extractor.... You can find it by selecting menu option File > Extract > Databases > SQL extractor... With the SQL extractor you can connect any database and import database data by writing SQL select statement. Thinking of your Access database, Wandora doesn't include JDBC libary for Access, and you need to download the JDBC jar for Access and put it into Wandora's lib folder in order to to connect Access database.

If I were you, I would create my personal Access import tool by extending the SQL extractor

https://github.com/wandora-team/wandora ... actor.java

You just need to rewrite the 'execute' method. As you don't need UI, you can write a little more simpler method, something like:

Code: Select all
    @Override
    public void execute(Wandora wandora, Context context) {
      setDefaultLogger();
      TopicMap tm = wandora.getTopicMap();
      String query = "PUT YOUR SELECT STATEMENT HERE";
      String url = "PUT YOUR JDBC CONNECTION STRING HERE";
      Connection connection = null;
      try {
         connection = DriverManager.getConnection(url);
         Statement stmt = connection.createStatement();
         log("Executing SQL query...");
         ResultSet rs = stmt.executeQuery(query);
         log("Transforming SQL result set to a topic map...");
         handleResultSet(rs, tm);
      }
      catch(Exception e) {
         log(e);
      }
      finally {
         if(connection != null) {
            connection.close();
         }
      }
      log("Ready.");
      setState(WAIT);
    }


When you have implemented your brand new Access import tool, you can put it into Wandora's button bar, for example. And you have one button solution to import your Access database. Simple as that :)
akivela
Site Admin
 
Posts: 256
Joined: Tue Sep 18, 2007 10:20 am
Location: Helsinki, Finland


Return to How to... and problems

Who is online

Users browsing this forum: No registered users and 1 guest

cron